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

MODE-2408 Fixed the handling of empty ACLs #1371

Merged
merged 1 commit into from Jan 13, 2015

Conversation

hchiorean
Copy link
Member

If a node has empty ACLs, then the nearest non-empty ones in the hierarchy should be taken into account instead of assuming all permissions are granted on that node.

// walk up the hierarchy until we get a set of permissions or we reach the root or a missing parent
while (permissions == null) {
// walk up the hierarchy until we get a set of non-empty permissions or we reach the root or a missing parent
if ((permissions == null || permissions.isEmpty()) && searchParents) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor nit: couldn't this line just be if ( searchParents ) { since the permission-related criteria would be handled in the while loop?

@rhauch
Copy link
Contributor

rhauch commented Jan 13, 2015

A few minor nits noted above, but otherwise looks great.

… the nearest non-empty ones in the hierarchy should be taken into account instead of assuming all permissions are granted on that node.
@hchiorean
Copy link
Member Author

amended the commit based on the previous comments.

@rhauch
Copy link
Contributor

rhauch commented Jan 13, 2015

Looks great.

hchiorean pushed a commit that referenced this pull request Jan 13, 2015
MODE-2408 Fixed the handling of empty ACLs
@hchiorean hchiorean merged commit 627ccbd into ModeShape:master Jan 13, 2015
@hchiorean hchiorean deleted the MODE-2408 branch January 13, 2015 16:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants