BookStack/resources/views/users/parts/form.blade.php
Dan Brown 41438adbd1
Continued review of #2169
- Removed uneeded custom refresh or logout actions for OIDC.
- Restructured how the services and guards are setup for external auth
  systems. SAML2 and OIDC now directly share a lot more logic.
- Renamed any OpenId references to OIDC or OpenIdConnect
- Removed non-required CSRF excemption for OIDC

Not tested, Come to roadblock due to lack of PHP8 support in upstream
dependancies. Certificate was deemed to be non-valid on every test
attempt due to changes in PHP8.
2021-10-06 23:05:26 +01:00

87 lines
3.2 KiB
PHP

@if($authMethod === 'system' && $user->system_name == 'public')
<p class="mb-none text-warn">{{ trans('settings.users_system_public') }}</p>
@endif
<div class="pt-m">
<label class="setting-list-label">{{ trans('settings.users_details') }}</label>
@if($authMethod === 'standard')
<p class="small">{{ trans('settings.users_details_desc') }}</p>
@endif
@if($authMethod === 'ldap' || $authMethod === 'system')
<p class="small">{{ trans('settings.users_details_desc_no_email') }}</p>
@endif
<div class="grid half mt-m gap-xl">
<div>
<label for="name">{{ trans('auth.name') }}</label>
@include('form.text', ['name' => 'name'])
</div>
<div>
@if($authMethod !== 'ldap' || userCan('users-manage'))
<label for="email">{{ trans('auth.email') }}</label>
@include('form.text', ['name' => 'email', 'disabled' => !userCan('users-manage')])
@endif
</div>
</div>
</div>
@if(in_array($authMethod, ['ldap', 'saml2', 'oidc']) && userCan('users-manage'))
<div class="grid half gap-xl v-center">
<div>
<label class="setting-list-label">{{ trans('settings.users_external_auth_id') }}</label>
<p class="small">{{ trans('settings.users_external_auth_id_desc') }}</p>
</div>
<div>
@include('form.text', ['name' => 'external_auth_id'])
</div>
</div>
@endif
@if(userCan('users-manage'))
<div>
<label for="role" class="setting-list-label">{{ trans('settings.users_role') }}</label>
<p class="small">{{ trans('settings.users_role_desc') }}</p>
<div class="mt-m">
@include('form.role-checkboxes', ['name' => 'roles', 'roles' => $roles])
</div>
</div>
@endif
@if($authMethod === 'standard')
<div new-user-password>
<label class="setting-list-label">{{ trans('settings.users_password') }}</label>
@if(!isset($model))
<p class="small">
{{ trans('settings.users_send_invite_text') }}
</p>
@include('form.toggle-switch', [
'name' => 'send_invite',
'value' => old('send_invite', 'true') === 'true',
'label' => trans('settings.users_send_invite_option')
])
@endif
<div id="password-input-container" @if(!isset($model)) style="display: none;" @endif>
<p class="small">{{ trans('settings.users_password_desc') }}</p>
@if(isset($model))
<p class="small">
{{ trans('settings.users_password_warning') }}
</p>
@endif
<div class="grid half mt-m gap-xl">
<div>
<label for="password">{{ trans('auth.password') }}</label>
@include('form.password', ['name' => 'password', 'autocomplete' => 'new-password'])
</div>
<div>
<label for="password-confirm">{{ trans('auth.password_confirm') }}</label>
@include('form.password', ['name' => 'password-confirm'])
</div>
</div>
</div>
</div>
@endif