jackrabbit-oak-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Davide Giannella (JIRA)" <j...@apache.org>
Subject [jira] [Closed] (OAK-8276) OR-CompositeTreePermission.grantsPermission should loop over aggregates of supported permissions
Date Tue, 11 Jun 2019 10:52:13 GMT

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

Davide Giannella closed OAK-8276.
---------------------------------

bulk close 1.14.0

> OR-CompositeTreePermission.grantsPermission should loop over aggregates of supported
permissions
> ------------------------------------------------------------------------------------------------
>
>                 Key: OAK-8276
>                 URL: https://issues.apache.org/jira/browse/OAK-8276
>             Project: Jackrabbit Oak
>          Issue Type: Bug
>          Components: core, security
>            Reporter: angela
>            Assignee: angela
>            Priority: Minor
>             Fix For: 1.14.0
>
>
> [~stillalex], issue as discussed in person: while working on OAK-8269 and the missing
tests for the ORing {{CompositeTreePermission}} i noticed the following issue in {{grantsPermission}}:
after obtaining the supported permissions the code loops over the individual permissions aggregated.
but passes the original permission instead of the supported ones which potentially only include
a subset.
> the affected code inside the method looks as follows:
> {code}
>             long supported = providers[i].supportedPermissions(tp, property, permissions);
>             if (doEvaluate(supported)) {
>                 if (compositionType == AND) {
>                    [...]
>                 } else {
>                     for (long p : Permissions.aggregates(permissions)) {    // <====
issue line 221 
>                         [...]
>                     }
>                 }
>             }
> {code}
> IMO the code at line 221 should rather be as follows:
> {code}
> for (long p : Permissions.aggregates(supported)) {
> {code}
> i will go ahead fix it along with a test case that illustrates the issue. 



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message