diff options
author | DebianRoxx <debian.roxx@gmail.com> | 2018-03-08 22:20:33 +0100 |
---|---|---|
committer | Frédéric Guillot <fred@kanboard.net> | 2018-03-08 13:20:33 -0800 |
commit | d34a5c50c41e1de2abfb8cfd056dbf4ce089a51d (patch) | |
tree | 1da3a797f613683ae29aed9776136b685e97af8a /tests/units | |
parent | a66d080698009f75647c683fcebde65bc324bfc5 (diff) |
Fix role precedence in LDAP integration
Diffstat (limited to 'tests/units')
-rw-r--r-- | tests/units/Core/Ldap/LdapUserTest.php | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/tests/units/Core/Ldap/LdapUserTest.php b/tests/units/Core/Ldap/LdapUserTest.php index 143a8c0d..335a699b 100644 --- a/tests/units/Core/Ldap/LdapUserTest.php +++ b/tests/units/Core/Ldap/LdapUserTest.php @@ -231,8 +231,10 @@ class LdapUserTest extends Base 0 => 'my_ldap_user', ), 'memberof' => array( - 'count' => 1, - 0 => 'CN=Kanboard-Admins,CN=Users,DC=kanboard,DC=local', + 'count' => 3, + 0 => 'CN=Kanboard-Users,CN=Users,DC=kanboard,DC=local', + 1 => 'CN=Kanboard-Managers,CN=Users,DC=kanboard,DC=local', + 2 => 'CN=Kanboard-Admins,CN=Users,DC=kanboard,DC=local', ), 0 => 'displayname', 1 => 'mail', @@ -301,7 +303,14 @@ class LdapUserTest extends Base $this->assertEquals('My LDAP user', $user->getName()); $this->assertEquals('user1@localhost', $user->getEmail()); $this->assertEquals(Role::APP_ADMIN, $user->getRole()); - $this->assertEquals(array('CN=Kanboard-Admins,CN=Users,DC=kanboard,DC=local'), $user->getExternalGroupIds()); + $this->assertEquals( + array( + 'CN=Kanboard-Users,CN=Users,DC=kanboard,DC=local', + 'CN=Kanboard-Managers,CN=Users,DC=kanboard,DC=local', + 'CN=Kanboard-Admins,CN=Users,DC=kanboard,DC=local', + ), + $user->getExternalGroupIds() + ); $this->assertEquals(array('is_ldap_user' => 1), $user->getExtraAttributes()); } |