In most applications, you wouldnt make exceptions like this. A user is a user and they should not have any admin privileges. If you find that some users can have additional permissions, you make a new role for them and assign that role permissions. If you start randomly assigning permissions to everyone, its going to get messy real fast, especially if you have a lot of users.
Why bother with roles?
Hi all,
I have been going through the roles and permissions video here: https://laracasts.com/series/whats-new-in-laravel-5-1/episodes/16
So users are assigned a role and roles are made up of a number of permissions. Fine. But what if I want to override a role and give a particular user a particular permission?
For example if my 'manager' role has the permissions 'add_users' and 'edit_users' but one particular customer has asked to be able to 'delete_users' too then this method seems a little restrictive. Correct me if I am wrong but I think I'd have to create a new role and assign the permissions just for the one customer that wants it.
So I was considering adding another pivot table to link up users to permissions. Then I though if I did that, there doesn't really seem much point in having the roles table at all.
Does anyone have any opinions/examples of the best practice for this?
Also worth noting that I know about some of the packages available but I'd like to do some stuff myself to help learn it!
Thanks!
Please or to participate in this conversation.