You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oak-issues@jackrabbit.apache.org by "angela (JIRA)" <ji...@apache.org> on 2017/05/11 15:21:04 UTC

[jira] [Resolved] (OAK-6212) AccessControlAction: minor improvement when user or group privileges are empty

     [ https://issues.apache.org/jira/browse/OAK-6212?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

angela resolved OAK-6212.
-------------------------
       Resolution: Fixed
    Fix Version/s: 1.8
                   1.7.0

Committed revision 1794845.


> 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)