mirror of
https://github.com/BookStackApp/BookStack.git
synced 2025-05-14 20:52:23 +00:00
Extracted permission building out of permission service
This commit is contained in:
parent
c5e9dfa168
commit
2d4f708c79
8 changed files with 463 additions and 500 deletions
database/seeders
|
@ -3,7 +3,7 @@
|
|||
namespace Database\Seeders;
|
||||
|
||||
use BookStack\Api\ApiToken;
|
||||
use BookStack\Auth\Permissions\PermissionService;
|
||||
use BookStack\Auth\Permissions\JointPermissionBuilder;
|
||||
use BookStack\Auth\Permissions\RolePermission;
|
||||
use BookStack\Auth\Role;
|
||||
use BookStack\Auth\User;
|
||||
|
@ -69,7 +69,7 @@ class DummyContentSeeder extends Seeder
|
|||
]);
|
||||
$token->save();
|
||||
|
||||
app(PermissionService::class)->buildJointPermissions();
|
||||
app(JointPermissionBuilder::class)->buildJointPermissions();
|
||||
app(SearchIndex::class)->indexAllEntities();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue