mirror of
https://github.com/BookStackApp/BookStack.git
synced 2025-02-24 07:08:40 +08:00
Users: Hid lanuage preference for guest user
Some checks failed
analyse-php / build (push) Has been cancelled
test-migrations / build (8.3) (push) Has been cancelled
test-migrations / build (8.4) (push) Has been cancelled
test-php / build (8.1) (push) Has been cancelled
test-php / build (8.2) (push) Has been cancelled
test-php / build (8.3) (push) Has been cancelled
test-php / build (8.4) (push) Has been cancelled
lint-php / build (push) Has been cancelled
test-migrations / build (8.1) (push) Has been cancelled
test-migrations / build (8.2) (push) Has been cancelled
Some checks failed
analyse-php / build (push) Has been cancelled
test-migrations / build (8.3) (push) Has been cancelled
test-migrations / build (8.4) (push) Has been cancelled
test-php / build (8.1) (push) Has been cancelled
test-php / build (8.2) (push) Has been cancelled
test-php / build (8.3) (push) Has been cancelled
test-php / build (8.4) (push) Has been cancelled
lint-php / build (push) Has been cancelled
test-migrations / build (8.1) (push) Has been cancelled
test-migrations / build (8.2) (push) Has been cancelled
Hiding since it's not really used, and may mislead on how to set default app language (which should be done via env options). Updated test to cover. For #5356
This commit is contained in:
parent
7e1a8e5ec6
commit
a8ef820443
@ -34,7 +34,9 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@include('users.parts.language-option-row', ['value' => old('language') ?? $user->getLocale()->appLocale()])
|
@if(!$user->isGuest())
|
||||||
|
@include('users.parts.language-option-row', ['value' => old('language') ?? $user->getLocale()->appLocale()])
|
||||||
|
@endif
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="text-right">
|
<div class="text-right">
|
||||||
|
@ -202,9 +202,13 @@ class UserManagementTest extends TestCase
|
|||||||
public function test_guest_profile_shows_limited_form()
|
public function test_guest_profile_shows_limited_form()
|
||||||
{
|
{
|
||||||
$guest = $this->users->guest();
|
$guest = $this->users->guest();
|
||||||
|
|
||||||
$resp = $this->asAdmin()->get('/settings/users/' . $guest->id);
|
$resp = $this->asAdmin()->get('/settings/users/' . $guest->id);
|
||||||
$resp->assertSee('Guest');
|
$resp->assertSee('Guest');
|
||||||
$this->withHtml($resp)->assertElementNotExists('#password');
|
$html = $this->withHtml($resp);
|
||||||
|
|
||||||
|
$html->assertElementNotExists('#password');
|
||||||
|
$html->assertElementNotExists('[name="language"]');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function test_guest_profile_cannot_be_deleted()
|
public function test_guest_profile_cannot_be_deleted()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user