mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-05-13 15:35:30 +00:00
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:
@@ -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";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user