mirror of
https://github.com/BookStackApp/BookStack.git
synced 2024-11-29 20:23:52 +08:00
a03245e427
Nothing on back-end logic done to hook this new option up. Addition of permissions for role_id=0 works out of the box, but active "everyone else" permissions, with no priviliges, is currently not working. Needs change of permission gen logic also.
35 lines
1.4 KiB
PHP
35 lines
1.4 KiB
PHP
<form component="entity-permissions" action="{{ $model->getUrl('/permissions') }}" method="POST">
|
|
{!! csrf_field() !!}
|
|
<input type="hidden" name="_method" value="PUT">
|
|
|
|
<div class="grid half left-focus v-center">
|
|
<div>
|
|
<p class="mb-none mt-m">{{ trans('entities.permissions_intro') }}</p>
|
|
</div>
|
|
<div>
|
|
<div class="form-group">
|
|
<label for="owner">{{ trans('entities.permissions_owner') }}</label>
|
|
@include('form.user-select', ['user' => $model->ownedBy, 'name' => 'owned_by'])
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
@if($model instanceof \BookStack\Entities\Models\Bookshelf)
|
|
<p class="text-warn">{{ trans('entities.shelves_permissions_cascade_warning') }}</p>
|
|
@endif
|
|
|
|
<div class="content-permissions mt-m mb-xl">
|
|
@foreach(\BookStack\Auth\Role::restrictable() as $role)
|
|
@include('form.entity-permissions-row', ['role' => $role, 'model' => $model])
|
|
@endforeach
|
|
</div>
|
|
|
|
<div class="content-permissions mt-m mb-xl">
|
|
@include('form.entity-permissions-row', ['role' => \BookStack\Auth\Role::getEveryoneElseRole(), 'model' => $model])
|
|
</div>
|
|
|
|
<div class="text-right">
|
|
<a href="{{ $model->getUrl() }}" class="button outline">{{ trans('common.cancel') }}</a>
|
|
<button type="submit" class="button">{{ trans('entities.permissions_save') }}</button>
|
|
</div>
|
|
</form> |