directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r520025 - in /directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core: authz/ authz/support/ collective/
Date Mon, 19 Mar 2007 17:50:50 GMT
Author: elecharny
Date: Mon Mar 19 10:50:49 2007
New Revision: 520025

URL: http://svn.apache.org/viewvc?view=rev&rev=520025
Log:
Replaced calls to Attribute.contains( value ) by a call to AttributeUtils.containsValue( attribute,
value, attributeType ) or 
AttributeUtils.containsValueCaseIgnore( attribute, value )

Modified:
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/AuthorizationService.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/TupleCache.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/support/RelatedProtectedItemFilter.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/support/RestrictedByFilter.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/collective/CollectiveAttributeService.java

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/AuthorizationService.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/AuthorizationService.java?view=diff&rev=520025&r1=520024&r2=520025
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/AuthorizationService.java
(original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/AuthorizationService.java
Mon Mar 19 10:50:49 2007
@@ -308,7 +308,7 @@
         throws NamingException
     {
         // only perform this for subentries
-        if ( !entry.get( SchemaConstants.OBJECT_CLASS_AT ).contains( SchemaConstants.SUBENTRY_OC
) )
+        if ( !AttributeUtils.containsValueCaseIgnore( entry.get( SchemaConstants.OBJECT_CLASS_AT
), SchemaConstants.SUBENTRY_OC ) )
         {
             return;
         }

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/TupleCache.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/TupleCache.java?view=diff&rev=520025&r1=520024&r2=520025
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/TupleCache.java
(original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/TupleCache.java
Mon Mar 19 10:50:49 2007
@@ -228,7 +228,7 @@
         boolean isAciModified = false;
         for ( int ii = 0; ii < mods.length; ii++ )
         {
-            isAciModified |= mods[ii].getAttribute().contains( ACI_ATTR );
+            isAciModified |= AttributeUtils.containsValueCaseIgnore( mods[ii].getAttribute(),
ACI_ATTR );
         }
         if ( isAciModified )
         {

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/support/RelatedProtectedItemFilter.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/support/RelatedProtectedItemFilter.java?view=diff&rev=520025&r1=520024&r2=520025
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/support/RelatedProtectedItemFilter.java
(original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/support/RelatedProtectedItemFilter.java
Mon Mar 19 10:50:49 2007
@@ -250,7 +250,10 @@
                     {
                         AttributeType attrType = attrRegistry.lookup( oid );
                         Attribute attr = AttributeUtils.getAttribute( entry, attrType );
-                        if ( attr != null && ( ( attr.contains( userName.toNormName()
) || attr.contains( userName.getUpName() ) ) ) )
+                        
+                        if ( ( attr != null ) && 
+                             ( ( AttributeUtils.containsValue( attr, userName.toNormName(),
attrType ) || 
+                               ( AttributeUtils.containsValue( attr, userName.getUpName(),
attrType ) ) ) ) )
                         {
                             return true;
                         }

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/support/RestrictedByFilter.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/support/RestrictedByFilter.java?view=diff&rev=520025&r1=520024&r2=520025
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/support/RestrictedByFilter.java
(original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/support/RestrictedByFilter.java
Mon Mar 19 10:50:49 2007
@@ -82,15 +82,19 @@
         for ( Iterator i = tuple.getProtectedItems().iterator(); i.hasNext(); )
         {
             ProtectedItem item = ( ProtectedItem ) i.next();
+            
             if ( item instanceof ProtectedItem.RestrictedBy )
             {
                 ProtectedItem.RestrictedBy rb = ( ProtectedItem.RestrictedBy ) item;
+            
                 for ( Iterator k = rb.iterator(); k.hasNext(); )
                 {
                     RestrictedByItem rbItem = ( RestrictedByItem ) k.next();
+                
                     if ( attrId.equalsIgnoreCase( rbItem.getAttributeType() ) )
                     {
                         Attribute attr = entry.get( rbItem.getValuesIn() );
+                        
                         if ( attr == null || !attr.contains( attrValue ) )
                         {
                             return true;

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/collective/CollectiveAttributeService.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/collective/CollectiveAttributeService.java?view=diff&rev=520025&r1=520024&r2=520025
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/collective/CollectiveAttributeService.java
(original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/collective/CollectiveAttributeService.java
Mon Mar 19 10:50:49 2007
@@ -47,6 +47,7 @@
 import org.apache.directory.shared.ldap.message.ModificationItemImpl;
 import org.apache.directory.shared.ldap.name.LdapDN;
 import org.apache.directory.shared.ldap.schema.AttributeType;
+import org.apache.directory.shared.ldap.util.AttributeUtils;
 
 
 /**
@@ -134,7 +135,7 @@
         
         if ( collectiveExclusions != null )
         {
-            if ( collectiveExclusions.contains( EXCLUDE_ALL_COLLECTIVE_ATTRIBUTES_OID )
+            if ( AttributeUtils.containsValueCaseIgnore( collectiveExclusions, EXCLUDE_ALL_COLLECTIVE_ATTRIBUTES_OID
)
                 || collectiveExclusions.contains( EXCLUDE_ALL_COLLECTIVE_ATTRIBUTES ) )
             {
                 /*



Mime
View raw message