Dan Klco created SLING-11794:
--------------------------------

             Summary: ResourceCollection Cannot Get Properties with Read-Only 
User
                 Key: SLING-11794
                 URL: https://issues.apache.org/jira/browse/SLING-11794
             Project: Sling
          Issue Type: Bug
          Components: Extensions
    Affects Versions: Resource Collections 1.0.0
            Reporter: Dan Klco
            Assignee: Dan Klco
             Fix For: Resource Collections 1.0.4


The ResourceCollection has a method 
[getProperties|https://github.com/apache/sling-org-apache-sling-resourcecollection/blob/dfcfd3ca53a7ffec1146a09e850893beea15716e/src/main/java/org/apache/sling/resource/collection/ResourceCollection.java#L72],
 which returns a 
[ModifiableValueMap|https://github.com/apache/sling-org-apache-sling-api/blob/24c26e15c534e323a57eb2386befa96a323840a1/src/main/java/org/apache/sling/api/resource/ModifiableValueMap.java],
 when adapting a 
[JcrNodeResource|https://github.com/apache/sling-org-apache-sling-jcr-resource/blob/0ce0fb850b3a71d800bc6d9c1e3a869fc5748cb1/src/main/java/org/apache/sling/jcr/resource/internal/helper/jcr/JcrNodeResource.java]
 to a ModifiableValueMap, the JcrNodeResource [checks to see if the session has 
write 
permissions|https://github.com/apache/sling-org-apache-sling-jcr-resource/blob/0ce0fb850b3a71d800bc6d9c1e3a869fc5748cb1/src/main/java/org/apache/sling/jcr/resource/internal/helper/jcr/JcrNodeResource.java#L137].
 and returns null if not.

Therefore effectively, if you only have read permissions for the Resource 
referenced by the Resource collection you cannot get the properties of a 
ResourceCollection.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to