From: wolfgang Date: Tue, 22 Jan 2008 21:56:25 +0000 (+0000) Subject: git-svn-id: http://svn.opengroupware.org/SOGo/inverse/trunk@1335 d1b88da0-ebda-0310... X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c4b51b2a0594a6aec0a7e98f8c6db9b890a627c4;p=scalable-opengroupware.org git-svn-id: http://svn.opengroupware.org/SOGo/inverse/trunk@1335 d1b88da0-ebda-0310-925b-ed51d893ca5b --- diff --git a/ChangeLog b/ChangeLog index 413fc320..2ca4d37d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,14 @@ +2008-01-22 Wolfgang Sourdeau + + * SoObjects/Appointments/SOGoAppointmentFolder.m + ([SOGoAppointmentFolder + -fetchFields:_fieldsfromFolder:_folderfrom:_startDateto:_endDatetitle:titlecomponent:_component]): + change the algorithm a little bit to compare the roles of the + current users to see if he is an "owner" instead of solely + checking its login name. This enables the users listed as + "SuperUsers" to be considered as owners and see everything as + expected. + 2008-01-18 Wolfgang Sourdeau * SoObjects/Contacts/SOGoFolder+CardDAV.m ([SOGoFolder diff --git a/SOPE/sope-patchset-r1583.diff b/SOPE/sope-patchset-r1583.diff index ef5426a3..1539aa01 100644 --- a/SOPE/sope-patchset-r1583.diff +++ b/SOPE/sope-patchset-r1583.diff @@ -1202,6 +1202,46 @@ Index: sope-gdl1/PostgreSQL/PostgreSQL72Channel.m @end /* PostgreSQL72Channel */ @implementation PostgreSQL72Channel(PrimaryKeyGeneration) +Index: sope-gdl1/Oracle8/OracleAdaptorChannel.m +=================================================================== +--- sope-gdl1/Oracle8/OracleAdaptorChannel.m (révision 1583) ++++ sope-gdl1/Oracle8/OracleAdaptorChannel.m (copie de travail) +@@ -30,6 +30,7 @@ + + #import + ++static BOOL debugOn = NO; + // + // + // +@@ -41,8 +42,16 @@ + + @implementation OracleAdaptorChannel (Private) + +-- (void) _cleanup +++ (void) initialize + { ++ NSUserDefaults *ud; ++ ++ ud = [NSUserDefaults standardUserDefaults]; ++ debugOn = [ud boolForKey: @"OracleAdaptorDebug"]; ++} ++ ++- (void) _cleanup ++{ + column_info *info; + int c; + +@@ -231,6 +240,9 @@ + + [self _cleanup]; + ++ if (debugOn) ++ [self logWithFormat: @"expression: %@", theExpression]; ++ + if (!theExpression || ![theExpression length]) + { + [NSException raise: @"OracleInvalidExpressionException" Index: sope-core/NGExtensions/FdExt.subproj/NSString+Encoding.m =================================================================== --- sope-core/NGExtensions/FdExt.subproj/NSString+Encoding.m (révision 1583) diff --git a/SoObjects/Appointments/SOGoAppointmentFolder.m b/SoObjects/Appointments/SOGoAppointmentFolder.m index da40ac84..190982a9 100644 --- a/SoObjects/Appointments/SOGoAppointmentFolder.m +++ b/SoObjects/Appointments/SOGoAppointmentFolder.m @@ -752,21 +752,22 @@ static NSNumber *sharedYes = nil; - (NSString *) _privacySqlString { - NSString *privacySqlString, *login, *email; + NSString *privacySqlString, *email, *login; SOGoUser *activeUser; activeUser = [context activeUser]; - login = [activeUser login]; - if ([login isEqualToString: owner]) + if ([[activeUser rolesForObject: self inContext: context] + containsObject: SoRole_Owner]) privacySqlString = @""; - else if ([login isEqualToString: @"freebusy"]) + else if ([[activeUser login] isEqualToString: @"freebusy"]) privacySqlString = @"and (c_isopaque = 1)"; else { #warning we do not manage all the possible user emails email = [[activeUser primaryIdentity] objectForKey: @"email"]; - + login = [activeUser login]; + privacySqlString = [NSString stringWithFormat: @"(%@(c_orgmail = '%@')"