[
https://issues.apache.org/jira/browse/OAK-6212?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Davide Giannella closed OAK-6212.
---------------------------------
Bulk close for 1.7.0
> AccessControlAction: minor improvement when user or group privileges are
> empty
> -------------------------------------------------------------------------------
>
> Key: OAK-6212
> URL: https://issues.apache.org/jira/browse/OAK-6212
> Project: Jackrabbit Oak
> Issue Type: Improvement
> Components: core
> Reporter: angela
> Assignee: angela
> Fix For: 1.7.0, 1.8
>
>
> the current code avoids retrieving the ac policy only if both the configured
> user and group privileges are empty. this be improved by comparing the
> configured privileges with the type of the authorizable to be processed.
> Instead of
> {code}
> if (groupPrivilegeNames.length == 0 && userPrivilegeNames.length == 0) {
> log.debug("No privileges configured for groups and users; omit ac
> setup.");
> return;
> }
> {code}
> and later testing for >1 privileges again it should do something like
> {code}
> if (groupPrivilegeNames.length == 0 && authorizable.isGroup()) {
> // log + return
> } else if (userPrivilegeNames.length == 0 && !authorizable.isGroup()) {
> // log + return
> }
> {code}
> [~alex.parvulescu], fyi.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)