From: znek Date: Thu, 21 Jul 2005 16:51:21 +0000 (+0000) Subject: fixed SOGo Bug #1493. X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=20c6e374d48c82359daf3f9954eeb3f9c312a24f;p=scalable-opengroupware.org fixed SOGo Bug #1493. git-svn-id: http://svn.opengroupware.org/SOGo/trunk@886 d1b88da0-ebda-0310-925b-ed51d893ca5b --- diff --git a/SOGo/UI/Scheduler/ChangeLog b/SOGo/UI/Scheduler/ChangeLog index 9d9f0a52..a98882ab 100644 --- a/SOGo/UI/Scheduler/ChangeLog +++ b/SOGo/UI/Scheduler/ChangeLog @@ -1,5 +1,10 @@ 2005-07-21 Marcus Mueller + * v0.9.145 + + * UIxAppointmentView.m: fixed -isMyApt and -canAccessApt to do the + proper things + * v0.9.144 * UIxCalInlineAptView.m: reworked the way styles are produced now. diff --git a/SOGo/UI/Scheduler/UIxAppointmentView.m b/SOGo/UI/Scheduler/UIxAppointmentView.m index b6394dc7..b8c5730f 100644 --- a/SOGo/UI/Scheduler/UIxAppointmentView.m +++ b/SOGo/UI/Scheduler/UIxAppointmentView.m @@ -193,19 +193,30 @@ /* access */ - (BOOL)isMyApt { + NSString *email; iCalPerson *organizer; - + + email = [[[self context] activeUser] email]; organizer = [[self appointment] organizer]; if (!organizer) return YES; // assume this is correct to do, right? - return [[organizer rfc822Email] isEqualToString:[self emailForUser]]; + return [[organizer rfc822Email] isEqualToString:email]; } - (BOOL)canAccessApt { + NSString *email; + NSArray *partMails; + if ([self isMyApt]) return YES; /* not my apt - can access if it's public */ - return [[self appointment] isPublic]; + if ([[self appointment] isPublic]) + return YES; + + /* can access it if I'm invited :-) */ + email = [[[self context] activeUser] email]; + partMails = [[[self appointment] participants] valueForKey:@"rfc822Email"]; + return [partMails containsObject:email]; } - (BOOL)canEditApt { diff --git a/SOGo/UI/Scheduler/Version b/SOGo/UI/Scheduler/Version index 4aaaaf8b..47965445 100644 --- a/SOGo/UI/Scheduler/Version +++ b/SOGo/UI/Scheduler/Version @@ -1,6 +1,6 @@ # Version file -SUBMINOR_VERSION:=144 +SUBMINOR_VERSION:=145 # v0.9.136 requires SOGoUI v0.9.30 # v0.9.123 requires Appointments v0.9.35