mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-08-25 08:23:28 +00:00
Monotone-Parent: 05ac214876f464bdf1a7fd94fc6ee88c41f8f7a6
Monotone-Revision: ab81a2b3344ce13069fdc2f4762e128a13136bb3 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2008-07-24T18:00:21 Monotone-Branch: ca.inverse.sogo
This commit is contained in:
@@ -25,6 +25,7 @@
|
||||
|
||||
#import <NGObjWeb/WOContext.h>
|
||||
#import <NGObjWeb/WOResponse.h>
|
||||
#import <NGExtensions/NSObject+Logs.h>
|
||||
#import <NGLdap/NGLdapConnection.h>
|
||||
|
||||
#import "LDAPUserManager.h"
|
||||
@@ -47,11 +48,21 @@
|
||||
|
||||
- (id) init
|
||||
{
|
||||
NSUserDefaults *ud;
|
||||
|
||||
if ((self = [super init]))
|
||||
{
|
||||
authMethod = [[NSUserDefaults standardUserDefaults]
|
||||
stringForKey: @"SOGoAuthentificationMethod"];
|
||||
[authMethod retain];
|
||||
ud = [NSUserDefaults standardUserDefaults];
|
||||
authMethod = [ud stringForKey: @"SOGoAuthenticationMethod"];
|
||||
if (!authMethod)
|
||||
authMethod = [ud stringForKey: @"SOGoAuthentificationMethod"];
|
||||
if (!authMethod)
|
||||
{
|
||||
authMethod = @"LDAP";
|
||||
[self warnWithFormat:
|
||||
@"authentication method automatically set to '%@'",
|
||||
authMethod];
|
||||
}
|
||||
}
|
||||
|
||||
return self;
|
||||
@@ -75,8 +86,9 @@
|
||||
accept = [um checkLogin: _login andPassword: _pwd];
|
||||
}
|
||||
else
|
||||
accept = ([authMethod isEqualToString: @"bypass"]
|
||||
&& [_login length] > 0);
|
||||
accept = NO;
|
||||
// accept = ([authMethod isEqualToString: @"bypass"]
|
||||
// && [_login length] > 0);
|
||||
|
||||
return accept;
|
||||
// || ([_login isEqualToString: @"freebusy"]
|
||||
|
||||
@@ -51,7 +51,7 @@ static BOOL fallbackIsConfigured = NO;
|
||||
static NSString *defaultLanguage = nil;
|
||||
static NSArray *superUsernames = nil;
|
||||
static NSURL *AgenorProfileURL = nil;
|
||||
static BOOL acceptAnyUser = NO;
|
||||
// static BOOL acceptAnyUser = NO;
|
||||
static int sogoFirstDayOfWeek = -1;
|
||||
static int defaultDayStartTime = -1;
|
||||
static int defaultDayEndTime = -1;
|
||||
@@ -148,8 +148,8 @@ _timeValue (NSString *key)
|
||||
if (!superUsernames)
|
||||
ASSIGN (superUsernames, [ud arrayForKey: @"SOGoSuperUsernames"]);
|
||||
|
||||
acceptAnyUser = ([[ud stringForKey: @"SOGoAuthentificationMethod"]
|
||||
isEqualToString: @"bypass"]);
|
||||
// acceptAnyUser = ([[ud stringForKey: @"SOGoAuthentificationMethod"]
|
||||
// isEqualToString: @"bypass"]);
|
||||
}
|
||||
|
||||
+ (NSString *) language
|
||||
@@ -218,8 +218,9 @@ _timeValue (NSString *key)
|
||||
LDAPUserManager *um;
|
||||
NSString *realUID;
|
||||
|
||||
if (acceptAnyUser
|
||||
|| [newLogin isEqualToString: @"anonymous"]
|
||||
if (// acceptAnyUser
|
||||
// ||
|
||||
[newLogin isEqualToString: @"anonymous"]
|
||||
|| [newLogin isEqualToString: @"freebusy"])
|
||||
realUID = newLogin;
|
||||
else
|
||||
|
||||
@@ -32,6 +32,7 @@
|
||||
#import <NGObjWeb/WORequest.h>
|
||||
#import <NGObjWeb/WOResponse.h>
|
||||
#import <NGExtensions/NSCalendarDate+misc.h>
|
||||
#import <NGExtensions/NSObject+Logs.h>
|
||||
#import <NGLdap/NGLdapConnection.h>
|
||||
|
||||
#import <UI/MainUI/SOGoRootPage.h>
|
||||
@@ -56,10 +57,21 @@
|
||||
|
||||
- (id) init
|
||||
{
|
||||
NSUserDefaults *ud;
|
||||
|
||||
if ((self = [super init]))
|
||||
{
|
||||
authMethod = [[NSUserDefaults standardUserDefaults]
|
||||
stringForKey: @"SOGoAuthentificationMethod"];
|
||||
ud = [NSUserDefaults standardUserDefaults];
|
||||
authMethod = [ud stringForKey: @"SOGoAuthenticationMethod"];
|
||||
if (!authMethod)
|
||||
authMethod = [ud stringForKey: @"SOGoAuthentificationMethod"];
|
||||
if (!authMethod)
|
||||
{
|
||||
authMethod = @"LDAP";
|
||||
[self warnWithFormat:
|
||||
@"authentication method automatically set to '%@'",
|
||||
authMethod];
|
||||
}
|
||||
[authMethod retain];
|
||||
}
|
||||
|
||||
@@ -84,8 +96,10 @@
|
||||
accept = [um checkLogin: _login andPassword: _pwd];
|
||||
}
|
||||
else
|
||||
accept = ([authMethod isEqualToString: @"bypass"]
|
||||
&& [_login length] > 0);
|
||||
accept = NO;
|
||||
// else
|
||||
// accept = ([authMethod isEqualToString: @"bypass"]
|
||||
// && [_login length] > 0);
|
||||
|
||||
return accept;
|
||||
// || ([_login isEqualToString: @"freebusy"]
|
||||
|
||||
Reference in New Issue
Block a user