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

Shelf permissions: reverted create removal

Reverted work in 847a57a49a.
Left test in but updated to new expectation.
Left migration in but removed content to prevent new pre-v23.06
upgraders loosing shelf create permission status.
Added note to permission to describe use-case.

For #4375
This commit is contained in:
Dan Brown
2023-07-12 22:04:05 +01:00
parent a83150131a
commit ae834050f5
5 changed files with 22 additions and 10 deletions

View File

@ -413,13 +413,14 @@ class EntityPermissionsTest extends TestCase
$this->entityRestrictionFormTest(Page::class, 'Page Permissions', 'delete', '2');
}
public function test_shelf_create_permission_not_visible()
public function test_shelf_create_permission_visible_with_notice()
{
$shelf = $this->entities->shelf();
$resp = $this->asAdmin()->get($shelf->getUrl('/permissions'));
$html = $this->withHtml($resp);
$html->assertElementNotExists('input[name$="[create]"]');
$html->assertElementExists('input[name$="[create]"]');
$resp->assertSee('Shelf create permissions are only used for copying permissions to child books using the action below.');
}
public function test_restricted_pages_not_visible_in_book_navigation_on_pages()