1
0
mirror of https://github.com/BookStackApp/BookStack.git synced 2025-08-07 23:03:00 +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 Database\Seeders;
use BookStack\Auth\Permissions\PermissionService;
use BookStack\Auth\Permissions\JointPermissionBuilder;
use BookStack\Auth\Role;
use BookStack\Auth\User;
use BookStack\Entities\Models\Book;
@@ -35,7 +35,7 @@ class LargeContentSeeder extends Seeder
$largeBook->chapters()->saveMany($chapters);
$all = array_merge([$largeBook], array_values($pages->all()), array_values($chapters->all()));
app()->make(PermissionService::class)->buildJointPermissionsForEntity($largeBook);
app()->make(JointPermissionBuilder::class)->buildJointPermissionsForEntity($largeBook);
app()->make(SearchIndex::class)->indexEntities($all);
}
}