Do not sync user role if LDAP groups are not configured

This commit is contained in:
Frederic Guillot
2016-05-30 21:47:31 -04:00
parent 679a22c718
commit 4987e245bb
5 changed files with 51 additions and 2 deletions

View File

@@ -56,6 +56,30 @@ class UserPropertyTest extends Base
);
$this->assertEquals($expected, UserProperty::filterProperties($profile, $properties));
$profile = array(
'id' => 123,
'username' => 'bob',
'name' => null,
'email' => '',
'other_column' => 'myvalue',
'role' => Role::APP_ADMIN,
);
$properties = array(
'external_id' => '456',
'username' => 'bobby',
'name' => 'Bobby',
'email' => 'admin@localhost',
'role' => null,
);
$expected = array(
'name' => 'Bobby',
'email' => 'admin@localhost',
);
$this->assertEquals($expected, UserProperty::filterProperties($profile, $properties));
}
public function testFilterPropertiesOverrideExistingValueWhenNecessary()