From 8777bb2f29bb33fc68faae16437b8e9010c9e5e3 Mon Sep 17 00:00:00 2001 From: znek Date: Thu, 7 Jul 2005 14:29:05 +0000 Subject: [PATCH] fixed improper '&' escaping during generation of redirect URLs and changed logic to decide whether appointment belongs to the current user git-svn-id: http://svn.opengroupware.org/SOGo/trunk@690 d1b88da0-ebda-0310-925b-ed51d893ca5b --- SOGo/UI/SOGoUI/ChangeLog | 9 ++++++++- SOGo/UI/SOGoUI/UIxComponent.m | 13 +++++++++---- SOGo/UI/SOGoUI/Version | 2 +- SOGo/UI/Scheduler/ChangeLog | 12 ++++++++++++ SOGo/UI/Scheduler/UIxAppointmentEditor.m | 11 +++++------ SOGo/UI/Scheduler/UIxAppointmentView.m | 8 +++----- SOGo/UI/Scheduler/Version | 2 +- 7 files changed, 39 insertions(+), 18 deletions(-) diff --git a/SOGo/UI/SOGoUI/ChangeLog b/SOGo/UI/SOGoUI/ChangeLog index 5d3d3496..8393312a 100644 --- a/SOGo/UI/SOGoUI/ChangeLog +++ b/SOGo/UI/SOGoUI/ChangeLog @@ -1,8 +1,15 @@ 2005-07-07 Marcus Mueller + * v0.9.27 + + * UIxComponent.m: implicitly set the context's queryPathSeperator + when generating URIs used in redirects + + * v0.9.26 + * UIxComponent.m: added method -isAccessRestricted to indicate whether certain options might have to be disabled due to restrictions - set by the customer (v0.9.26) + set by the customer 2005-07-06 Helge Hess diff --git a/SOGo/UI/SOGoUI/UIxComponent.m b/SOGo/UI/SOGoUI/UIxComponent.m index 1b8c3424..8434265c 100644 --- a/SOGo/UI/SOGoUI/UIxComponent.m +++ b/SOGo/UI/SOGoUI/UIxComponent.m @@ -187,14 +187,19 @@ static BOOL uixDebugEnabled = NO; } - (NSString *)completeHrefForMethod:(NSString *)_method { + WOContext *ctx; NSDictionary *qp; - NSString *qs; - + NSString *qs, *qps; + qp = [self queryParameters]; if([qp count] == 0) return _method; - - qs = [[self context] queryStringFromDictionary:qp]; + + ctx = [self context]; + qps = [ctx queryPathSeparator]; + [ctx setQueryPathSeparator:@"&"]; + qs = [ctx queryStringFromDictionary:qp]; + [ctx setQueryPathSeparator:qps]; return [_method stringByAppendingFormat:@"?%@", qs]; } diff --git a/SOGo/UI/SOGoUI/Version b/SOGo/UI/SOGoUI/Version index f94f3e5d..e67137c3 100644 --- a/SOGo/UI/SOGoUI/Version +++ b/SOGo/UI/SOGoUI/Version @@ -1,5 +1,5 @@ # version file -SUBMINOR_VERSION:=26 +SUBMINOR_VERSION:=27 # v0.9.18 requires NGExtensions v4.5.136 diff --git a/SOGo/UI/Scheduler/ChangeLog b/SOGo/UI/Scheduler/ChangeLog index e1caccf9..85ba43f4 100644 --- a/SOGo/UI/Scheduler/ChangeLog +++ b/SOGo/UI/Scheduler/ChangeLog @@ -1,3 +1,15 @@ +2005-07-07 Marcus Mueller + + * v0.9.125 + + * UIxAppointmentEditor.m: Properly preserve organizer of appointments. + This is now also used to validate if user is allowed to edit an + appointment. + + * UIxAppointmentView.m: changed -isMyApt to test on organizer's email + address and user's email address to decide whether he is allowed + to edit the appointment in question. + 2005-07-06 Marcus Mueller * UIxAppointmentProposal.m: changed implementation of diff --git a/SOGo/UI/Scheduler/UIxAppointmentEditor.m b/SOGo/UI/Scheduler/UIxAppointmentEditor.m index b6e7f5c7..945711d7 100644 --- a/SOGo/UI/Scheduler/UIxAppointmentEditor.m +++ b/SOGo/UI/Scheduler/UIxAppointmentEditor.m @@ -42,6 +42,7 @@ NSString *title; NSString *location; NSString *comment; + iCalPerson *organizer; NSArray *participants; /* array of iCalPerson's */ NSArray *resources; /* array of iCalPerson's */ NSString *priority; @@ -128,6 +129,7 @@ [self->cycleUntilDate release]; [self->title release]; [self->location release]; + [self->organizer release]; [self->comment release]; [self->participants release]; [self->resources release]; @@ -751,6 +753,7 @@ self->comment = [[_appointment comment] copy]; self->priority = [[_appointment priority] copy]; self->categories = [[_appointment categories] retain]; + self->organizer = [[_appointment organizer] retain]; self->participants = [[_appointment participants] retain]; self->resources = [[_appointment resources] retain]; @@ -781,6 +784,7 @@ [_appointment setAccessClass:[self accessClass]]; [_appointment setTransparency:[self transparency]]; + [_appointment setOrganizer:self->organizer]; attendees = [self participants]; lResources = [self resources]; if ([lResources count] > 0) { @@ -819,12 +823,7 @@ /* access */ - (BOOL)isMyApt { - NSString *owner; - - owner = [[self clientObject] ownerInContext:[self context]]; - if (!owner) - return YES; - return [owner isEqualToString:[[self user] login]]; + return [[self->organizer rfc822Email] isEqualToString:[self emailForUser]]; } - (BOOL)canAccessApt { diff --git a/SOGo/UI/Scheduler/UIxAppointmentView.m b/SOGo/UI/Scheduler/UIxAppointmentView.m index 8ecdabb5..f53d5c4f 100644 --- a/SOGo/UI/Scheduler/UIxAppointmentView.m +++ b/SOGo/UI/Scheduler/UIxAppointmentView.m @@ -171,12 +171,10 @@ /* access */ - (BOOL)isMyApt { - NSString *owner; + iCalPerson *organizer; - owner = [[self clientObject] ownerInContext:[self context]]; - if (!owner) - return YES; - return [owner isEqualToString:[[self user] login]]; + organizer = [[self appointment] organizer]; + return [[organizer rfc822Email] isEqualToString:[self emailForUser]]; } - (BOOL)canAccessApt { diff --git a/SOGo/UI/Scheduler/Version b/SOGo/UI/Scheduler/Version index 8d3f6d07..9532d649 100644 --- a/SOGo/UI/Scheduler/Version +++ b/SOGo/UI/Scheduler/Version @@ -1,6 +1,6 @@ # Version file -SUBMINOR_VERSION:=124 +SUBMINOR_VERSION:=125 # v0.9.123 requires Appointments v0.9.35 # v0.9.123 requires SOGoUI v0.9.24 -- 2.39.5