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:
@ -2,7 +2,6 @@
|
||||
|
||||
namespace Tests;
|
||||
|
||||
use BookStack\Auth\Permissions\JointPermissionBuilder;
|
||||
use BookStack\Auth\Permissions\RolePermission;
|
||||
use BookStack\Auth\Role;
|
||||
use BookStack\Auth\User;
|
||||
@ -89,7 +88,6 @@ class PublicActionTest extends TestCase
|
||||
foreach (RolePermission::all() as $perm) {
|
||||
$publicRole->attachPermission($perm);
|
||||
}
|
||||
$this->app->make(JointPermissionBuilder::class)->rebuildForRole($publicRole);
|
||||
user()->clearPermissionCache();
|
||||
|
||||
$chapter = $this->entities->chapter();
|
||||
@ -173,7 +171,7 @@ class PublicActionTest extends TestCase
|
||||
{
|
||||
$this->setSettings(['app-public' => 'true']);
|
||||
$book = $this->entities->book();
|
||||
$this->entities->setPermissions($book);
|
||||
$this->permissions->setEntityPermissions($book);
|
||||
|
||||
$resp = $this->get($book->getUrl());
|
||||
$resp->assertSee('Book not found');
|
||||
|
Reference in New Issue
Block a user