1
0
mirror of https://github.com/BookStackApp/BookStack.git synced 2025-07-28 17:02:04 +03:00

Updated test for perms. changes and fixed static issues

This commit is contained in:
Dan Brown
2022-10-12 12:12:36 +01:00
parent 7792da99ce
commit bd412ddbf9
8 changed files with 51 additions and 37 deletions

View File

@ -206,7 +206,11 @@ class EntityProvider
{
$entity->permissions()->delete();
$permissions = [];
$permissions = [
// Set default permissions to not allow actions so that only the provided role permissions are at play.
['role_id' => 0, 'view' => false, 'create' => false, 'update' => false, 'delete' => false],
];
foreach ($roles as $role) {
$permission = ['role_id' => $role->id];
foreach (EntityPermission::PERMISSIONS as $possibleAction) {