]> err.no Git - scalable-opengroupware.org/commitdiff
git-svn-id: http://svn.opengroupware.org/SOGo/inverse/trunk@1011 d1b88da0-ebda-0310...
authorwolfgang <wolfgang@d1b88da0-ebda-0310-925b-ed51d893ca5b>
Sat, 13 Jan 2007 00:07:16 +0000 (00:07 +0000)
committerwolfgang <wolfgang@d1b88da0-ebda-0310-925b-ed51d893ca5b>
Sat, 13 Jan 2007 00:07:16 +0000 (00:07 +0000)
ChangeLog
SoObjects/Appointments/SOGoFreeBusyObject.m
SoObjects/Appointments/product.plist
SoObjects/SOGo/SOGoAuthenticator.m

index 5b20db642e8101f8dc46301dcdd1314c56bc9ade..10d2f7a77af977bddca0565b3bbefcb4c4ecf10b 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2007-01-12  Wolfgang Sourdeau  <wsourdeau@inverse.ca>
+
+       * SoObjects/SOGo/SOGoAuthenticator.m ([SOGoAuthenticator
+       -checkLogin:_loginpassword:_pwd]): authorize special "freebusy"
+       user with password "freebusy".
+
+       * SoObjects/Appointments/SOGoFreeBusyObject.m ([SOGoFreeBusyObject
+       -contentAsString]): the default timerange is now 14 days before
+       currentday and 1 month after.
+
 2007-01-08  Wolfgang Sourdeau  <wsourdeau@inverse.ca>
 
        * SoObjects/Appointments/SOGoAppointmentFolder.m
index ff9bc72ee0382bfaa30d419fbc32093596d72904..1c469aa05390887dd5b176905313ceb9f82211ee 100644 (file)
 
 - (NSString *) contentAsString
 {
-  NSCalendarDate *startDate, *endDate;
+  NSCalendarDate *today, *startDate, *endDate;
   
-  startDate = [[[NSCalendarDate calendarDate] mondayOfWeek] beginOfDay];
-  endDate   = [startDate dateByAddingYears: 0 months: 0 days: 7
-                                     hours: 23 minutes: 59 seconds: 59];
+  today = [[NSCalendarDate calendarDate] beginOfDay];
+  [today setTimeZone: [self userTimeZone]];
+
+  startDate = [today dateByAddingYears: 0 months: 0 days: -14
+                     hours: 0 minutes: 0 seconds: 0];
+  endDate = [startDate dateByAddingYears: 0 months: 1 days: 0
+                       hours: 0 minutes: 0 seconds: 0];
   return [self contentAsStringFrom: startDate to: endDate];
 }
 
index 423c9888603722bf881c278f9dfac5833a8010c8..8e22aec1a8bcb83e1da7cf4b03c9b060f8e9b2c4 100644 (file)
@@ -11,7 +11,7 @@
     SOGoAppointmentFolder = {
       superclass    = "SOGoFolder";
       defaultRoles = {
-        "FreeBusyLookup" = ( "Owner", "Delegate", "Assistant", "FreeBusyLookup" );
+        "FreeBusyLookup" = ( "Owner", "Delegate", "Assistant", "FreeBusy" );
       };
     };
 
index 00205e6fd373242f8f45ea87ded6f94850b41672..0aa6552e5cc45c97635ee452c19a959ab8877127 100644 (file)
@@ -72,20 +72,11 @@ static SOGoAuthenticator *auth = nil;
 - (BOOL) checkLogin: (NSString *) _login
           password: (NSString *) _pwd
 {
-  BOOL result;
-
-//   return YES;
-  if ([authMethod isEqualToString: @"LDAP"])
-    result = [self LDAPCheckLogin: _login password: _pwd];
-  else
-    {
-      if ([_login length] == 0)
-       result = NO;
-      else
-       result = YES;
-    }
-
-  return result;
+  return (([_login isEqualToString: @"freebusy"]
+           && [_pwd isEqualToString: @"freebusy"])
+          || ([authMethod isEqualToString: @"LDAP"]
+              && [self LDAPCheckLogin: _login password: _pwd])
+          || [_login length] > 0);
 }
 
 - (BOOL) LDAPCheckLogin: (NSString *) _login