Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

json representation _allRoles #253

Open
santos-pavelski opened this issue Oct 4, 2017 · 0 comments
Open

json representation _allRoles #253

santos-pavelski opened this issue Oct 4, 2017 · 0 comments

Comments

@santos-pavelski
Copy link

santos-pavelski commented Oct 4, 2017

how i can return a json representation of _allRoles private methods for dynamic acl controll?

something like that: acl._allRoles(function(err));

`//
// Return all roles in the hierarchy including the given roles.
//
Acl.prototype._allRoles = function(roleNames){
var _this = this;

return this._rolesParents(roleNames).then(function(parents){
if(parents.length > 0){
return _this._allRoles(parents).then(function(parentRoles){
return _.union(roleNames, parentRoles);
});
}else{
return roleNames;
}
});
};`

@santos-pavelski santos-pavelski changed the title json representatio _allRoles json representation _allRoles Oct 4, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant