I use Laravel 5 for application development, and I would like to assign roles and permissions to users using Zizaco / Entrust. For a better understanding, let me give an example:
I have 4 roles in my db: guest, user, admin, owner. The owner has full access in the administration panel and on the main site, the administrator has limited access to the administration panel and full on the main site, users should have user access on the main site, and guests should not have access at all (they’re stuck on the main page until user role provided).
The problem I am facing is user access to users. With 4 main pages, users must request permissions for one or more of them. On the main page, they can upload files and do some other things.
What I want to do is give them the entire role of the user, but, for example, user A has permission to ONLY view page 1, not being able to upload files or any other things, user B has permission to view page 3 and , upload files only to page 3 and do other things besides uploaded files. I think you got the picture.
Is it possible to do this only with Entrust, or should I create a new pivot table between users and permissions and work with it to accomplish what I need?
Thank you very much,
Dragos
Edit:
, , , "---", " -", "---2" .., db.
, , , - , Page 1 Page 2, :
['id'->1,'name'->'user name','email'->'users email','role'->'user','permissions'->['view-page-1','view-page-2']]
1 2, - .
, 1, , :
['id'->2,'name'->'user name','email'->'users email','role'->'user','permissions'->['view-page-1','upload-to-page-1']]
1 .