sling-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nitin Gupta (Jira)" <j...@apache.org>
Subject [jira] [Commented] (SLING-9195) Repoinit rep:restrictions gives error in some cases
Date Thu, 12 Mar 2020 12:39:00 GMT

    [ https://issues.apache.org/jira/browse/SLING-9195?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17057888#comment-17057888
] 

Nitin Gupta commented on SLING-9195:
------------------------------------

The issue was due to the comparison function being implemented at [1]. This method takes
javax.jcr.Value arrays as input (corresponding to the muti value restrictions), and sorts
them. Ideally there should have been a set comprison instead of sorting as Value does not
implements Comparable interface.

Fixed it and raised PR: [https://github.com/apache/sling-org-apache-sling-jcr-repoinit/pull/9]

[~bdelacretaz], [~anchela], please review.

Thanks.

[1][https://github.com/apache/sling-org-apache-sling-jcr-repoinit/blob/master/src/main/java/org/apache/sling/jcr/repoinit/impl/AclUtil.java#L305]

> Repoinit rep:restrictions gives error in some cases
> ---------------------------------------------------
>
>                 Key: SLING-9195
>                 URL: https://issues.apache.org/jira/browse/SLING-9195
>             Project: Sling
>          Issue Type: Bug
>          Components: Repoinit
>            Reporter: Nitin Gupta
>            Priority: Major
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> java.lang.RuntimeException: Failed to set ACL (java.lang.ClassCastException: class org.apache.jackrabbit.oak.plugins.value.jcr.ValueImpl
cannot be cast to class java.lang.Comparable (org.apache.jackrabbit.oak.plugins.value.jcr.ValueImpl
is in unnamed module of loader org.apache.felix.framework.BundleWiringImpl$BundleClassLoader
@5c920510; java.lang.Comparable is in module java.base of loader 'bootstrap')) AclLine DENY
\{principals=[everyone], privileges=[jcr:modifyProperties]} restrictions=[rep:glob=[/*], rep:itemNames=[fd:trusted],
fd:condition=[fd:trusted, true]]
> 	at org.apache.sling.jcr.repoinit.impl.AclVisitor.setAcl(AclVisitor.java:64) [org.apache.sling.jcr.repoinit:1.1.20]
> 	at org.apache.sling.jcr.repoinit.impl.AclVisitor.visitSetAclPaths(AclVisitor.java:98)
[org.apache.sling.jcr.repoinit:1.1.20]



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Mime
View raw message