Monotone-Parent: d5a35d507386b7213ff2f2e4f5f37c9c22f0c2ae

Monotone-Revision: a11424d99fd81b4c47bf7609d4e4e9ec4e1b0ab2

Monotone-Author: wsourdeau@inverse.ca
Monotone-Date: 2007-06-05T18:07:08
Monotone-Branch: ca.inverse.sogo
This commit is contained in:
Wolfgang Sourdeau
2007-06-05 18:07:08 +00:00
parent b71c015193
commit 031779e4e9
3 changed files with 34 additions and 38 deletions
+18 -15
View File
@@ -849,6 +849,7 @@
{
SOGoCalendarComponent *clientObject;
NSString *toolbarFilename;
iCalPerson *participant;
iCalPersonPartStat participationStatus;
SoSecurityManager *sm;
NSString *owner;
@@ -856,23 +857,16 @@
sm = [SoSecurityManager sharedSecurityManager];
clientObject = [self clientObject];
if (![sm validatePermission: SOGoCalendarPerm_ModifyComponent
onObject: clientObject
inContext: context])
{
if ([[clientObject componentTag] isEqualToString: @"vevent"])
toolbarFilename = @"SOGoAppointmentObject.toolbar";
else
toolbarFilename = @"SOGoTaskObject.toolbar";
}
else if (![sm validatePermission: SOGoCalendarPerm_RespondToComponent
onObject: clientObject
inContext: context])
owner = [clientObject ownerInContext: context];
participant = [clientObject findParticipantWithUID: owner];
if (participant
&& ![sm validatePermission: SOGoCalendarPerm_RespondToComponent
onObject: clientObject
inContext: context])
{
participationStatus = [participant participationStatus];
/* Lightning does not manage participation status within tasks */
owner = [clientObject ownerInContext: context];
participationStatus
= [[clientObject findParticipantWithUID: owner] participationStatus];
if (participationStatus == iCalPersonPartStatAccepted)
toolbarFilename = @"SOGoAppointmentObjectDecline.toolbar";
else if (participationStatus == iCalPersonPartStatDeclined)
@@ -880,6 +874,15 @@
else
toolbarFilename = @"SOGoAppointmentObjectAcceptOrDecline.toolbar";
}
else if (![sm validatePermission: SOGoCalendarPerm_ModifyComponent
onObject: clientObject
inContext: context])
{
if ([[clientObject componentTag] isEqualToString: @"vevent"])
toolbarFilename = @"SOGoAppointmentObject.toolbar";
else
toolbarFilename = @"SOGoTaskObject.toolbar";
}
else
toolbarFilename = @"SOGoComponentClose.toolbar";