lib/services/metadata.js
function userOrRobot(user) {
  if (user && _.get(user, 'username') && _.get(user, 'provider')) {
    return user;
  } else {
    // no actual user, this was an api key
    return {
      username: 'robot',
      provider: 'clay',
      imageUrl: 'clay-avatar', // kiln will supply a clay avatar
      name: 'Clay',
      auth: 'admin'
    };
  }
}
function userOrRobot(user) {
  if (user && _.get(user, 'username') && _.get(user, 'provider')) {
    return user;
  } else {
    // no actual user, this was an api key
    return {
      username: 'robot',
      provider: 'clay',
      imageUrl: 'clay-avatar', // kiln will supply a clay avatar
      name: 'Clay',
      auth: 'admin'
    };
  }
}
function userOrRobot ( user ) { if ( user && _ . get ( user , 'username' ) && _ . get ( user , 'provider' ) ) { return user ; } else { // no actual user, this was an api key return { username : 'robot' , provider : 'clay' , imageUrl : 'clay-avatar' , // kiln will supply a clay avatar name : 'Clay' , auth : 'admin' } ; } }
Either return the user object or
the system for a specific action

@param {Object} user
@returns {Object}
Either return the user object or the system for a specific action