You signed in with another tab or window.Reload to refresh your session.You signed out in another tab or window.Reload to refresh your session.You switched accounts on another tab or window.Reload to refresh your session.Dismiss alert
This loopback component add a new dynamic user role which mapping the operators of model to the role.The role name should be '[modelName]' + '.' + '[operator]'. The role should be mapped into the ACL too.And the role can be nested like this:
Role1:User.addRole2: Role1Role3: Role2
The Role3 should has theUser.add role too.
The role could have multi containers of permission(aother role) or permissions.
The Permission is the model with operation. You can use the* to match the any model or any operation.eg,'*.add', 'User.*'.
Add the.owned dynamical roles toedit,view,find, anddelete roles as postfix.For only edit/delete/view/find owned items.
Note:
The same role could be exists in multi-roles.
Disable batch update roles.
The nested max level of role to limit. see config:maxLevel
Installation
Install in you loopback project:
npm install --save loopback-component-role-user
Create a component-config.json file in your server folder (if you don't already have one)