mirror of
https://github.com/BookStackApp/BookStack.git
synced 2025-07-28 17:02:04 +03:00
Copied over work from user_permissions branch
Only that relevant to the additional testing work.
This commit is contained in:
@ -209,7 +209,7 @@ class PagesApiTest extends TestCase
|
||||
$this->actingAsApiEditor();
|
||||
$page = $this->entities->page();
|
||||
$chapter = Chapter::visible()->where('book_id', '!=', $page->book_id)->first();
|
||||
$this->entities->setPermissions($chapter, ['view'], [$this->getEditor()->roles()->first()]);
|
||||
$this->permissions->setEntityPermissions($chapter, ['view'], [$this->users->editor()->roles()->first()]);
|
||||
$details = [
|
||||
'name' => 'My updated API page',
|
||||
'chapter_id' => $chapter->id,
|
||||
@ -315,7 +315,7 @@ class PagesApiTest extends TestCase
|
||||
{
|
||||
$types = ['html', 'plaintext', 'pdf', 'markdown'];
|
||||
$this->actingAsApiEditor();
|
||||
$this->removePermissionFromUser($this->getEditor(), 'content-export');
|
||||
$this->permissions->removeUserRolePermissions($this->users->editor(), ['content-export']);
|
||||
|
||||
$page = $this->entities->page();
|
||||
foreach ($types as $type) {
|
||||
|
Reference in New Issue
Block a user