mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-10-11 14:57:12 +00:00
ModulesConstraints tests all values of a multi-valued attributes
This commit is contained in:
1 parent
e2f192b793
commit
1c3f1af662
1 file changed
+8
-9
@@ -887,7 +887,7 @@ static Class NSStringK;
|
||||
intoLDIFRecord: (NSMutableDictionary *) ldifRecord
|
||||
{
|
||||
NSDictionary *constraints;
|
||||
NSEnumerator *matches;
|
||||
NSEnumerator *matches, *ldapValues;
|
||||
NSString *currentMatch, *currentValue, *ldapValue;
|
||||
BOOL result;
|
||||
|
||||
@@ -897,16 +897,15 @@ static Class NSStringK;
|
||||
if (constraints)
|
||||
{
|
||||
matches = [[constraints allKeys] objectEnumerator];
|
||||
currentMatch = [matches nextObject];
|
||||
while (result && currentMatch)
|
||||
while (result == YES && (currentMatch = [matches nextObject]))
|
||||
{
|
||||
ldapValue = [[ldapEntry attributeWithName: currentMatch]
|
||||
stringValueAtIndex: 0];
|
||||
ldapValues = [[[ldapEntry attributeWithName: currentMatch] allStringValues] objectEnumerator];
|
||||
currentValue = [constraints objectForKey: currentMatch];
|
||||
if ([ldapValue caseInsensitiveMatches: currentValue])
|
||||
currentMatch = [matches nextObject];
|
||||
else
|
||||
result = NO;
|
||||
result = NO;
|
||||
|
||||
while (result == NO && (ldapValue = [ldapValues nextObject]))
|
||||
if ([ldapValue caseInsensitiveMatches: currentValue])
|
||||
result = YES;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user