1
0
mirror of https://github.com/BookStackApp/BookStack.git synced 2025-08-07 23:03:00 +03:00

Shelf permissions: Removed unused 'create' permission from view

Was causing confusion.
Added test to cover.
Also added migration to remove existing create entries to pre-emptively
avoid issues in future if 'create' is used again.
This commit is contained in:
Dan Brown
2023-06-25 23:22:49 +01:00
parent c74a2608c4
commit 847a57a49a
3 changed files with 39 additions and 1 deletions

View File

@@ -413,6 +413,15 @@ class EntityPermissionsTest extends TestCase
$this->entityRestrictionFormTest(Page::class, 'Page Permissions', 'delete', '2');
}
public function test_shelf_create_permission_not_visible()
{
$shelf = $this->entities->shelf();
$resp = $this->asAdmin()->get($shelf->getUrl('/permissions'));
$html = $this->withHtml($resp);
$html->assertElementNotExists('input[name$="[create]"]');
}
public function test_restricted_pages_not_visible_in_book_navigation_on_pages()
{
$chapter = $this->entities->chapter();