Monotone-Parent: 6a2b142b86238b6988137e5c25e428fc7a5f4ef7
Monotone-Revision: 7c8ba9069f41df75eb34d37babf6ea5227a77d28 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2007-07-04T20:12:28 Monotone-Branch: ca.inverse.sogo
This commit is contained in:
parent
2ba7ae4c89
commit
5abb31baf0
|
@ -1,5 +1,10 @@
|
||||||
2007-07-04 Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
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
|
* SoObjects/Appointments/SOGoAppointmentFolder.m
|
||||||
([SOGoAppointmentFolder -calendarFolders]): read the calendar
|
([SOGoAppointmentFolder -calendarFolders]): read the calendar
|
||||||
folders of the user to whom this folder belongs instead of the
|
folders of the user to whom this folder belongs instead of the
|
||||||
|
|
|
@ -111,23 +111,38 @@ static BOOL sendEMailNotifications = NO;
|
||||||
|
|
||||||
- (NSString *) contentAsString
|
- (NSString *) contentAsString
|
||||||
{
|
{
|
||||||
NSString *uid;
|
|
||||||
iCalCalendar *tmpCalendar;
|
iCalCalendar *tmpCalendar;
|
||||||
iCalRepeatableEntityObject *tmpComponent;
|
iCalRepeatableEntityObject *tmpComponent;
|
||||||
NSArray *roles;
|
// NSArray *roles;
|
||||||
|
// NSString *uid;
|
||||||
|
SoSecurityManager *sm;
|
||||||
|
|
||||||
if (!calContent)
|
if (!calContent)
|
||||||
{
|
{
|
||||||
uid = [[context activeUser] login];
|
// uid = [[context activeUser] login];
|
||||||
roles = [self aclsForUser: uid];
|
// roles = [self aclsForUser: uid];
|
||||||
if ([roles containsObject: SOGoCalendarRole_Organizer]
|
// if ([roles containsObject: SOGoCalendarRole_Organizer]
|
||||||
|| [roles containsObject: SOGoCalendarRole_Participant]
|
// || [roles containsObject: SOGoCalendarRole_Participant]
|
||||||
|| [roles containsObject: SOGoCalendarRole_ComponentViewer])
|
// || [roles containsObject: SOGoCalendarRole_ComponentViewer])
|
||||||
{
|
// calContent = content;
|
||||||
calContent = content;
|
// else if ([roles containsObject: SOGoCalendarRole_ComponentDAndTViewer])
|
||||||
[calContent retain];
|
// {
|
||||||
}
|
// tmpCalendar = [[self calendar: NO] copy];
|
||||||
else if ([roles containsObject: SOGoCalendarRole_ComponentDAndTViewer])
|
// 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];
|
tmpCalendar = [[self calendar: NO] copy];
|
||||||
tmpComponent = (iCalRepeatableEntityObject *)
|
tmpComponent = (iCalRepeatableEntityObject *)
|
||||||
|
@ -606,7 +621,6 @@ static BOOL sendEMailNotifications = NO;
|
||||||
else if ([roles containsObject: SOGoRole_ObjectCreator])
|
else if ([roles containsObject: SOGoRole_ObjectCreator])
|
||||||
[roles addObject: SOGoCalendarRole_Organizer];
|
[roles addObject: SOGoCalendarRole_Organizer];
|
||||||
}
|
}
|
||||||
// }
|
|
||||||
|
|
||||||
return roles;
|
return roles;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue