Monotone-Parent: 383ee921a819c519f6f0303f90a0c3b887974b85
Monotone-Revision: eab6dcca819997db03071b70fa3cb43b3b72b73a Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2006-11-07T18:15:29 Monotone-Branch: ca.inverse.sogo
This commit is contained in:
parent
66591b628c
commit
8ee34448e3
|
@ -350,10 +350,10 @@
|
|||
[self setICalString:ical];
|
||||
[self loadValuesFromAppointment: [self appointmentFromString: ical]];
|
||||
|
||||
if (![self canEditComponent]) {
|
||||
/* TODO: we need proper ACLs */
|
||||
return [self redirectToLocation: [self completeURIForMethod: @"../view"]];
|
||||
}
|
||||
// if (![self canEditComponent]) {
|
||||
// /* TODO: we need proper ACLs */
|
||||
// return [self redirectToLocation: [self completeURIForMethod: @"../view"]];
|
||||
// }
|
||||
return self;
|
||||
}
|
||||
|
||||
|
@ -453,7 +453,8 @@
|
|||
inContext:[self context]];
|
||||
if (ex != nil) return ex;
|
||||
|
||||
return [self redirectToLocation: [self completeURIForMethod: @"../view"]];
|
||||
return self;
|
||||
// return [self redirectToLocation: [self completeURIForMethod: @"../view"]];
|
||||
}
|
||||
|
||||
@end /* UIxAppointmentEditor */
|
||||
|
|
|
@ -42,6 +42,8 @@
|
|||
#import <SOGo/AgenorUserManager.h>
|
||||
#import <SOGo/SOGoUser.h>
|
||||
#import <SOGoUI/SOGoDateFormatter.h>
|
||||
#import <SoObjects/Appointments/SOGoAppointmentObject.h>
|
||||
#import <SoObjects/Appointments/SOGoTaskObject.h>
|
||||
|
||||
#import "UIxComponent+Agenor.h"
|
||||
|
||||
|
@ -567,8 +569,7 @@
|
|||
- (BOOL) isMyComponent
|
||||
{
|
||||
// TODO: this should check a set of emails against the SoUser
|
||||
return (![[organizer email] length]
|
||||
|| [[organizer rfc822Email] isEqualToString: [self emailForUser]]);
|
||||
return ([[organizer rfc822Email] isEqualToString: [self emailForUser]]);
|
||||
}
|
||||
|
||||
- (BOOL) canAccessComponent
|
||||
|
@ -810,4 +811,48 @@
|
|||
return classes;
|
||||
}
|
||||
|
||||
- (NSString *) toolbar
|
||||
{
|
||||
NSString *filename, *myEmail;
|
||||
iCalEntityObject *calObject;
|
||||
iCalPersonPartStat myParticipationStatus;
|
||||
id co;
|
||||
BOOL isEditable;
|
||||
|
||||
co = [self clientObject];
|
||||
isEditable = YES;
|
||||
if ([co isKindOfClass: [SOGoAppointmentObject class]])
|
||||
calObject = (iCalEntityObject *) [co event];
|
||||
else if ([co isKindOfClass: [SOGoTaskObject class]])
|
||||
calObject = (iCalEntityObject *) [co task];
|
||||
else
|
||||
isEditable = NO;
|
||||
if (isEditable)
|
||||
{
|
||||
myEmail = [[[self context] activeUser] email];
|
||||
if ([self canEditComponent])
|
||||
filename = @"SOGoAppointmentObject.toolbar";
|
||||
else
|
||||
{
|
||||
if ([calObject isParticipant: myEmail])
|
||||
{
|
||||
myParticipationStatus
|
||||
= [[calObject findParticipantWithEmail: myEmail] participationStatus];
|
||||
if (myParticipationStatus == iCalPersonPartStatAccepted)
|
||||
filename = @"SOGoAppointmentObjectDecline.toolbar";
|
||||
else if (myParticipationStatus == iCalPersonPartStatDeclined)
|
||||
filename = @"SOGoAppointmentObjectAccept.toolbar";
|
||||
else
|
||||
filename = @"SOGoAppointmentObjectAcceptOrDecline.toolbar";
|
||||
}
|
||||
else
|
||||
filename = @"";
|
||||
}
|
||||
}
|
||||
else
|
||||
filename = @"";
|
||||
|
||||
return filename;
|
||||
}
|
||||
|
||||
@end
|
||||
|
|
|
@ -321,10 +321,10 @@
|
|||
[self setICalString:ical];
|
||||
[self loadValuesFromTask: [self taskFromString: ical]];
|
||||
|
||||
if (![self canEditComponent]) {
|
||||
/* TODO: we need proper ACLs */
|
||||
return [self redirectToLocation: [self completeURIForMethod: @"../view"]];
|
||||
}
|
||||
// if (![self canEditComponent]) {
|
||||
// /* TODO: we need proper ACLs */
|
||||
// return [self redirectToLocation: [self completeURIForMethod: @"../view"]];
|
||||
// }
|
||||
|
||||
return self;
|
||||
}
|
||||
|
@ -460,7 +460,8 @@
|
|||
inContext:[self context]];
|
||||
if (ex != nil) return ex;
|
||||
|
||||
return [self redirectToLocation: [self completeURIForMethod:@"../view"]];
|
||||
return self;
|
||||
// return [self redirectToLocation: [self completeURIForMethod:@"../view"]];
|
||||
}
|
||||
|
||||
- (void) setHasStartDate: (BOOL) aBool
|
||||
|
|
Loading…
Reference in a new issue