laravel - Cartalyst Sentinel Entity-Level Permissions -


so guys,

i've been using laravel 5 creating new web application manage reviews individual schools. , i've decided utilize cartalyst sentinel package rbac.

so far i've setup 4 roles: administrator, principal, staff, user

  • administrator can throughout web application adding schools, users , reviews etc.
  • principal can add/remove staff , reviews on school assigned administrator. keep in mind principal can assign existing user staff on school.
  • staff can add reviews school assigned either administrator or principal
  • user default-role doesn't have privileges throughout system.

the flow i'm using administrator creates users in system default have user role assigned. , creates schools , once school saved, assigns user users staff or principal.

problem have: roles in sentinel work on application level explained web app, need entity level permissions on individual users. suppose, user a principal school x might staff school y.
how should handle in sentinel? introducing entity/user mapping table or should use permission based access? if it's permission based access, checks user id assignment given school programmed?

hope question not broad - i'll try narrow down further if needed. fact i've searched hours i've been able proper approach of checking whether action should performed or not - checking if user "is staff" or checking if user "can edit".


Comments

Popular posts from this blog

php - Wordpress website dashboard page or post editor content is not showing but front end data is showing properly -

How to get the ip address of VM and use it to configure SSH connection dynamically in Ansible -

javascript - Get parameter of GET request -