mirror of
https://github.com/BookStackApp/BookStack.git
synced 2024-08-26 12:16:07 +00:00
Preserve original display_name_attribute configuration values.
This commit is contained in:
parent
502ea608bf
commit
6d20bdc1fb
@ -375,6 +375,7 @@ class LdapTest extends BrowserKitTest
|
|||||||
|
|
||||||
public function test_login_uses_specified_display_name_attribute()
|
public function test_login_uses_specified_display_name_attribute()
|
||||||
{
|
{
|
||||||
|
$originalAttribute = config('services.ldap.display_name_attribute');
|
||||||
app('config')->set([
|
app('config')->set([
|
||||||
'services.ldap.display_name_attribute' => 'displayName'
|
'services.ldap.display_name_attribute' => 'displayName'
|
||||||
]);
|
]);
|
||||||
@ -407,12 +408,13 @@ class LdapTest extends BrowserKitTest
|
|||||||
->seeInDatabase('users', ['email' => $this->mockUser->email, 'email_confirmed' => false, 'external_auth_id' => $this->mockUser->name, 'name' => 'displayNameAttribute']);
|
->seeInDatabase('users', ['email' => $this->mockUser->email, 'email_confirmed' => false, 'external_auth_id' => $this->mockUser->name, 'name' => 'displayNameAttribute']);
|
||||||
|
|
||||||
app('config')->set([
|
app('config')->set([
|
||||||
'services.ldap.display_name_attribute' => 'cn'
|
'services.ldap.display_name_attribute' => $originalAttribute
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function test_login_uses_default_display_name_attribute_if_specified_not_present()
|
public function test_login_uses_default_display_name_attribute_if_specified_not_present()
|
||||||
{
|
{
|
||||||
|
$originalAttribute = config('services.ldap.display_name_attribute');
|
||||||
app('config')->set([
|
app('config')->set([
|
||||||
'services.ldap.display_name_attribute' => 'displayName'
|
'services.ldap.display_name_attribute' => 'displayName'
|
||||||
]);
|
]);
|
||||||
@ -444,7 +446,7 @@ class LdapTest extends BrowserKitTest
|
|||||||
->seeInDatabase('users', ['email' => $this->mockUser->email, 'email_confirmed' => false, 'external_auth_id' => $this->mockUser->name, 'name' => $this->mockUser->name]);
|
->seeInDatabase('users', ['email' => $this->mockUser->email, 'email_confirmed' => false, 'external_auth_id' => $this->mockUser->name, 'name' => $this->mockUser->name]);
|
||||||
|
|
||||||
app('config')->set([
|
app('config')->set([
|
||||||
'services.ldap.display_name_attribute' => 'cn'
|
'services.ldap.display_name_attribute' => $originalAttribute
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user