fix lint erros
This commit is contained in:
parent
7a990d745c
commit
c764c09837
|
@ -40,27 +40,27 @@ module.exports = function(Role) {
|
||||||
principalTypesToModels[RoleMapping.APPLICATION] = Application;
|
principalTypesToModels[RoleMapping.APPLICATION] = Application;
|
||||||
principalTypesToModels[RoleMapping.ROLE] = Role;
|
principalTypesToModels[RoleMapping.ROLE] = Role;
|
||||||
|
|
||||||
Object.keys(principalTypesToModels).forEach(function(principalType){
|
Object.keys(principalTypesToModels).forEach(function(principalType) {
|
||||||
var model = principalTypesToModels[principalType];
|
var model = principalTypesToModels[principalType];
|
||||||
var pluralName = model.pluralModelName.toLowerCase();
|
var pluralName = model.pluralModelName.toLowerCase();
|
||||||
/**
|
/**
|
||||||
* Fetch all users assigned to this role
|
* Fetch all users assigned to this role
|
||||||
* @function Role.prototype#users
|
* @function Role.prototype#users
|
||||||
* @param {object} [query] query object passed to model find call
|
* @param {object} [query] query object passed to model find call
|
||||||
* @param {Function} [callback]
|
* @param {Function} [callback]
|
||||||
*/
|
*/
|
||||||
/**
|
/**
|
||||||
* Fetch all applications assigned to this role
|
* Fetch all applications assigned to this role
|
||||||
* @function Role.prototype#applications
|
* @function Role.prototype#applications
|
||||||
* @param {object} [query] query object passed to model find call
|
* @param {object} [query] query object passed to model find call
|
||||||
* @param {Function} [callback]
|
* @param {Function} [callback]
|
||||||
*/
|
*/
|
||||||
/**
|
/**
|
||||||
* Fetch all roles assigned to this role
|
* Fetch all roles assigned to this role
|
||||||
* @function Role.prototype#roles
|
* @function Role.prototype#roles
|
||||||
* @param {object} [query] query object passed to model find call
|
* @param {object} [query] query object passed to model find call
|
||||||
* @param {Function} [callback]
|
* @param {Function} [callback]
|
||||||
*/
|
*/
|
||||||
Role.prototype[pluralName] = function(query, callback) {
|
Role.prototype[pluralName] = function(query, callback) {
|
||||||
listByPrincipalType(model, principalType, query, callback);
|
listByPrincipalType(model, principalType, query, callback);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue