Multiply roles and permission. #1718
-
Hi. I have a small question, is it possible to use your library to manage global and individual roles. For example: |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
As with any application, each layer needs to check and enforce its own rules for roles/permissions. While the most common use of this package is for situations less complex than what you describe, there are many options for adding the extra layers you need. Layer 1: Roles/Permissions per-user, enforced using |
Beta Was this translation helpful? Give feedback.
As with any application, each layer needs to check and enforce its own rules for roles/permissions.
While the most common use of this package is for situations less complex than what you describe, there are many options for adding the extra layers you need.
Layer 1: Roles/Permissions per-user, enforced using
@can()
and$someUser->can()
, middleware, etc. This may or may not include the wildcard-permissions feature, depending on needs.Layer 2: optionally (only if relevant, and maybe not in your case) additional User-type models associated with additional Roles/Permissions
Layer 3: custom in-app relations between users and other models of your app, enforced using Model Policies, and/or midd…