onury / accesscontrol

Role and Attribute based Access Control for Node.js
https://onury.io/accesscontrol
MIT License
2.21k stars 178 forks source link

Multicontextual permissions #89

Open hackerunet opened 4 years ago

hackerunet commented 4 years ago

Hi there, I would like to know if is possible to have a permissions depending on multiple context, the idea is to create different roles and permissions based on which organizacion owns certain roles or profiles, the condition would be: 1) a Role is assigned to a organizacion 2) All users that belongs to that organization inherit only the roles of the organization 3) Roles with the same names but on different organizations are allowed.

Can you please help me understand it? thanks.

onury commented 3 years ago

We can add a feature like this I think. But until then you can implement this on your own by keeping a different grants list for each organization and authorizing the organization (similar to user) who is accessing the resource.