LdapRepository: Add method isAmbiguous()

refs #9950
This commit is contained in:
Johannes Meyer 2015-09-28 10:56:15 +02:00
parent e1aab183e3
commit d7655972ed

View File

@ -42,6 +42,15 @@ abstract class LdapRepository extends Repository
'groupofuniquenames' => 'groupOfUniqueNames' 'groupofuniquenames' => 'groupOfUniqueNames'
); );
/**
* Object attributes whose value is not distinguished name
*
* @var array
*/
protected $ambiguousAttributes = array(
'posixGroup' => 'memberUid'
);
/** /**
* Create a new LDAP repository object * Create a new LDAP repository object
* *
@ -68,4 +77,17 @@ abstract class LdapRepository extends Repository
return $name; return $name;
} }
/**
* Return whether the given object attribute's value is not a distinguished name
*
* @param string $objectClass
* @param string $attributeName
*
* @return bool
*/
protected function isAmbiguous($objectClass, $attributeName)
{
return isset($this->ambiguousAttributes[$objectClass][$attributeName]);
}
} }