- Matching changes made on Ulmus
This commit is contained in:
parent
719eef4e33
commit
520b9fe8f4
|
@ -2,7 +2,12 @@
|
||||||
|
|
||||||
namespace Ulmus\Ldap\Adapter;
|
namespace Ulmus\Ldap\Adapter;
|
||||||
|
|
||||||
use Ulmus\{Common\PdoObject, Exception\AdapterConfigurationException, Ldap\Entity\User, Ulmus};
|
use Ulmus\{Adapter\AdapterInterface,
|
||||||
|
Common\PdoObject,
|
||||||
|
Exception\AdapterConfigurationException,
|
||||||
|
Ldap\Entity\User,
|
||||||
|
Migration\FieldDefinition,
|
||||||
|
Ulmus};
|
||||||
|
|
||||||
use Ulmus\Ldap\Common\LdapObject;
|
use Ulmus\Ldap\Common\LdapObject;
|
||||||
|
|
||||||
|
@ -10,6 +15,10 @@ use function ldap_set_option, ldap_start_tls, ldap_bind, ldap_unbind, ldap_conne
|
||||||
|
|
||||||
class Ldap implements \Ulmus\Adapter\AdapterInterface {
|
class Ldap implements \Ulmus\Adapter\AdapterInterface {
|
||||||
|
|
||||||
|
const ALLOWED_ATTRIBUTES = [
|
||||||
|
''
|
||||||
|
];
|
||||||
|
|
||||||
public const IDENTIFIER_DN = 101;
|
public const IDENTIFIER_DN = 101;
|
||||||
|
|
||||||
public const IDENTIFIER_FILTER = 102;
|
public const IDENTIFIER_FILTER = 102;
|
||||||
|
@ -199,4 +208,15 @@ class Ldap implements \Ulmus\Adapter\AdapterInterface {
|
||||||
return $this->baseDn;
|
return $this->baseDn;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function whitelistAttributes(array &$parameters) : void
|
||||||
|
{
|
||||||
|
$parameters = array_intersect_key($parameters, array_flip(static::ALLOWED_ATTRIBUTES));
|
||||||
|
}
|
||||||
|
|
||||||
|
public function generateAlterColumn(FieldDefinition $definition, array $field) : string|\Stringable
|
||||||
|
{
|
||||||
|
return implode(" ", [
|
||||||
|
|
||||||
|
]);
|
||||||
|
}
|
||||||
}
|
}
|
|
@ -63,7 +63,7 @@ class ConnectionAdapter extends \Ulmus\ConnectionAdapter
|
||||||
*/
|
*/
|
||||||
protected function instanciateAdapter($name) : AdapterInterface
|
protected function instanciateAdapter($name) : AdapterInterface
|
||||||
{
|
{
|
||||||
$class = substr($name, 0, 2) === "\\" ? $name : "\\Ulmus\\Adapter\\$name";
|
$class = substr($name, 0, 2) === "\\" ? $name : "\\Ulmus\\Ldap\\Adapter\\$name";
|
||||||
|
|
||||||
return new $class();
|
return new $class();
|
||||||
}
|
}
|
||||||
|
|
|
@ -94,7 +94,7 @@ class User
|
||||||
/**
|
/**
|
||||||
* @Virtual
|
* @Virtual
|
||||||
*/
|
*/
|
||||||
public ? array $memberOf;
|
# public ? array $memberOf;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Field
|
* @Field
|
||||||
|
|
Loading…
Reference in New Issue