Skip to content

Commit

Permalink
LdapRepository: Add method isAmbiguous()
Browse files Browse the repository at this point in the history
refs #9950
  • Loading branch information
Johannes Meyer committed Sep 28, 2015
1 parent e1aab18 commit d765597
Showing 1 changed file with 23 additions and 1 deletion.
24 changes: 23 additions & 1 deletion library/Icinga/Repository/LdapRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,15 @@ abstract class LdapRepository extends Repository
'groupofuniquenames' => 'groupOfUniqueNames'
);

/**
* Object attributes whose value is not distinguished name
*
* @var array
*/
protected $ambiguousAttributes = array(
'posixGroup' => 'memberUid'
);

/**
* Create a new LDAP repository object
*
Expand All @@ -68,4 +77,17 @@ protected function getNormedAttribute($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]);
}
}

0 comments on commit d765597

Please sign in to comment.