mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-05-20 10:55:25 +00:00
Monotone-Parent: 24ff1bd62261a24e843c0f320edf145b616d797d
Monotone-Revision: 23b6e321c419c2dceeab0740f6617c507e8ce448 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2007-03-28T18:20:05 Monotone-Branch: ca.inverse.sogo
This commit is contained in:
@@ -130,62 +130,4 @@ static NSMutableArray *yearMenuItems = nil;
|
||||
return response;
|
||||
}
|
||||
|
||||
- (NSString *) _rightsForUIDs: (NSString *) uids
|
||||
{
|
||||
NSEnumerator *ids;
|
||||
NSString *uid;
|
||||
NSMutableString *rights;
|
||||
SOGoAppointmentFolder *refFolder, *currentFolder;
|
||||
SoSecurityManager *securityManager;
|
||||
BOOL result;
|
||||
|
||||
securityManager = [SoSecurityManager sharedSecurityManager];
|
||||
refFolder = [self clientObject];
|
||||
|
||||
rights = [NSMutableString string];
|
||||
if ([uids length] > 0)
|
||||
{
|
||||
ids = [[uids componentsSeparatedByString: @","] objectEnumerator];
|
||||
uid = [ids nextObject];
|
||||
while (uid)
|
||||
{
|
||||
currentFolder
|
||||
= [refFolder
|
||||
lookupCalendarFolderForUID: (([uid hasPrefix: @"-"])
|
||||
? [uid substringFromIndex: 1]
|
||||
: uid)];
|
||||
result = (![securityManager validatePermission: SoPerm_AccessContentsInformation
|
||||
onObject: currentFolder
|
||||
inContext: context]);
|
||||
if ([rights length] == 0)
|
||||
[rights appendFormat: @"%d", result];
|
||||
else
|
||||
[rights appendFormat: @",%d", result];
|
||||
uid = [ids nextObject];
|
||||
}
|
||||
}
|
||||
|
||||
return rights;
|
||||
}
|
||||
|
||||
- (id <WOActionResults>) checkRightsAction
|
||||
{
|
||||
WOResponse *response;
|
||||
NSUserDefaults *ud;
|
||||
NSString *uids, *rights;
|
||||
|
||||
ud = [[context activeUser] userDefaults];
|
||||
uids = [ud stringForKey: @"calendaruids"];
|
||||
|
||||
response = [context response];
|
||||
[response setStatus: 200];
|
||||
[response setHeader: @"text/plain; charset=\"utf-8\""
|
||||
forKey: @"content-type"];
|
||||
|
||||
rights = [self _rightsForUIDs: uids];
|
||||
[response appendContentString: rights];
|
||||
|
||||
return response;
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
Reference in New Issue
Block a user