0
0
Fork 0
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:
Dan Brown 2016-04-24 16:54:20 +01:00
parent ada7c83e96
commit a81a56706e
18 changed files with 295 additions and 95 deletions

View file

@ -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);
}