See ChangeLog

Monotone-Parent: c6303bf32ace41498a75993116922dcd96cd4ad5
Monotone-Revision: 6b0d38e3817a056f1bb60d2484e9c2bc8bd02234

Monotone-Author: flachapelle@inverse.ca
Monotone-Date: 2009-07-27T21:36:03
Monotone-Branch: ca.inverse.sogo
This commit is contained in:
Francis Lachapelle committed 2009-07-27 21:36:03 +00:00
1 parent 919858a559
commit e7788ac76e
2 files changed
+26 -13

No files matched your search

+19 -13
View File
@@ -2449,7 +2449,7 @@ firstInstanceCalendarDateRange: (NGCalendarDateRange *) fir
- (NSString *) roleForComponentsWithAccessClass: (iCalAccessClass) accessClass
forUser: (NSString *) uid
{
NSString *accessRole, *prefix, *currentRole, *suffix;
NSString *accessRole, *ownerLogin, *prefix, *currentRole, *suffix;
NSEnumerator *acls;
NSMutableDictionary *userRoles;
@@ -2468,22 +2468,28 @@ firstInstanceCalendarDateRange: (NGCalendarDateRange *) fir
userRoles = [NSMutableDictionary dictionaryWithCapacity: 3];
[aclMatrix setObject: userRoles forKey: uid];
}
accessRole = [userRoles objectForKey: prefix];
if (!accessRole)
{
acls = [[self aclsForUser: uid] objectEnumerator];
currentRole = [acls nextObject];
while (currentRole && !accessRole)
if ([currentRole hasPrefix: prefix])
{
suffix = [currentRole substringFromIndex: [prefix length]];
accessRole = [NSString stringWithFormat: @"Component%@", suffix];
}
else
currentRole = [acls nextObject];
if (!accessRole)
ownerLogin = [self ownerInContext: context];
if ([ownerLogin isEqualToString: uid])
accessRole = @"";
else
{
acls = [[self aclsForUser: uid] objectEnumerator];
currentRole = [acls nextObject];
while (currentRole && !accessRole)
if ([currentRole hasPrefix: prefix])
{
suffix = [currentRole substringFromIndex: [prefix length]];
accessRole = [NSString stringWithFormat: @"Component%@", suffix];
}
else
currentRole = [acls nextObject];
if (!accessRole)
accessRole = @"";
}
[userRoles setObject: accessRole forKey: prefix];
}