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-2042: Test permissions for principals known to the security context #938

Closed
wants to merge 2 commits into from

Conversation

okulikov
Copy link
Member

This pull request modifies logic for permissions checking procedure. Originally only user id was used and in this version the entire security context and thus all principals are involved into the testing process.

if (hasPrivs) {
return true;
}
res |= ace.hasPrivileges(privileges);
Copy link
Contributor

Choose a reason for hiding this comment

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

If res is true at this point, can't we return without checking anything else? Or, perhaps the remaining if blocks should first check for !res? (IMO, the former is a tad more efficient and possibly a bit easier to see when just scanning the code, but the latter is not really too bad, either.)

@okulikov
Copy link
Member Author

Updated with respect to comments plus test case

@rhauch
Copy link
Contributor

rhauch commented Sep 11, 2013

Rebased and merged into the 'master' branch.

@rhauch rhauch closed this Sep 11, 2013
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