OptimalBits / node_acl

Access control lists for node applications
2.62k stars 369 forks source link

json representation _allRoles #253

Open santos-pavelski opened 6 years ago

santos-pavelski commented 6 years ago

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; } }); };`