{!! csrf_field() !!}

{{ $title }}

{{ trans('entities.permissions_desc') }} @if($model instanceof \BookStack\Entities\Models\Book)
{{ trans('entities.permissions_book_cascade') }} @elseif($model instanceof \BookStack\Entities\Models\Chapter)
{{ trans('entities.permissions_chapter_cascade') }} @endif

@if($model instanceof \BookStack\Entities\Models\Bookshelf)

{{ trans('entities.shelves_permissions_cascade_warning') }}

@endif
@include('form.user-select', ['user' => $model->ownedBy, 'name' => 'owned_by'])

@foreach($data->permissionsWithRoles() as $permission) @include('form.entity-permissions-row', [ 'permission' => $permission, 'role' => $permission->role, 'entityType' => $model->getType(), 'inheriting' => false, ]) @endforeach
@include('form.entity-permissions-row', [ 'role' => $data->everyoneElseRole(), 'permission' => $data->everyoneElseEntityPermission(), 'entityType' => $model->getType(), 'inheriting' => !$model->permissions()->where('role_id', '=', 0)->exists(), ])

@if($model instanceof \BookStack\Entities\Models\Bookshelf)

* {{ trans('entities.shelves_permissions_create') }}

@endif
{{ trans('common.cancel') }}