incubator-sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cziege...@apache.org
Subject svn commit: r1558731 - in /sling/trunk/bundles/resourceaccesssecurity/src/main/java/org/apache/sling/resourceaccesssecurity: ResourceAccessGate.java impl/ResourceAccessGateTracker.java
Date Thu, 16 Jan 2014 10:00:52 GMT
Author: cziegeler
Date: Thu Jan 16 10:00:51 2014
New Revision: 1558731

URL: http://svn.apache.org/r1558731
Log:
SLING-2698 - resource access security service for resource providers. Distinguish between
context application and provider

Modified:
    sling/trunk/bundles/resourceaccesssecurity/src/main/java/org/apache/sling/resourceaccesssecurity/ResourceAccessGate.java
    sling/trunk/bundles/resourceaccesssecurity/src/main/java/org/apache/sling/resourceaccesssecurity/impl/ResourceAccessGateTracker.java

Modified: sling/trunk/bundles/resourceaccesssecurity/src/main/java/org/apache/sling/resourceaccesssecurity/ResourceAccessGate.java
URL: http://svn.apache.org/viewvc/sling/trunk/bundles/resourceaccesssecurity/src/main/java/org/apache/sling/resourceaccesssecurity/ResourceAccessGate.java?rev=1558731&r1=1558730&r2=1558731&view=diff
==============================================================================
--- sling/trunk/bundles/resourceaccesssecurity/src/main/java/org/apache/sling/resourceaccesssecurity/ResourceAccessGate.java
(original)
+++ sling/trunk/bundles/resourceaccesssecurity/src/main/java/org/apache/sling/resourceaccesssecurity/ResourceAccessGate.java
Thu Jan 16 10:00:51 2014
@@ -49,6 +49,8 @@ import aQute.bnd.annotation.ConsumerType
  * in this case the gate is only applied to resource providers requesting the
  * security checks. Or the context can be {@link #APPLICATION_CONTEXT}. In this
  * case the access gate is invoked for the whole resource tree.
+ * This is indicated by the required service property {@link #CONTEXT}. If the
+ * property is missing or invalid, the service is ignored.
  */
 @ConsumerType
 public interface ResourceAccessGate {
@@ -64,7 +66,7 @@ public interface ResourceAccessGate {
      * The name of the service registration property containing the context
      * of this service. Allowed values are {@link #APPLICATION_CONTEXT} and
      * {@link #PROVIDER_CONTEXT}.
-     * The default for this value is <code>{@link #PROVIDER_CONTEXT}</code>.
+     * This property is required and has no default value.
      * (value is "access.context")
      */
     String CONTEXT = "access.context";

Modified: sling/trunk/bundles/resourceaccesssecurity/src/main/java/org/apache/sling/resourceaccesssecurity/impl/ResourceAccessGateTracker.java
URL: http://svn.apache.org/viewvc/sling/trunk/bundles/resourceaccesssecurity/src/main/java/org/apache/sling/resourceaccesssecurity/impl/ResourceAccessGateTracker.java?rev=1558731&r1=1558730&r2=1558731&view=diff
==============================================================================
--- sling/trunk/bundles/resourceaccesssecurity/src/main/java/org/apache/sling/resourceaccesssecurity/impl/ResourceAccessGateTracker.java
(original)
+++ sling/trunk/bundles/resourceaccesssecurity/src/main/java/org/apache/sling/resourceaccesssecurity/impl/ResourceAccessGateTracker.java
Thu Jan 16 10:00:51 2014
@@ -100,7 +100,7 @@ public class ResourceAccessGateTracker e
             returnValue = new ArrayList<ResourceAccessGateHandler>();
             for (ServiceReference serviceReference : getSortedServiceReferences()) {
                 final String context = (String) serviceReference.getProperty(ResourceAccessGate.CONTEXT);
-                if ( ResourceAccessGate.PROVIDER_CONTEXT.equals(context) || context == null
|| context.trim().length() == 0 ) {
+                if ( ResourceAccessGate.PROVIDER_CONTEXT.equals(context) ) {
                     returnValue.add(new ResourceAccessGateHandler(serviceReference));
                 }
             }



Mime
View raw message