diff --git a/SoObjects/Appointments/SOGoFreeBusyObject.m b/SoObjects/Appointments/SOGoFreeBusyObject.m index 155e488cd..28bc3849f 100644 --- a/SoObjects/Appointments/SOGoFreeBusyObject.m +++ b/SoObjects/Appointments/SOGoFreeBusyObject.m @@ -18,7 +18,7 @@ Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -// $Id: SOGoFreeBusyObject.m 1011 2007-01-13 00:07:16Z wolfgang $ +// $Id: SOGoFreeBusyObject.m 1045 2007-04-11 20:13:07Z wolfgang $ #import #import diff --git a/SoObjects/Contacts/SOGoContactFolders.m b/SoObjects/Contacts/SOGoContactFolders.m index 6e61cc675..c2f0a7172 100644 --- a/SoObjects/Contacts/SOGoContactFolders.m +++ b/SoObjects/Contacts/SOGoContactFolders.m @@ -218,28 +218,28 @@ return [contactFolders allValues]; } -- (NSString *) roleOfUser: (NSString *) uid -{ - NSArray *roles, *traversalPath; - NSString *objectName, *role; +// - (NSString *) roleOfUser: (NSString *) uid +// { +// NSArray *roles, *traversalPath; +// NSString *objectName, *role; - role = nil; - traversalPath = [context objectForKey: @"SoRequestTraversalPath"]; - if ([traversalPath count] > 2) - { - objectName = [traversalPath objectAtIndex: 2]; - roles = [[context activeUser] - rolesForObject: [self lookupName: objectName - inContext: context - acquire: NO] - inContext: context]; - if ([roles containsObject: SOGoRole_Assistant] - || [roles containsObject: SOGoRole_Delegate]) - role = SOGoRole_Assistant; - } +// role = nil; +// traversalPath = [context objectForKey: @"SoRequestTraversalPath"]; +// if ([traversalPath count] > 2) +// { +// objectName = [traversalPath objectAtIndex: 2]; +// roles = [[context activeUser] +// rolesForObject: [self lookupName: objectName +// inContext: context +// acquire: NO] +// inContext: context]; +// if ([roles containsObject: SOGoRole_Assistant] +// || [roles containsObject: SOGoRole_Delegate]) +// role = SOGoRole_Assistant; +// } - return role; -} +// return role; +// } - (BOOL) davIsCollection { diff --git a/SoObjects/Mailer/SOGoMailAccounts.m b/SoObjects/Mailer/SOGoMailAccounts.m index ed041aa38..d33c58c97 100644 --- a/SoObjects/Mailer/SOGoMailAccounts.m +++ b/SoObjects/Mailer/SOGoMailAccounts.m @@ -37,17 +37,16 @@ static NSString *AgenorShareLoginMarker = @".-."; /* listing the available mailboxes */ -- (BOOL)isInHomeFolderBranchOfLoggedInAccount:(id)_ctx { - id user; - - user = [_ctx activeUser]; - return [[[self container] nameInContainer] isEqualToString:[user login]]; +- (BOOL) isInHomeFolderBranchOfLoggedInAccount: (NSString *) userLogin +{ + return [[[self container] nameInContainer] isEqualToString: userLogin]; } - (NSArray *)toManyRelationshipKeys { - id user; + SOGoUser *user; id account; NSArray *shares; + NSString *userLogin; /* Note: this is not strictly correct. The accounts being retrieved should be @@ -60,15 +59,16 @@ static NSString *AgenorShareLoginMarker = @".-."; => TODO */ user = [context activeUser]; + userLogin = [user login]; /* for now: return nothing if the home-folder does not belong to the login */ - if (![self isInHomeFolderBranchOfLoggedInAccount: context]) { + if (![self isInHomeFolderBranchOfLoggedInAccount: userLogin]) { [self warnWithFormat:@"User %@ tried to access mail hierarchy of %@", [user login], [[self container] nameInContainer]]; return nil; } - account = [user valueForKey:@"primaryIMAP4AccountString"]; + account = [user primaryIMAP4AccountString]; if ([account isNotNull]) account = [NSArray arrayWithObject:account]; if ([self isInternetRequest]) /* only show primary mailbox in Internet */ @@ -141,16 +141,20 @@ static NSString *AgenorShareLoginMarker = @".-."; return [ct autorelease]; } -- (id)lookupName:(NSString *)_key inContext:(id)_ctx acquire:(BOOL)_flag { +- (id)lookupName:(NSString *)_key inContext:(id)_ctx acquire:(BOOL)_flag +{ id obj; + NSString *userLogin; + + userLogin = [[context activeUser] login]; /* first check attributes directly bound to the application */ if ((obj = [super lookupName:_key inContext:_ctx acquire:NO])) return obj; - if (![self isInHomeFolderBranchOfLoggedInAccount:_ctx]) { + if (![self isInHomeFolderBranchOfLoggedInAccount: userLogin]) { [self warnWithFormat:@"User %@ tried to access mail hierarchy of %@", - [[_ctx activeUser] login], [[self container] nameInContainer]]; + userLogin, [[self container] nameInContainer]]; return [NSException exceptionWithHTTPStatus:403 /* Forbidden */ reason:@"Tried to access the mail of another user"]; diff --git a/UI/Scheduler/UIxAppointmentView.h b/UI/Scheduler/UIxAppointmentView.h index a7f4a20dc..86a85fe28 100644 --- a/UI/Scheduler/UIxAppointmentView.h +++ b/UI/Scheduler/UIxAppointmentView.h @@ -1,4 +1,4 @@ -// $Id: UIxAppointmentView.h 768 2005-07-15 00:13:01Z helge $ +// $Id: UIxAppointmentView.h 1045 2007-04-11 20:13:07Z wolfgang $ #ifndef __SOGo_UIxAppointmentView_H__ #define __SOGo_UIxAppointmentView_H__ diff --git a/UI/Scheduler/UIxCalView.h b/UI/Scheduler/UIxCalView.h index cd5059290..396afe10e 100644 --- a/UI/Scheduler/UIxCalView.h +++ b/UI/Scheduler/UIxCalView.h @@ -1,4 +1,4 @@ -// $Id: UIxCalView.h 1040 2007-04-02 21:29:40Z wolfgang $ +// $Id: UIxCalView.h 1045 2007-04-11 20:13:07Z wolfgang $ #ifndef __SOGo_UIxCalView_H__ #define __SOGo_UIxCalView_H__ diff --git a/UI/Scheduler/UIxCalView.m b/UI/Scheduler/UIxCalView.m index 1f9c8277b..bea42aa60 100644 --- a/UI/Scheduler/UIxCalView.m +++ b/UI/Scheduler/UIxCalView.m @@ -1,4 +1,4 @@ -// $Id: UIxCalView.m 1040 2007-04-02 21:29:40Z wolfgang $ +// $Id: UIxCalView.m 1045 2007-04-11 20:13:07Z wolfgang $ #import "common.h" //#import diff --git a/UI/Scheduler/UIxTimeDateControl.m b/UI/Scheduler/UIxTimeDateControl.m index 22de5971c..73186cbca 100644 --- a/UI/Scheduler/UIxTimeDateControl.m +++ b/UI/Scheduler/UIxTimeDateControl.m @@ -18,7 +18,7 @@ Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -// $Id: UIxTimeDateControl.m 1033 2007-03-22 19:04:08Z wolfgang $ +// $Id: UIxTimeDateControl.m 1045 2007-04-11 20:13:07Z wolfgang $ #import #import