Open arximughal opened 1 year ago
Yuu can create middlewares for the different roles.
As per the flow, You can add one more role e.g.: 'manager'. Then assign new permission with old one too. / e.g. manager: [manageInvoices, getInvoices, manageOrganization]. It will make your role more readable that it has these permissions without doing any complex code. If this is helpful for you then you can close this issue.
How can I implement multiple roles for a single user given the default config in this boilerplate? e.g., I have a user account with the role
user
.user
role has certain permissions e.g.,manageInvoices
,getInvoices
. But I want one user to have the permissionmanageOrganization
along with the rest of the permissions but I do not want to addmanageOrganization
permission to all the users who haveuser
role.Is there any way I can achieve this? Any ideas and suggestions are appreciated!