1
0
mirror of https://github.com/BookStackApp/BookStack.git synced 2026-01-03 23:42:28 +03:00

Aded roles API controller methods

Altered & updated permissions repo, and existing connected
RoleController to suit.
Also extracts in-app success notifications to auto activity system.
Tweaked tests where required.
This commit is contained in:
Dan Brown
2023-02-18 18:36:34 +00:00
parent 55456a57d6
commit 723f108bd9
12 changed files with 238 additions and 72 deletions

View File

@@ -90,7 +90,7 @@ class UserRoleProvider
{
$permissionRepo = app(PermissionsRepo::class);
$roleData = Role::factory()->make()->toArray();
$roleData['permissions'] = array_flip($rolePermissions);
$roleData['permissions'] = $rolePermissions;
return $permissionRepo->saveNewRole($roleData);
}