mirror of
https://github.com/BookStackApp/BookStack.git
synced 2025-05-09 10:30:06 +00:00
Rolled out new permissions system throughout application
This commit is contained in:
parent
ada7c83e96
commit
a81a56706e
18 changed files with 295 additions and 95 deletions
database/migrations
|
@ -23,6 +23,7 @@ class AddViewPermissionsToRoles extends Migration
|
|||
$newPermission->name = strtolower($entity) . '-' . strtolower(str_replace(' ', '-', $op));
|
||||
$newPermission->display_name = $op . ' ' . $entity . 's';
|
||||
$newPermission->save();
|
||||
// Assign view permissions to all current roles
|
||||
foreach ($currentRoles as $role) {
|
||||
$role->attachPermission($newPermission);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue