mirror of
https://github.com/BookStackApp/BookStack.git
synced 2025-07-30 04:23:11 +03:00
Added role based MFA control
- Added new DB column for control and role updated create/update actions. - Created new middleware as a start to actual enforcement logic. - Added indicator to role list of whether MFA is enforced.
This commit is contained in:
@ -138,6 +138,7 @@ return [
|
||||
'role_details' => 'Role Details',
|
||||
'role_name' => 'Role Name',
|
||||
'role_desc' => 'Short Description of Role',
|
||||
'role_mfa_enforced' => 'Requires Multi-Factor Authentication',
|
||||
'role_external_auth_id' => 'External Authentication IDs',
|
||||
'role_system' => 'System Permissions',
|
||||
'role_manage_users' => 'Manage users',
|
||||
|
@ -11,13 +11,16 @@
|
||||
</div>
|
||||
<div>
|
||||
<div class="form-group">
|
||||
<label for="name">{{ trans('settings.role_name') }}</label>
|
||||
<label for="display_name">{{ trans('settings.role_name') }}</label>
|
||||
@include('form.text', ['name' => 'display_name'])
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="name">{{ trans('settings.role_desc') }}</label>
|
||||
<label for="description">{{ trans('settings.role_desc') }}</label>
|
||||
@include('form.text', ['name' => 'description'])
|
||||
</div>
|
||||
<div class="form-group">
|
||||
@include('form.checkbox', ['name' => 'mfa_enforced', 'label' => trans('settings.role_mfa_enforced') ])
|
||||
</div>
|
||||
|
||||
@if(config('auth.method') === 'ldap' || config('auth.method') === 'saml2')
|
||||
<div class="form-group">
|
||||
|
@ -27,7 +27,12 @@
|
||||
@foreach($roles as $role)
|
||||
<tr>
|
||||
<td><a href="{{ url("/settings/roles/{$role->id}") }}">{{ $role->display_name }}</a></td>
|
||||
<td>{{ $role->description }}</td>
|
||||
<td>
|
||||
@if($role->mfa_enforced)
|
||||
<span title="{{ trans('settings.role_mfa_enforced') }}">@icon('lock') </span>
|
||||
@endif
|
||||
{{ $role->description }}
|
||||
</td>
|
||||
<td class="text-center">{{ $role->users->count() }}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
|
Reference in New Issue
Block a user