- Added new entry permission_loginas_personids_blacklist in config file permission.php

- Renamed method loginAS to loginASByUID in AuthLib.php
- Added new public method loginASByPersonId to AuthLib.php
- Renamed method connect to anonymousConnect in LDAPLib
- Method LDAPLib->connectUsernamePassword now checks both username and password if they are empty strings
- Added new constant LOGINAS_PERSONIDS_BLACKLIST to PermissionLib
- Renamed method isEntitledLoginAS to isEntitledLoginASByUID in PermissionLib
- Added new public method isEntitledLoginASByPersonId to PermissionLib
- Added new private method _inLAPersonIdsBlacklist to PermissionLib
This commit is contained in:
Paolo
2019-03-21 15:36:22 +01:00
parent 782e3fd1b1
commit 400a1adfde
4 changed files with 92 additions and 31 deletions
+4 -2
View File
@@ -44,7 +44,7 @@ class LDAPLib
* The first that works is used and stored in property _workingConfigArray
* The LDAP connection link is stored in _connection
*/
public function connect()
public function anonymousConnect()
{
$connect = error('Did not found a working LDAP configuration');
@@ -67,10 +67,12 @@ class LDAPLib
}
/**
* Tries to reconnect using the given username and password and the last working configuration
* Tries to connect using the given username and password and the last working configuration with anonymous connection
*/
public function connectUsernamePassword($username, $password)
{
if (isEmptyString($username) || isEmptyString($password)) return error('Wrong username and password');
return $this->_connect($this->_workingConfigArray, $username, $password);
}