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 13:13:04 UTC

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

angela created OAK-6212:
---------------------------

             Summary: 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


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)