+2008-01-22 Wolfgang Sourdeau <wsourdeau@inverse.ca>
+
+ * 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 <wsourdeau@inverse.ca>
* SoObjects/Contacts/SOGoFolder+CardDAV.m ([SOGoFolder
@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 <NGExtensions/NSObject+Logs.h>
+
++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)
- (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 = '%@')"