Monotone-Parent: 6a2b142b86238b6988137e5c25e428fc7a5f4ef7
Monotone-Revision: 7c8ba9069f41df75eb34d37babf6ea5227a77d28 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2007-07-04T20:12:28 Monotone-Branch: ca.inverse.sogomaint-2.0.2
parent
2ba7ae4c89
commit
5abb31baf0
|
@ -1,5 +1,10 @@
|
|||
2007-07-04 Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
||||
|
||||
* SoObjects/Appointments/SOGoCalendarComponent.m
|
||||
([SOGoCalendarComponent -contentAsString]): we return the content
|
||||
based on the permissions returned by the security manager instead
|
||||
of by looking at the user roles.
|
||||
|
||||
* SoObjects/Appointments/SOGoAppointmentFolder.m
|
||||
([SOGoAppointmentFolder -calendarFolders]): read the calendar
|
||||
folders of the user to whom this folder belongs instead of the
|
||||
|
|
|
@ -111,23 +111,38 @@ static BOOL sendEMailNotifications = NO;
|
|||
|
||||
- (NSString *) contentAsString
|
||||
{
|
||||
NSString *uid;
|
||||
iCalCalendar *tmpCalendar;
|
||||
iCalRepeatableEntityObject *tmpComponent;
|
||||
NSArray *roles;
|
||||
// NSArray *roles;
|
||||
// NSString *uid;
|
||||
SoSecurityManager *sm;
|
||||
|
||||
if (!calContent)
|
||||
{
|
||||
uid = [[context activeUser] login];
|
||||
roles = [self aclsForUser: uid];
|
||||
if ([roles containsObject: SOGoCalendarRole_Organizer]
|
||||
|| [roles containsObject: SOGoCalendarRole_Participant]
|
||||
|| [roles containsObject: SOGoCalendarRole_ComponentViewer])
|
||||
{
|
||||
calContent = content;
|
||||
[calContent retain];
|
||||
}
|
||||
else if ([roles containsObject: SOGoCalendarRole_ComponentDAndTViewer])
|
||||
// uid = [[context activeUser] login];
|
||||
// roles = [self aclsForUser: uid];
|
||||
// if ([roles containsObject: SOGoCalendarRole_Organizer]
|
||||
// || [roles containsObject: SOGoCalendarRole_Participant]
|
||||
// || [roles containsObject: SOGoCalendarRole_ComponentViewer])
|
||||
// calContent = content;
|
||||
// else if ([roles containsObject: SOGoCalendarRole_ComponentDAndTViewer])
|
||||
// {
|
||||
// tmpCalendar = [[self calendar: NO] copy];
|
||||
// tmpComponent = (iCalRepeatableEntityObject *)
|
||||
// [tmpCalendar firstChildWithTag: [self componentTag]];
|
||||
// [self _filterComponent: tmpComponent];
|
||||
// calContent = [tmpCalendar versitString];
|
||||
// [tmpCalendar release];
|
||||
// }
|
||||
// else
|
||||
// calContent = nil;
|
||||
|
||||
sm = [SoSecurityManager sharedSecurityManager];
|
||||
if (![sm validatePermission: SOGoCalendarPerm_ViewAllComponent
|
||||
onObject: self inContext: context])
|
||||
calContent = content;
|
||||
else if (![sm validatePermission: SOGoCalendarPerm_ViewDAndT
|
||||
onObject: self inContext: context])
|
||||
{
|
||||
tmpCalendar = [[self calendar: NO] copy];
|
||||
tmpComponent = (iCalRepeatableEntityObject *)
|
||||
|
@ -606,7 +621,6 @@ static BOOL sendEMailNotifications = NO;
|
|||
else if ([roles containsObject: SOGoRole_ObjectCreator])
|
||||
[roles addObject: SOGoCalendarRole_Organizer];
|
||||
}
|
||||
// }
|
||||
|
||||
return roles;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue