console.log(roles);
351632
function set(Account, roles) {

    var Role = app.models.Role;
    for (var name in roles) {
      var role = roles[name];
      var model = app.models[role.model];
      model.belongsTo(Account, {
        foreignKey: 'accountId',
        as: 'account'
      });

      model.validatesUniquenessOf('accountId');

      Account.hasOne(model, {
        foreignKey: 'accountId',
        as: name
      });

      Role.registerResolver(name, function(roleName, context, cb) {

        Promise.resolve()
          .then(function() {

            var result = context.accessToken && context.accessToken.roles && context.accessToken.roles[roleName];
            return result?true:false;

          })
          .asCallback(cb);

      });

    }

  }
1207585
function(role, view, template_arguments) {

		var result = false;

		if (role in this._role_handlers) {

			this[this._role_handlers[role]](view, template_arguments);
			result = true;

		}

		return result;

	}
244505
function logMessage(messageType, message) {
  if (Object.values(messageTypes).includes(messageType)) {
    console[messageType](message)
  } else {
    console.info(message)
  }
}
134693
function log(type, ...rest) {
	if (argv.output) {
		console.log(LOG[type](rest));
	}
}
853287
function getRole(user) {
      user = user || getCurrentUser();
      return _.find(userRoles, {role: user.role});
    }
793592
function log(msg) {
  var d = new Date(), ts;
  ts = d.toLocaleTimeString().split(' ');
  ts = ts[0] + '.' + d.getMilliseconds() + ' ' + ts[1];
  
  console.log('[' + ts + '] ' + msg);
}
1354740
function ConsoleLogger() {

    this.error = function () {
        if (loggingLevel(ERROR)) {
            console.error.apply(this, arguments);
        }
    };

    this.warn = function () {
        if (loggingLevel(WARN)) {
            console.warn.apply(this, arguments);
        }
    };

    this.info = function () {
        if (loggingLevel(INFO)) {
            console.info.apply(this, arguments);
        }
    };

    this.log = function () {
        if (loggingLevel(INFO)) {
            console.log.apply(this, arguments);
        }
    };

    this.debug = function () {
        if (loggingLevel(DEBUG)) {
            console.log.apply(this, arguments);
        }
    };

    this.setLevelToInfo = function () {
        setLevel(INFO);
    };

    this.setLevelToDebug = function() {
        setLevel(DEBUG);
    };

    this.setLevelToWarning = function() {
        setLevel(WARN);
    };

    this.setLevelToError = function() {
        setLevel(ERROR);
    };
}
544259
function log(arg) {
  var str = JSON.stringify(arg)
  console.log(str)
  return str;
}
397839
function log(type, resource, params, response) {
    if (console.group) {
        // Better logging in Chrome
        console.groupCollapsed(type, resource, JSON.stringify(params));
        console.log(response);
        console.groupEnd();
    } else {
        console.log('FakeRest request ', type, resource, params);
        console.log('FakeRest response', response);
    }
}
467922
def roles(self):
        
        if not self.__roles:
            self.__roles = Roles(self.__connection)
        return self.__roles
602312
@CommandArgument
  public void addroles(
      @OptionArgument("username") String username,
      @OptionArgument("roles") String roles) {

    User user = users.get(username);

    if (user != null) {
      user.roles.addAll(Arrays.asList(roles.split(",")));
    } else {
      System.err.println(String.format("User '%s' does not exist", username));
    }

  }
1126128
function loadRoles() {
  const roleConfigsPath = path.join(process.cwd(), plugin.config.rolesPath);

  // This event allows to inject code before loading all APIs
  return plugin.myrmex.fire('beforeRolesLoad')
  .then(() => {
    // Retrieve configuration path of all API specifications
    return fs.readdirAsync(roleConfigsPath);
  })
  .catch(e => {
    if (e.code === 'ENOENT' && path.basename(e.path) === 'roles') {
      return Promise.resolve([]);
    }
    return Promise.reject(e);
  })
  .then((roleConfigFiles) => {
    // Load all the role configurations
    const rolePromises = [];
    _.forEach(roleConfigFiles, (filename) => {
      const roleConfigPath = path.join(roleConfigsPath, filename);
      const roleName = path.parse(filename).name;
      rolePromises.push(loadRole(roleConfigPath, roleName));
    });
    return Promise.all(rolePromises);
  })
  .then((roles) => {
    // This event allows to inject code to add or delete or alter role configurations
    return plugin.myrmex.fire('afterRolesLoad', roles);
  })
  .spread((roles) => {
    return Promise.resolve(roles);
  });
}
1103737
function flatten(role) {
        var children = permissions[role] || [];
        var result = [role];

        for (var i in children) {
            result = result.concat(flatten(children[i]));
        }
        return result;
    }
479522
function log(msg) {
        if (msg === void 0) { msg = ""; }
        return action(function (p) { console.log(msg); }).setType("log");
    }
566559
function log(message) {
  if (message instanceof Error) {
    console.log(message.stack);
  }

  if (CONFIG.debug) {
    if (typeof message === "object") {
      console.log(JSON.stringify(message, null, 2));
    } else {
      console.log(message);
    }
  }
}
715186
function logEvents(verbInst) {
  verbInst.on('err', function () {
    failed = true;
  });

  verbInst.on('task_start', function (e) {
    verbLog('starting', '\'' + chalk.cyan(e.task) + '\'');
  });

  verbInst.on('task_stop', function (e) {
    var time = prettyTime(e.hrDuration);
    verbLog('finished', '\'' + chalk.cyan(e.task) + '\'', 'after', chalk.magenta(time));
  });

  verbInst.on('task_err', function (e) {
    var msg = formatError(e);
    var time = prettyTime(e.hrDuration);
    verbLog(chalk.cyan(e.task), chalk.red('errored after'), chalk.magenta(time));
    verbLog(msg);
  });

  verbInst.on('task_not_found', function (err) {
    verbLog(chalk.red('task \'' + err.task + '\' is not in your verbfile'));
    verbLog('please check the documentation for proper verbfile formatting');
    exit(1);
  });
}
800655
function log(...messages) {
  console.log(...messages);
  const p = document.createElement('p');
  p.innerText = messages.join(' ');
  logElement.appendChild(p);
}