]> err.no Git - scalable-opengroupware.org/commitdiff
fixed SOGo Bug #1493.
authorznek <znek@d1b88da0-ebda-0310-925b-ed51d893ca5b>
Thu, 21 Jul 2005 16:51:21 +0000 (16:51 +0000)
committerznek <znek@d1b88da0-ebda-0310-925b-ed51d893ca5b>
Thu, 21 Jul 2005 16:51:21 +0000 (16:51 +0000)
git-svn-id: http://svn.opengroupware.org/SOGo/trunk@886 d1b88da0-ebda-0310-925b-ed51d893ca5b

SOGo/UI/Scheduler/ChangeLog
SOGo/UI/Scheduler/UIxAppointmentView.m
SOGo/UI/Scheduler/Version

index 9d9f0a52547424b15ecac4dc70a18c94a4a550d3..a98882abfb0707a9a71e0b71f4c5e416b70a78aa 100644 (file)
@@ -1,5 +1,10 @@
 2005-07-21  Marcus Mueller  <znek@mulle-kybernetik.com>
 
+       * 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.
index b6394dc740ac11b3d948c9fcf47468225d4a99c7..b8c5730f55c25c68410ea9b31f489fb292482c26 100644 (file)
 /* 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 {
index 4aaaaf8bfb7cfeb0a12c30e965123db63259d138..47965445f8aab86425b9d4ac9c37a0d447e84444 100644 (file)
@@ -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