0
0
Fork 0
mirror of https://github.com/BookStackApp/BookStack.git synced 2025-04-16 01:34:12 +00:00

Users: Hid lanuage preference for guest user

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 
This commit is contained in:
Dan Brown 2024-12-13 15:19:09 +00:00
parent 7e1a8e5ec6
commit a8ef820443
No known key found for this signature in database
GPG key ID: 46D9F943C24A2EF9
2 changed files with 8 additions and 2 deletions
resources/views/users
tests/User

View file

@ -34,7 +34,9 @@
</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 class="text-right">

View file

@ -202,9 +202,13 @@ class UserManagementTest extends TestCase
public function test_guest_profile_shows_limited_form()
{
$guest = $this->users->guest();
$resp = $this->asAdmin()->get('/settings/users/' . $guest->id);
$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()