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

Role Permission Fix #16

Merged
merged 1 commit into from
Dec 13, 2014
Merged

Role Permission Fix #16

merged 1 commit into from
Dec 13, 2014

Conversation

noxify
Copy link
Contributor

@noxify noxify commented Dec 11, 2014

Fixes the problem that permissions are not saved, when the role had no other permissions.

Fixed the problem, that the selected permissions would not be saved
@gravitano
Copy link
Member

I think I have been fixed this issue. But currently I'm not working on master branch. If you look this file on develop branch in this link I have been added the if statement to check user permission before we update the user permissions.

@noxify
Copy link
Contributor Author

noxify commented Dec 12, 2014

Hi,

my pull request fixes the problem, that you can't add a permission to role if the role has no other permissions.

Your condition (same in develop and master) will only save the permission update if there are one or more permissions attached.

Example:

Role: Administrator has by default some permissions (like manage_articles etc.) and the count() will return a value > 0.

But if you create a new role, there are no permissions attached.
If you now try to add a new permission (via update), the selected permission(s) will not be added.

gravitano added a commit that referenced this pull request Dec 13, 2014
@gravitano gravitano merged commit 9e25686 into pingpong-labs:master Dec 13, 2014
@coveralls
Copy link

Coverage Status

Changes Unknown when pulling c9c98ad on noxify:master into * on pingpong-labs:master*.

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

3 participants