Added more unit tests for LDAP user class

This commit is contained in:
Frederic Guillot
2016-07-02 18:23:47 -04:00
parent 43337d58c0
commit a8a8bfb0af
2 changed files with 64 additions and 4 deletions

View File

@@ -116,7 +116,7 @@ class User
*/
protected function getRole(array $groupIds)
{
if ($this->hasGroupsNotConfigured()) {
if (! $this->hasGroupsConfigured()) {
return null;
}
@@ -278,14 +278,14 @@ class User
}
/**
* Return true if LDAP Group mapping is not configured
* Return true if LDAP Group mapping are configured
*
* @access public
* @return boolean
*/
public function hasGroupsNotConfigured()
public function hasGroupsConfigured()
{
return !$this->getGroupAdminDn() && !$this->getGroupManagerDn();
return $this->getGroupAdminDn() || $this->getGroupManagerDn();
}
/**