1
0
mirror of https://github.com/BookStackApp/BookStack.git synced 2025-07-28 17:02:04 +03:00

Extracted permission building out of permission service

This commit is contained in:
Dan Brown
2022-07-12 19:38:11 +01:00
parent c5e9dfa168
commit 2d4f708c79
8 changed files with 463 additions and 500 deletions

View File

@ -2,7 +2,7 @@
namespace Tests;
use BookStack\Auth\Permissions\PermissionService;
use BookStack\Auth\Permissions\JointPermissionBuilder;
use BookStack\Auth\Permissions\RolePermission;
use BookStack\Auth\Role;
use BookStack\Auth\User;
@ -89,7 +89,7 @@ class PublicActionTest extends TestCase
foreach (RolePermission::all() as $perm) {
$publicRole->attachPermission($perm);
}
$this->app[PermissionService::class]->buildJointPermissionForRole($publicRole);
$this->app->make(JointPermissionBuilder::class)->buildJointPermissionForRole($publicRole);
/** @var Chapter $chapter */
$chapter = Chapter::query()->first();