Best practise for assigning roles vs permissions? #2331
-
Hi all Simple question: should I use roles or directly the permissions on each user ? Asking this because some users should not have the full role capabilities, in example, there are read-only writers, read-write writers and so on. Keeping tons of roles seems complicated and i didn't find a way to REMOVE a single permission to a user but still keeping the user assigned to the role (ie: read-write roles but with write permission removed for that single user) What do you suggest ? Should I create individual permissions and work directly with them ? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Documentation
You can make your own trait, example: #1895 (comment) |
Beta Was this translation helpful? Give feedback.
-
My understanding from your description of the
In general, like documentation suggest you should be checking against permissions so either approaches won't matter. |
Beta Was this translation helpful? Give feedback.
My understanding from your description of the
writer
is that a user should be able to write-read. My approach is to eitherreader
role and directly attach thewriting
permissions to specific users (I prefer this)reader
with read only,writer
with read-write << I understand you're trying to avoid many rolesIn general, like documentation suggest you should be checking against permissions so either approaches won't matter.