Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed multiple permissions on same role, and with shared root permissions #188

Open
wants to merge 1 commit into
base: 1.0
Choose a base branch
from

Conversation

janvp
Copy link

@janvp janvp commented Dec 19, 2016

I had following issue:
Permission A which is a parent permission.
Two children permissions B and C that inherit from A.

I have 2 roles, one that has permission B and one that has permission C.
But I also have a superadmin role that has automatically all the permissions, so it has permission A, B and C. I expected it would have all the permissions of B and C, but in fact it only had the permissions from either B or C, depending which one was inserted last in the database.

I changed the code, so if for example B has permission ['edit' => true] and C has permission ['edit' => false], the superadmin will have permission ['edit' => true], no matter which one of B and C was inserted last in the database.

assumption of the library:
slugs are a list of key-values where the value is always a boolean.

@janvp
Copy link
Author

janvp commented Jan 6, 2017

Fixes #196

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant