From 43c54e689880790e4d7b40fdcd73f5dd4636333f Mon Sep 17 00:00:00 2001 From: Francis Lachapelle Date: Tue, 5 May 2009 19:58:33 +0000 Subject: [PATCH] See ChangeLog Monotone-Parent: 707f11d374470774389d0ad41fc35614be923164 Monotone-Revision: d5f67d6e4d96fb56aedcbaef7a68bdf915d7ad8c Monotone-Author: flachapelle@inverse.ca Monotone-Date: 2009-05-05T19:58:33 Monotone-Branch: ca.inverse.sogo --- ChangeLog | 6 ++++++ SoObjects/SOGo/LDAPUserManager.m | 1 + SoObjects/SOGo/SOGoUser.m | 5 +++-- UI/Common/UIxUserRightsEditor.m | 2 +- 4 files changed, 11 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 21b0e22da..e5bbb49c3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2009-05-05 Francis Lachapelle + + * SoObjects/SOGo/SOGoUser.m ([SOGoUser + +userWithLogin:roles:trust:]): don't set the roles if the passed + roles are not defined. + 2009-05-03 Francis Lachapelle * UI/Common/UIxUserRightsEditor.m ([UIxUserRightsEditor diff --git a/SoObjects/SOGo/LDAPUserManager.m b/SoObjects/SOGo/LDAPUserManager.m index 327c1254f..be16d0621 100644 --- a/SoObjects/SOGo/LDAPUserManager.m +++ b/SoObjects/SOGo/LDAPUserManager.m @@ -377,6 +377,7 @@ static NSLock *lock = nil; if (!access) [currentUser setObject: [NSNumber numberWithBool: NO] forKey: @"MailAccess"]; + break; } } diff --git a/SoObjects/SOGo/SOGoUser.m b/SoObjects/SOGo/SOGoUser.m index 5cfb94102..8a1e37611 100644 --- a/SoObjects/SOGo/SOGoUser.m +++ b/SoObjects/SOGo/SOGoUser.m @@ -238,14 +238,15 @@ _timeValue (NSString *key) user = [cache userNamed: newLogin]; if (!user) { - user = [[self alloc] initWithLogin: newLogin roles: newRoles trust: b]; + user = [[self alloc] initWithLogin: newLogin roles: newRoles trust: b]; if (user) { [user autorelease]; [cache registerUser: user]; } } - [user setPrimaryRoles: newRoles]; + if (newRoles) + [user setPrimaryRoles: newRoles]; return user; } diff --git a/UI/Common/UIxUserRightsEditor.m b/UI/Common/UIxUserRightsEditor.m index 6c8a80841..014d5f8f9 100644 --- a/UI/Common/UIxUserRightsEditor.m +++ b/UI/Common/UIxUserRightsEditor.m @@ -93,7 +93,7 @@ static BOOL sendACLAdvisories = NO; - (BOOL) _initRights { BOOL response; - NSString *newUID, *searchUID; + NSString *newUID; LDAPUserManager *um; SOGoObject *clientObject; SOGoGroup *group;