Merge pull request #209 from extrafu/master

Latest OpenChange changes from Zentyal
This commit is contained in:
extrafu
2016-05-17 13:57:57 -04:00
79 changed files with 3222 additions and 1986 deletions
+15 -16
View File
@@ -57,25 +57,24 @@
{
NSEnumerator *roles, *types;
NSString *role, *type;
unsigned int length;
roles = [userRights objectEnumerator];
role = [roles nextObject];
while (role)
types = [[self rightTypes] objectEnumerator];
type = [types nextObject];
while (type)
{
types = [[self rightTypes] objectEnumerator];
type = [types nextObject];
while (type)
{
if ([role hasPrefix: type])
{
length = [type length];
[rights setObject: [role substringFromIndex: length]
forKey: type];
}
type = [types nextObject];
}
roles = [userRights objectEnumerator];
role = [roles nextObject];
while (role)
{
if ([role hasPrefix: type])
{
[rights setObject: [role substringFromIndex: [type length]]
forKey: type];
break;
}
role = [roles nextObject];
}
type = [types nextObject];
}
}