jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From alexparvule...@apache.org
Subject svn commit: r1346878 - /jackrabbit/branches/2.4/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/observation/EventConsumer.java
Date Wed, 06 Jun 2012 13:16:45 GMT
Author: alexparvulescu
Date: Wed Jun  6 13:16:44 2012
New Revision: 1346878

URL: http://svn.apache.org/viewvc?rev=1346878&view=rev
Log:
JCR-3272 EventConsumer.canRead() should rely on AccessManager.isGranted() (2.4 backport)

Modified:
    jackrabbit/branches/2.4/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/observation/EventConsumer.java

Modified: jackrabbit/branches/2.4/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/observation/EventConsumer.java
URL: http://svn.apache.org/viewvc/jackrabbit/branches/2.4/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/observation/EventConsumer.java?rev=1346878&r1=1346877&r2=1346878&view=diff
==============================================================================
--- jackrabbit/branches/2.4/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/observation/EventConsumer.java
(original)
+++ jackrabbit/branches/2.4/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/observation/EventConsumer.java
Wed Jun  6 13:16:44 2012
@@ -31,6 +31,7 @@ import javax.jcr.observation.EventListen
 
 import org.apache.jackrabbit.core.SessionImpl;
 import org.apache.jackrabbit.core.id.ItemId;
+import org.apache.jackrabbit.core.security.authorization.Permission;
 import org.apache.jackrabbit.core.state.ItemState;
 import org.apache.jackrabbit.spi.Path;
 import org.apache.jackrabbit.spi.PathFactory;
@@ -303,6 +304,6 @@ class EventConsumer {
      */
     private boolean canRead(EventState eventState) throws RepositoryException {
         Path targetPath = pathFactory.create(eventState.getParentPath(), eventState.getChildRelPath().getName(),
eventState.getChildRelPath().getNormalizedIndex(), true);
-        return session.getAccessManager().canRead(targetPath, null);
+        return session.getAccessManager().isGranted(targetPath, Permission.READ);
     }
 }



Mime
View raw message