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

Permission denied for specific Action when two groups are assigned to user #442

Open
Nikhil13x opened this issue Dec 9, 2023 · 4 comments

Comments

@Nikhil13x
Copy link
Contributor

A user is assigned with two groups.
Group 1 - Administrator with all permissions and their actions enabled
Group 2 - TestGroup - with one action unselected (Admin Area.Manage Products -> "List")

In this case, the user is not allowed to "List" the products, even if the permissions is assigned via one group. The deny rule takes precedence.

Is this expected behaviour?

@Nikhil13x
Copy link
Contributor Author

image

This snippet returns false on occurrence of a deny rule in actions. Should it return true whenever there is no deny rule for a group in the for loop instead?

@KrzysztofPajak
Copy link
Member

@Nikhil13x yes, it is expected behaviour.

@Nikhil13x
Copy link
Contributor Author

@KrzysztofPajak Understood. But the logic at permissionSystemName level works in the other way. If the checkbox is selected for any groups assigned to the user, it allows access.
Only at action level, the deny rule is applied. It's confusing a little.

@KrzysztofPajak
Copy link
Member

@Nikhil13x you have right, it can be a little confusing.
I will consider to change it.
In the PermissionAction collection (in database) we save records to which you do not have access. In this case, we will have to change the operating mechanism and perform a migration.

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

No branches or pull requests

2 participants