mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-07 16:44:07 +01:00
fixes and first successful tests with Ldap backend
This commit is contained in:
parent
c329377c70
commit
564b2b0fd7
@ -54,7 +54,7 @@ class Ads
|
||||
/**
|
||||
* Reference to our frontend
|
||||
*
|
||||
* @var accounts
|
||||
* @var Api\Accounts
|
||||
*/
|
||||
protected $frontend;
|
||||
|
||||
@ -116,10 +116,10 @@ class Ads
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param accounts $frontend reference to the frontend class, to be able to call it's methods if needed
|
||||
* @param Api\Accounts $frontend reference to the frontend class, to be able to call it's methods if needed
|
||||
* @throws adLDAPException
|
||||
*/
|
||||
function __construct(accounts $frontend)
|
||||
function __construct(Api\Accounts $frontend)
|
||||
{
|
||||
$this->frontend = $frontend;
|
||||
|
||||
|
@ -124,14 +124,14 @@ class Ldap
|
||||
/**
|
||||
* Reference to our frontend
|
||||
*
|
||||
* @var accounts
|
||||
* @var Api\Accounts
|
||||
*/
|
||||
private $frontend;
|
||||
|
||||
/**
|
||||
* Instance of the ldap class
|
||||
*
|
||||
* @var ldap
|
||||
* @var Api\Ldap
|
||||
*/
|
||||
private $ldap;
|
||||
|
||||
@ -148,17 +148,18 @@ class Ldap
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param accounts $frontend reference to the frontend class, to be able to call it's methods if needed
|
||||
* @param Api\Accounts $frontend reference to the frontend class, to be able to call it's methods if needed
|
||||
*/
|
||||
function __construct(accounts $frontend)
|
||||
function __construct(Api\Accounts $frontend)
|
||||
{
|
||||
$this->frontend = $frontend;
|
||||
|
||||
// enable the caching in the session, done by the accounts class extending this class.
|
||||
$this->use_session_cache = true;
|
||||
|
||||
$this->ds = Api\Ldap::factory(true, $this->frontend->config['ldap_host'],
|
||||
$this->ldap = Api\Ldap::factory(false, $this->frontend->config['ldap_host'],
|
||||
$this->frontend->config['ldap_root_dn'],$this->frontend->config['ldap_root_pw']);
|
||||
$this->ds = $this->ldap->ds;
|
||||
|
||||
$this->user_context = $this->frontend->config['ldap_context'];
|
||||
$this->account_filter = $this->frontend->config['ldap_search_filter'];
|
||||
|
@ -13,6 +13,8 @@
|
||||
|
||||
namespace EGroupware\Api\Accounts;
|
||||
|
||||
use EGroupware\Api;
|
||||
|
||||
// explicitly reference classes still in phpgwapi
|
||||
use emailadmin_account;
|
||||
|
||||
|
@ -20,7 +20,7 @@ use EGroupware\Api;
|
||||
* LDAP Backend for contacts, compatible with vars and parameters of eTemplate's so_sql.
|
||||
* Maybe one day this becomes a generalized ldap storage object :-)
|
||||
*
|
||||
* All values used to construct filters need to run through ldap::quote(),
|
||||
* All values used to construct filters need to run through Api\Ldap::quote(),
|
||||
* to be save against LDAP query injection!!!
|
||||
*/
|
||||
class Ldap
|
||||
@ -375,7 +375,7 @@ class Ldap
|
||||
*/
|
||||
protected function id_filter($id)
|
||||
{
|
||||
return '(|(entryUUID='.ldap::quote($id).')(uid='.ldap::quote($id).'))';
|
||||
return '(|(entryUUID='.Api\Ldap::quote($id).')(uid='.Api\Ldap::quote($id).'))';
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -294,7 +294,7 @@ class Ldap
|
||||
{
|
||||
if (isset($GLOBALS['egw']->session)) // no availible in setup
|
||||
{
|
||||
Cache::getSession(__CLASS__, 'ldapServerInfo', $this->ldapserverinfo);
|
||||
Cache::setSession(__CLASS__, 'ldapServerInfo', $this->ldapserverinfo);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -755,7 +755,7 @@ class common
|
||||
*
|
||||
* @deprecated use Api\Image::invalidate()
|
||||
*/
|
||||
public static function delete_map()
|
||||
public static function delete_image_map()
|
||||
{
|
||||
return Api\Image::invalidate();
|
||||
}
|
||||
|
@ -667,8 +667,8 @@ class egw_minimal
|
||||
'datetime' => 'egw_datetime',
|
||||
'framework' => true, // special handling in __get()
|
||||
'template' => 'Template',
|
||||
'session' => 'egw_session', // otherwise $GLOBALS['egw']->session->appsession() fails
|
||||
// classes moved to new api dir
|
||||
'session' => 'EGroupware\\Api\\Session',
|
||||
'ldap' => true,
|
||||
'auth' => 'EGroupware\\Api\\Auth',
|
||||
);
|
||||
|
Loading…
Reference in New Issue
Block a user