merge of '1c43299cc4dd7d03f90df10c2a39ffe39966165a'
and 'f775647c24125f4df21cdc41b3c4eae6eccec830' Monotone-Parent: 1c43299cc4dd7d03f90df10c2a39ffe39966165a Monotone-Parent: f775647c24125f4df21cdc41b3c4eae6eccec830 Monotone-Revision: cced931fa315625b655b851184d3453c3a115eee Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2007-10-19T19:33:01 Monotone-Branch: ca.inverse.sogo
This commit is contained in:
commit
41499c069b
|
@ -1,3 +1,11 @@
|
|||
2007-10-19 Francis Lachapelle <flachapelle@inverse.ca>
|
||||
|
||||
* SoObjects/SOGo/SOGoUser.m
|
||||
([SOGoUser -rolesForObject:objectinContext:context]): allow
|
||||
multiple super usernames to be defined. The user default
|
||||
SOGoSuperUsername is renamed SOGoSuperUsernames and must be
|
||||
an array.
|
||||
|
||||
2007-10-18 Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
||||
|
||||
* SoObjects/SOGo/SOGoWebAuthenticator.m ([SOGoWebAuthenticator
|
||||
|
|
|
@ -42,7 +42,7 @@
|
|||
static NSTimeZone *serverTimeZone = nil;
|
||||
static NSString *fallbackIMAP4Server = nil;
|
||||
static NSString *defaultLanguage = nil;
|
||||
static NSString *superUsername = nil;
|
||||
static NSArray *superUsernames = nil;
|
||||
static NSURL *AgenorProfileURL = nil;
|
||||
static BOOL acceptAnyUser = NO;
|
||||
|
||||
|
@ -82,7 +82,7 @@ NSString *SOGoWeekStartFirstFullWeek = @"FirstFullWeek";
|
|||
|
||||
+ (void) initialize
|
||||
{
|
||||
NSString *tzName, *nsUsername;
|
||||
NSString *tzName;
|
||||
NSUserDefaults *ud;
|
||||
NSString *profileURL;
|
||||
|
||||
|
@ -109,11 +109,9 @@ NSString *SOGoWeekStartFirstFullWeek = @"FirstFullWeek";
|
|||
if (!defaultLanguage)
|
||||
ASSIGN (defaultLanguage, @"English");
|
||||
}
|
||||
if (!superUsername)
|
||||
if (!superUsernames)
|
||||
{
|
||||
nsUsername = [ud stringForKey: @"SOGoSuperUsername"];
|
||||
if ([nsUsername length] > 0)
|
||||
ASSIGN (superUsername, nsUsername);
|
||||
superUsernames = [ud arrayForKey: @"SOGoSuperUsernames"];
|
||||
}
|
||||
|
||||
acceptAnyUser = ([[ud stringForKey: @"SOGoAuthentificationMethod"]
|
||||
|
@ -569,7 +567,7 @@ NSString *SOGoWeekStartFirstFullWeek = @"FirstFullWeek";
|
|||
if (sogoRoles)
|
||||
[rolesForObject addObjectsFromArray: sogoRoles];
|
||||
|
||||
if ((superUsername && [login isEqualToString: superUsername])
|
||||
if ((superUsernames && [superUsernames containsObject: login])
|
||||
|| [[object ownerInContext: context] isEqualToString: login])
|
||||
[rolesForObject addObject: SoRole_Owner];
|
||||
if ([object isKindOfClass: [SOGoObject class]])
|
||||
|
|
Loading…
Reference in a new issue