From d4f2403ba712a47488cb5a2e9a132b948692bb57 Mon Sep 17 00:00:00 2001 From: Wolfgang Sourdeau Date: Tue, 24 Apr 2007 22:40:05 +0000 Subject: [PATCH] Monotone-Parent: d50828fc631dc9f6d731dcbde3c7ea33f6c422d9 Monotone-Revision: fbd35c1bda900f820e4a0b103f299f77ae52fa16 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2007-04-24T22:40:05 Monotone-Branch: ca.inverse.sogo --- ChangeLog | 6 ++++ .../Appointments/SOGoCalendarComponent.m | 4 +-- SoObjects/SOGo/SOGoPermissions.h | 25 +++++++++++---- SoObjects/SOGo/SOGoPermissions.m | 31 +++++++++++++------ 4 files changed, 49 insertions(+), 17 deletions(-) diff --git a/ChangeLog b/ChangeLog index 59acc4d64..9c7da513c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,11 @@ 2007-04-24 Wolfgang Sourdeau + * SoObjects/SOGo/SOGoPermissions.[hm]: added + [Public,Private,Confidential] + x[Viewer,DAndTViewer,Responder,Modifier]. Renamed + SOGoRole_ORganizer to SOGoCalendarRole_Organizer. Same for + ..._Participant. Removed SOGoRole_Assistant and SOGoRole_Delegate. + * SoObjects/Appointments/SOGoAppointmentFolder.m ([SOGoAppointmentFolder -defaultAclRoles]): new overriden method that defines default roles for new elements in the acl. diff --git a/SoObjects/Appointments/SOGoCalendarComponent.m b/SoObjects/Appointments/SOGoCalendarComponent.m index d240805a3..389dcb47b 100644 --- a/SoObjects/Appointments/SOGoCalendarComponent.m +++ b/SoObjects/Appointments/SOGoCalendarComponent.m @@ -450,9 +450,9 @@ static BOOL sendEMailNotifications = NO; if (component) { if ([component isOrganizer: email]) - [sogoRoles addObject: SOGoRole_Organizer]; + [sogoRoles addObject: SOGoCalendarRole_Organizer]; else if ([component isParticipant: email]) - [sogoRoles addObject: SOGoRole_Participant]; + [sogoRoles addObject: SOGoCalendarRole_Participant]; else if ([[container ownerInContext: context] isEqualToString: login]) [sogoRoles addObject: SoRole_Owner]; } diff --git a/SoObjects/SOGo/SOGoPermissions.h b/SoObjects/SOGo/SOGoPermissions.h index 5f0e51cce..54cd49945 100644 --- a/SoObjects/SOGo/SOGoPermissions.h +++ b/SoObjects/SOGo/SOGoPermissions.h @@ -27,16 +27,29 @@ #import -extern NSString *SOGoRole_Assistant; -extern NSString *SOGoRole_Delegate; -extern NSString *SOGoRole_FreeBusyLookup; +extern NSString *SOGoRole_ObjectCreator; +extern NSString *SOGoRole_ObjectEraser; + extern NSString *SOGoRole_FreeBusy; +extern NSString *SOGoRole_FreeBusyLookup; extern NSString *SOGoPerm_ReadAcls; -extern NSString *SOGoPerm_CreateAndModifyAcls; extern NSString *SOGoPerm_FreeBusyLookup; -extern NSString *SOGoRole_Organizer; -extern NSString *SOGoRole_Participant; +extern NSString *SOGoCalendarRole_Organizer; +extern NSString *SOGoCalendarRole_Participant; + +extern NSString *SOGoCalendarRole_PublicViewer; +extern NSString *SOGoCalendarRole_PublicDAndTViewer; +extern NSString *SOGoCalendarRole_PublicModifier; +extern NSString *SOGoCalendarRole_PublicResponder; +extern NSString *SOGoCalendarRole_PrivateViewer; +extern NSString *SOGoCalendarRole_PrivateDAndTViewer; +extern NSString *SOGoCalendarRole_PrivateModifier; +extern NSString *SOGoCalendarRole_PrivateResponder; +extern NSString *SOGoCalendarRole_ConfidentialViewer; +extern NSString *SOGoCalendarRole_ConfidentialDAndTViewer; +extern NSString *SOGoCalendarRole_ConfidentialModifier; +extern NSString *SOGoCalendarRole_ConfidentialResponder; #endif /* SOGOPERMISSIONS_H */ diff --git a/SoObjects/SOGo/SOGoPermissions.m b/SoObjects/SOGo/SOGoPermissions.m index 1b856bb26..06c7236d1 100644 --- a/SoObjects/SOGo/SOGoPermissions.m +++ b/SoObjects/SOGo/SOGoPermissions.m @@ -22,25 +22,38 @@ #import "SOGoPermissions.h" -NSString *SOGoRole_Assistant = @"Assistant"; /* a colleague */ -NSString *SOGoRole_Delegate = @"Delegate"; /* a colleague or person that I - trust in adding or modifying my - data */ +/* General */ +NSString *SOGoRole_ObjectCreator = @"ObjectCreator"; +NSString *SOGoRole_ObjectEraser = @"ObjectEraser"; + +NSString *SOGoRole_FreeBusy = @"FreeBusy"; /* for the "freebusy" special user + */ NSString *SOGoRole_FreeBusyLookup = @"FreeBusyLookup"; /* for users that have access to the freebusy information from a specific calendar */ -NSString *SOGoRole_FreeBusy = @"FreeBusy"; /* for the "freebusy" special user - */ /* Calendar */ -NSString *SOGoRole_Organizer = @"Organizer"; -NSString *SOGoRole_Participant = @"Participant"; +NSString *SOGoCalendarRole_Organizer = @"Organizer"; +NSString *SOGoCalendarRole_Participant = @"Participant"; +NSString *SOGoCalendarRole_PublicViewer = @"PublicViewer"; +NSString *SOGoCalendarRole_PublicDAndTViewer = @"PublicDAndTViewer"; +NSString *SOGoCalendarRole_PublicModifier = @"PublicModifier"; +NSString *SOGoCalendarRole_PublicResponder = @"PublicResponder"; +NSString *SOGoCalendarRole_PrivateViewer = @"PrivateViewer"; +NSString *SOGoCalendarRole_PrivateDAndTViewer = @"PrivateDAndTViewer"; +NSString *SOGoCalendarRole_PrivateModifier = @"PrivateModifier"; +NSString *SOGoCalendarRole_PrivateResponder = @"PrivateResponder"; +NSString *SOGoCalendarRole_ConfidentialViewer = @"ConfidentialViewer"; +NSString *SOGoCalendarRole_ConfidentialDAndTViewer = @"ConfidentialDAndTViewer"; +NSString *SOGoCalendarRole_ConfidentialModifier = @"ConfidentialModifier"; +NSString *SOGoCalendarRole_ConfidentialResponder = @"ConfidentialResponder"; + +/* permissions */ #warning ReadAcls still not used... NSString *SOGoPerm_ReadAcls = @"ReadAcls"; /* the equivalent of "read-acl" in the WebDAV acls spec, which is currently missing from SOPE */ -NSString *SOGoPerm_CreateAndModifyAcls = @"CreateAndModifyAcls"; NSString *SOGoPerm_FreeBusyLookup = @"FreeBusyLookup";