You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by ro...@apache.org on 2017/11/07 09:49:25 UTC

[sling-org-apache-sling-jcr-resourcesecurity] annotated tag org.apache.sling.jcr.resourcesecurity-1.0.2 created (now c147c92)

This is an automated email from the ASF dual-hosted git repository.

rombert pushed a change to annotated tag org.apache.sling.jcr.resourcesecurity-1.0.2
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-jcr-resourcesecurity.git.


      at c147c92  (tag)
 tagging 1bdb0de0365b7da505bd0d3e4acf2e5390a2bf2b (commit)
      by Carsten Ziegeler
      on Fri Jan 9 12:52:57 2015 +0000

- Log -----------------------------------------------------------------
org.apache.sling.jcr.resourcesecurity-1.0.2
-----------------------------------------------------------------------

This annotated tag includes the following new commits:

     new 4e46e64  Add new project containing an access security gate which protectes resource providers based on JCR nodes.
     new b2bed21  SLING-2698 - resource access security service for resource providers. Distinguish between context application and provider
     new 10e45a8  Use released Sling API
     new 3dc5786  Don't apply gate if the resource is a jcr resource
     new 9615f3d  SLING-3438 : Provide ResourceAccessGate implementation that authorizes CRUD operations based on JCR permissios. Merge patch from Marius Petria with existing implementation
     new 52af11e  Simplify code, use common method for permission check
     new 27da478  Simplify code, use common method for permission check
     new 8da3219  Implement deep structure check based on the resource path
     new 7c9f63a  Update to parent pom v19
     new b51755c  Update to latest parent pom 20
     new a4ef095  Update to Sling Parent POM 22 with baselining enabled
     new bc2195d  Use released resourceacesssecurity
     new 6d6c765  [maven-release-plugin] prepare release org.apache.sling.jcr.resourcesecurity-1.0.0
     new 67919f3  Correct svn info
     new 2cbe7c6  [maven-release-plugin] prepare release org.apache.sling.jcr.resourcesecurity-1.0.0
     new 7adadd1  [maven-release-plugin] prepare for next development iteration
     new 138271c  SLING-4291 : NPE if optional prefix is not configured
     new 41ae4aa  SLING-4291 : NPE if optional prefix is not configured
     new 3d00c72  [maven-release-plugin] prepare release org.apache.sling.jcr.resourcesecurity-1.0.2
     new 1bdb0de  [maven-release-plugin]  copy for tag org.apache.sling.jcr.resourcesecurity-1.0.2

The 20 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


-- 
To stop receiving notification emails like this one, please contact
['"commits@sling.apache.org" <co...@sling.apache.org>'].

[sling-org-apache-sling-jcr-resourcesecurity] 04/05: [maven-release-plugin] prepare release org.apache.sling.jcr.resourcesecurity-1.0.2

Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rombert pushed a commit to annotated tag org.apache.sling.jcr.resourcesecurity-1.0.2
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-jcr-resourcesecurity.git

commit 3d00c72c52907162e119f69e0fd923715c4b146a
Author: Carsten Ziegeler <cz...@apache.org>
AuthorDate: Fri Jan 9 12:52:48 2015 +0000

    [maven-release-plugin] prepare release org.apache.sling.jcr.resourcesecurity-1.0.2
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/contrib/jcr/resourcesecurity@1650514 13f79535-47bb-0310-9956-ffa450edef68
---
 pom.xml | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/pom.xml b/pom.xml
index 364b805..63b522d 100644
--- a/pom.xml
+++ b/pom.xml
@@ -27,7 +27,7 @@
     </parent>
 
     <artifactId>org.apache.sling.jcr.resourcesecurity</artifactId>
-    <version>1.0.1-SNAPSHOT</version>
+    <version>1.0.2</version>
     <packaging>bundle</packaging>
 
     <name>Apache Sling JCR Resource Security</name>
@@ -36,9 +36,9 @@
     </description>
 
     <scm>
-        <connection>scm:svn:http://svn.apache.org/repos/asf/sling/trunk/contrib/jcr/resourcesecurity</connection>
-        <developerConnection>scm:svn:https://svn.apache.org/repos/asf/sling/trunk/contrib/jcr/resourcesecurity</developerConnection>
-        <url>http://svn.apache.org/viewvc/sling/trunk/contrib/jcr/resourcesecurity</url>
+        <connection>scm:svn:http://svn.apache.org/repos/asf/sling/tags/org.apache.sling.jcr.resourcesecurity-1.0.2</connection>
+        <developerConnection>scm:svn:https://svn.apache.org/repos/asf/sling/tags/org.apache.sling.jcr.resourcesecurity-1.0.2</developerConnection>
+        <url>http://svn.apache.org/viewvc/sling/tags/org.apache.sling.jcr.resourcesecurity-1.0.2</url>
     </scm>
 
     <build>

-- 
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.

[sling-org-apache-sling-jcr-resourcesecurity] 03/05: SLING-4291 : NPE if optional prefix is not configured

Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rombert pushed a commit to annotated tag org.apache.sling.jcr.resourcesecurity-1.0.2
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-jcr-resourcesecurity.git

commit 41ae4aa1c25435d8043508d86181f4595d83dab4
Author: Carsten Ziegeler <cz...@apache.org>
AuthorDate: Fri Jan 9 12:30:20 2015 +0000

    SLING-4291 : NPE if optional prefix is not configured
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/contrib/jcr/resourcesecurity@1650513 13f79535-47bb-0310-9956-ffa450edef68
---
 .../jcr/resourcesecurity/impl/ResourceAccessGateFactory.java     | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/src/main/java/org/apache/sling/jcr/resourcesecurity/impl/ResourceAccessGateFactory.java b/src/main/java/org/apache/sling/jcr/resourcesecurity/impl/ResourceAccessGateFactory.java
