pgrzesiecki / laravel-acl

Advanced ACL for Laravel
50 stars 22 forks source link

Advanced Permission Combinations by Per Content & Getting All Allowed Contents #10

Open koraykupe opened 8 years ago

koraykupe commented 8 years ago

Hi,

I've been trying to develop an internal staff portal for our company. There are departments, job grades, working areas, roles (user, editor, admin, super admin, etc...) and special groups (executives, etc) for user grouping.

User must have one (only one) department. User must have one (only one) job grades. User must work in minimum one area. User must have one (only one) roles. User may have one or more special groups.

Job grades and roles are hierarchical (an grade or role may be inherited of another one) but other ones not.

Users will see only allowed menus and access permitted routes. User will also select which users can view it when posting a new content.

e.g: Combination 1: (IT or Finance department) and (Job Grade is one of 9,10,11) and (Area is one of 1,5,8) and (Exclusive special group is one of 1,5,8) except user id=1

Combination 2: (HR department) and (Job Grade is 11) and user_id=3,4,5

Combinations can be related as AND/OR among themselves like Combination 1 AND combination 2 So, there will be lots of contents and every content will have different group permissions. I try to create a DB schema but it's very hard to get all contents that is visible to logged in user. Serialized data would be good for saving combination sets in db but it looks like impossible to get all contents for a user with it. How can i save combinations of group/user permissions in tables also?

Can your laravel-acl package meets my needs or what do you suggest for my issue?

Thanks.