Monotone-Parent: b8ad0061e865a522c79c6a19bc8d7841469af81a

Monotone-Revision: 7f2779135e9501efcfbb73fce0b3d244687ecaa4

Monotone-Author: wsourdeau@inverse.ca
Monotone-Date: 2010-06-03T14:43:38
Monotone-Branch: ca.inverse.sogo
This commit is contained in:
Wolfgang Sourdeau
2010-06-03 14:43:38 +00:00
parent ba2b9aad81
commit 0959a88ea9
49 changed files with 280 additions and 118 deletions
+9 -12
View File
@@ -85,16 +85,11 @@
NSEnumerator *commonRights;
NSString *currentCommonRight;
rightsForType = [NSMutableArray new];
[rightsForType autorelease];
rightsForType = [NSMutableArray arrayWithCapacity: 5];
commonRights = [[self objectRights] objectEnumerator];
currentCommonRight = [commonRights nextObject];
while (currentCommonRight)
{
[rightsForType addObject: [NSString stringWithFormat: @"%@%@",
type, currentCommonRight]];
currentCommonRight = [commonRights nextObject];
}
while ((currentCommonRight = [commonRights nextObject]))
[rightsForType addObject: [NSString stringWithFormat: @"%@%@",
type, currentCommonRight]];
return rightsForType;
}
@@ -137,9 +132,11 @@
- (NSArray *) objectRights
{
return
[NSArray arrayWithObjects:
@"Viewer", @"DAndTViewer", @"Modifier", @"Responder", @"None", nil];
return ([uid isEqualToString: @"anonymous"]
? [NSArray arrayWithObjects: @"Viewer", @"DAndTViewer", @"None",
nil]
: [NSArray arrayWithObjects: @"Viewer", @"DAndTViewer", @"Modifier",
@"Responder", @"None", nil]);
}
- (void) setCurrentRight: (NSString *) newCurrentRight