mirror of
https://github.com/BookStackApp/BookStack.git
synced 2025-05-07 01:30:06 +00:00
parent
cd35e13024
commit
82c6597a60
4 changed files with 13 additions and 1 deletions
resources
tests/Entity
|
@ -99,6 +99,7 @@ return [
|
||||||
'shelves_permissions' => 'Bookshelf Permissions',
|
'shelves_permissions' => 'Bookshelf Permissions',
|
||||||
'shelves_permissions_updated' => 'Bookshelf Permissions Updated',
|
'shelves_permissions_updated' => 'Bookshelf Permissions Updated',
|
||||||
'shelves_permissions_active' => 'Bookshelf Permissions Active',
|
'shelves_permissions_active' => 'Bookshelf Permissions Active',
|
||||||
|
'shelves_permissions_cascade_warning' => 'Permissions on bookshelves do not automatically cascade to contained books. This is because a book can exist on multiple shelves. Permissions can however be copied down to child books using the option found below.',
|
||||||
'shelves_copy_permissions_to_books' => 'Copy Permissions to Books',
|
'shelves_copy_permissions_to_books' => 'Copy Permissions to Books',
|
||||||
'shelves_copy_permissions' => 'Copy Permissions',
|
'shelves_copy_permissions' => 'Copy Permissions',
|
||||||
'shelves_copy_permissions_explain' => 'This will apply the current permission settings of this bookshelf to all books contained within. Before activating, ensure any changes to the permissions of this bookshelf have been saved.',
|
'shelves_copy_permissions_explain' => 'This will apply the current permission settings of this bookshelf to all books contained within. Before activating, ensure any changes to the permissions of this bookshelf have been saved.',
|
||||||
|
|
|
@ -20,6 +20,10 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@if($model instanceof \BookStack\Entities\Models\Bookshelf)
|
||||||
|
<p class="text-warn">{{ trans('entities.shelves_permissions_cascade_warning') }}</p>
|
||||||
|
@endif
|
||||||
|
|
||||||
<hr>
|
<hr>
|
||||||
|
|
||||||
<table permissions-table class="table permissions-table toggle-switch-list" style="{{ !$model->restricted ? 'display: none' : '' }}">
|
<table permissions-table class="table permissions-table toggle-switch-list" style="{{ !$model->restricted ? 'display: none' : '' }}">
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
]])
|
]])
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="card content-wrap">
|
<div class="card content-wrap auto-height">
|
||||||
<h1 class="list-heading">{{ trans('entities.shelves_permissions') }}</h1>
|
<h1 class="list-heading">{{ trans('entities.shelves_permissions') }}</h1>
|
||||||
@include('form.entity-permissions', ['model' => $shelf])
|
@include('form.entity-permissions', ['model' => $shelf])
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -308,6 +308,13 @@ class BookShelfTest extends TestCase
|
||||||
$this->assertDatabaseHas('entity_permissions', ['restrictable_id' => $child->id, 'action' => 'update', 'role_id' => $editorRole->id]);
|
$this->assertDatabaseHas('entity_permissions', ['restrictable_id' => $child->id, 'action' => 'update', 'role_id' => $editorRole->id]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function test_permission_page_has_a_warning_about_no_cascading()
|
||||||
|
{
|
||||||
|
$shelf = Bookshelf::first();
|
||||||
|
$resp = $this->asAdmin()->get($shelf->getUrl('/permissions'));
|
||||||
|
$resp->assertSeeText('Permissions on bookshelves do not automatically cascade to contained books.');
|
||||||
|
}
|
||||||
|
|
||||||
public function test_bookshelves_show_in_breadcrumbs_if_in_context()
|
public function test_bookshelves_show_in_breadcrumbs_if_in_context()
|
||||||
{
|
{
|
||||||
$shelf = Bookshelf::first();
|
$shelf = Bookshelf::first();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue