mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-08-22 07:03:19 +00:00
Monotone-Parent: 4f816dc3f00ef57497bb9cff9370cf0b8a272fc6
Monotone-Revision: 90a65543c12f64be022dceaada5327dafced8237 Monotone-Author: flachapelle@inverse.ca Monotone-Date: 2007-11-09T19:45:18 Monotone-Branch: ca.inverse.sogo
This commit is contained in:
@@ -335,9 +335,23 @@
|
||||
SOGoAppointmentFolder *calendar, *currentCalendar;
|
||||
SOGoAppointmentFolders *calendarParent;
|
||||
NSEnumerator *allCalendars;
|
||||
SoSecurityManager *sm;
|
||||
NSString *perm, *privacy;
|
||||
|
||||
if (!calendarList)
|
||||
{
|
||||
sm = [SoSecurityManager sharedSecurityManager];
|
||||
if ([[self clientObject] isNew])
|
||||
perm = SoPerm_AddDocumentsImagesAndFiles;
|
||||
else {
|
||||
privacy = [component accessClass];
|
||||
if ([privacy isEqualToString: @"PRIVATE"])
|
||||
perm = SOGoCalendarPerm_ModifyPrivateRecords;
|
||||
else if ([privacy isEqualToString: @"CONFIDENTIAL"])
|
||||
perm = SOGoCalendarPerm_ModifyConfidentialRecords;
|
||||
else
|
||||
perm = SOGoCalendarPerm_ModifyPublicRecords;
|
||||
}
|
||||
calendarList = [NSMutableArray new];
|
||||
calendar = [[self clientObject] container];
|
||||
calendarParent = [calendar container];
|
||||
@@ -345,7 +359,9 @@
|
||||
currentCalendar = [allCalendars nextObject];
|
||||
while (currentCalendar)
|
||||
{
|
||||
if ([currentCalendar isActive])
|
||||
if (![sm validatePermission: perm
|
||||
onObject: currentCalendar
|
||||
inContext: context])
|
||||
[calendarList addObject: currentCalendar];
|
||||
currentCalendar = [allCalendars nextObject];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user