From: wolfgang Date: Sat, 13 Jan 2007 00:07:16 +0000 (+0000) Subject: git-svn-id: http://svn.opengroupware.org/SOGo/inverse/trunk@1011 d1b88da0-ebda-0310... X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6f24f5dfa50aa49be1eab1430922c1f4173a4786;p=scalable-opengroupware.org git-svn-id: http://svn.opengroupware.org/SOGo/inverse/trunk@1011 d1b88da0-ebda-0310-925b-ed51d893ca5b --- diff --git a/ChangeLog b/ChangeLog index 5b20db64..10d2f7a7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2007-01-12 Wolfgang Sourdeau + + * 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 * SoObjects/Appointments/SOGoAppointmentFolder.m diff --git a/SoObjects/Appointments/SOGoFreeBusyObject.m b/SoObjects/Appointments/SOGoFreeBusyObject.m index ff9bc72e..1c469aa0 100644 --- a/SoObjects/Appointments/SOGoFreeBusyObject.m +++ b/SoObjects/Appointments/SOGoFreeBusyObject.m @@ -46,11 +46,15 @@ - (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]; } diff --git a/SoObjects/Appointments/product.plist b/SoObjects/Appointments/product.plist index 423c9888..8e22aec1 100644 --- a/SoObjects/Appointments/product.plist +++ b/SoObjects/Appointments/product.plist @@ -11,7 +11,7 @@ SOGoAppointmentFolder = { superclass = "SOGoFolder"; defaultRoles = { - "FreeBusyLookup" = ( "Owner", "Delegate", "Assistant", "FreeBusyLookup" ); + "FreeBusyLookup" = ( "Owner", "Delegate", "Assistant", "FreeBusy" ); }; }; diff --git a/SoObjects/SOGo/SOGoAuthenticator.m b/SoObjects/SOGo/SOGoAuthenticator.m index 00205e6f..0aa6552e 100644 --- a/SoObjects/SOGo/SOGoAuthenticator.m +++ b/SoObjects/SOGo/SOGoAuthenticator.m @@ -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