index 4cfe4eb..a2171f7 100644
--- a/src/main/java/org/apache/sling/jcr/resourcesecurity/impl/ResourceAccessGateFactory.java
+++ b/src/main/java/org/apache/sling/jcr/resourcesecurity/impl/ResourceAccessGateFactory.java
@@ -73,11 +73,8 @@ public class ResourceAccessGateFactory
     protected void activate(final Map<String, Object> props) {
         this.jcrPath = PropertiesUtil.toString(props.get(PROP_JCR_PATH), null);
         this.prefix = PropertiesUtil.toString(props.get(PROP_PREFIX), null);
-        if ( this.prefix != null ) {
-            if ( !this.prefix.endsWith("/") ) {
-                this.prefix = this.prefix + "/";
-            }
-            this.jcrPath = this.jcrPath + "/";
+        if ( this.prefix != null && !this.prefix.endsWith("/") ) {
+             this.prefix = this.prefix + "/";
         }
     }
 
@@ -92,7 +89,7 @@ public class ResourceAccessGateFactory
         if ( session != null ) {
             String checkPath = this.jcrPath;
             if ( this.prefix != null && path.startsWith(this.prefix) ) {
-                checkPath = this.jcrPath + path.substring(this.prefix.length());
+                checkPath = this.jcrPath + path.substring(this.prefix.length() - 1);
             }
             try {
                 granted = session.hasPermission(checkPath, permission);

-- 
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.

[sling-org-apache-sling-jcr-resourcesecurity] 01/05: [maven-release-plugin] prepare for next development iteration

Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rombert pushed a commit to annotated tag org.apache.sling.jcr.resourcesecurity-1.0.2
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-jcr-resourcesecurity.git

commit 7adadd1b2e0cefdbfc180708fde13913c5f54dac
Author: Carsten Ziegeler <cz...@apache.org>
AuthorDate: Mon Jan 5 15:52:07 2015 +0000

    [maven-release-plugin] prepare for next development iteration
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/contrib/jcr/resourcesecurity@1649561 13f79535-47bb-0310-9956-ffa450edef68
---
 pom.xml | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/pom.xml b/pom.xml
index 892e42e..364b805 100644
--- a/pom.xml
+++ b/pom.xml
@@ -27,7 +27,7 @@
     </parent>
 
     <artifactId>org.apache.sling.jcr.resourcesecurity</artifactId>
-    <version>1.0.0</version>
+    <version>1.0.1-SNAPSHOT</version>
     <packaging>bundle</packaging>
 
     <name>Apache Sling JCR Resource Security</name>
@@ -36,9 +36,9 @@
     </description>
 
     <scm>
-        <connection>scm:svn:http://svn.apache.org/repos/asf/sling/tags/org.apache.sling.jcr.resourcesecurity-1.0.0</connection>
-        <developerConnection>scm:svn:https://svn.apache.org/repos/asf/sling/tags/org.apache.sling.jcr.resourcesecurity-1.0.0</developerConnection>
-        <url>http://svn.apache.org/viewvc/sling/tags/org.apache.sling.jcr.resourcesecurity-1.0.0</url>
+        <connection>scm:svn:http://svn.apache.org/repos/asf/sling/trunk/contrib/jcr/resourcesecurity</connection>
+        <developerConnection>scm:svn:https://svn.apache.org/repos/asf/sling/trunk/contrib/jcr/resourcesecurity</developerConnection>
+        <url>http://svn.apache.org/viewvc/sling/trunk/contrib/jcr/resourcesecurity</url>
     </scm>
 
     <build>

-- 
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.

[sling-org-apache-sling-jcr-resourcesecurity] 05/05: [maven-release-plugin] copy for tag org.apache.sling.jcr.resourcesecurity-1.0.2

Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rombert pushed a commit to annotated tag org.apache.sling.jcr.resourcesecurity-1.0.2
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-jcr-resourcesecurity.git

commit 1bdb0de0365b7da505bd0d3e4acf2e5390a2bf2b
Author: Carsten Ziegeler <cz...@apache.org>
AuthorDate: Fri Jan 9 12:52:57 2015 +0000

    [maven-release-plugin]  copy for tag org.apache.sling.jcr.resourcesecurity-1.0.2
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/tags/org.apache.sling.jcr.resourcesecurity-1.0.2@1650515 13f79535-47bb-0310-9956-ffa450edef68

-- 
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.

[sling-org-apache-sling-jcr-resourcesecurity] 02/05: SLING-4291 : NPE if optional prefix is not configured

Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rombert pushed a commit to annotated tag org.apache.sling.jcr.resourcesecurity-1.0.2
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-jcr-resourcesecurity.git

commit 138271c673130893906b59a7c3f150b98ad5909c
Author: Carsten Ziegeler <cz...@apache.org>
AuthorDate: Fri Jan 9 11:56:46 2015 +0000

    SLING-4291 : NPE if optional prefix is not configured
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/contrib/jcr/resourcesecurity@1650508 13f79535-47bb-0310-9956-ffa450edef68
---
 .../jcr/resourcesecurity/impl/ResourceAccessGateFactory.java     | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/src/main/java/org/apache/sling/jcr/resourcesecurity/impl/ResourceAccessGateFactory.java b/src/main/java/org/apache/sling/jcr/resourcesecurity/impl/ResourceAccessGateFactory.java
index 2b7d253..4cfe4eb 100644
--- a/src/main/java/org/apache/sling/jcr/resourcesecurity/impl/ResourceAccessGateFactory.java
+++ b/src/main/java/org/apache/sling/jcr/resourcesecurity/impl/ResourceAccessGateFactory.java
@@ -73,8 +73,11 @@ public class ResourceAccessGateFactory
     protected void activate(final Map<String, Object> props) {
         this.jcrPath = PropertiesUtil.toString(props.get(PROP_JCR_PATH), null);
         this.prefix = PropertiesUtil.toString(props.get(PROP_PREFIX), null);
-        if ( !this.prefix.endsWith("/") ) {
-            this.prefix = this.prefix + "/";
+        if ( this.prefix != null ) {
+            if ( !this.prefix.endsWith("/") ) {
+                this.prefix = this.prefix + "/";
+            }
+            this.jcrPath = this.jcrPath + "/";
         }
     }
 
@@ -89,7 +92,7 @@ public class ResourceAccessGateFactory
         if ( session != null ) {
             String checkPath = this.jcrPath;
             if ( this.prefix != null && path.startsWith(this.prefix) ) {
-                checkPath = this.jcrPath + path.substring(this.prefix.length() - 1);
+                checkPath = this.jcrPath + path.substring(this.prefix.length());
             }
             try {
                 granted = session.hasPermission(checkPath, permission);

-- 
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.