mirror of
https://github.com/BookStackApp/BookStack.git
synced 2025-08-07 23:03:00 +03:00
Copied over work from user_permissions branch
Only that relevant to the additional testing work.
This commit is contained in:
@@ -32,11 +32,11 @@ class RegenerateReferencesTest extends TestCase
|
||||
|
||||
public function test_settings_manage_permission_required()
|
||||
{
|
||||
$editor = $this->getEditor();
|
||||
$editor = $this->users->editor();
|
||||
$resp = $this->actingAs($editor)->post('/settings/maintenance/regenerate-references');
|
||||
$this->assertPermissionError($resp);
|
||||
|
||||
$this->giveUserPermissions($editor, ['settings-manage']);
|
||||
$this->permissions->grantUserRolePermissions($editor, ['settings-manage']);
|
||||
|
||||
$resp = $this->actingAs($editor)->post('/settings/maintenance/regenerate-references');
|
||||
$this->assertNotPermissionError($resp);
|
||||
|
Reference in New Issue
Block a user