You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by tr...@apache.org on 2005/09/30 06:41:48 UTC
svn commit: r292630 -
/directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/authz/support/RestrictedByFilter.java
Author: trustin
Date: Thu Sep 29 21:41:43 2005
New Revision: 292630
URL: http://svn.apache.org/viewcvs?rev=292630&view=rev
Log:
Fixed a bug that RectrictedByFilter is applied to unrelated attributes.
Modified:
directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/authz/support/RestrictedByFilter.java
Modified: directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/authz/support/RestrictedByFilter.java
URL: http://svn.apache.org/viewcvs/directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/authz/support/RestrictedByFilter.java?rev=292630&r1=292629&r2=292630&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/authz/support/RestrictedByFilter.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/authz/support/RestrictedByFilter.java Thu Sep 29 21:41:43 2005
@@ -54,7 +54,7 @@
continue;
}
- if( isRemovable( tuple, attrValue, entry ) )
+ if( isRemovable( tuple, attrId, attrValue, entry ) )
{
i.remove();
}
@@ -63,7 +63,7 @@
return tuples;
}
- public boolean isRemovable( ACITuple tuple, Object attrValue, Attributes entry )
+ public boolean isRemovable( ACITuple tuple, String attrId, Object attrValue, Attributes entry )
{
for( Iterator i = tuple.getProtectedItems().iterator(); i.hasNext(); )
{
@@ -74,10 +74,13 @@
for( Iterator k = rb.iterator(); k.hasNext(); )
{
RestrictedByItem rbItem = ( RestrictedByItem ) k.next();
- Attribute attr = entry.get( rbItem.getValuesIn() );
- if( attr == null || !attr.contains( attrValue ) )
+ if( attrId.equalsIgnoreCase( rbItem.getAttributeType() ) )
{
- return true;
+ Attribute attr = entry.get( rbItem.getValuesIn() );
+ if( attr == null || !attr.contains( attrValue ) )
+ {
+ return true;
+ }
}
}
}