]> BookStack Code Mirror - bookstack/commitdiff
Fixed role permission removal bug
authorDan Brown <redacted>
Sun, 4 Jun 2017 14:37:10 +0000 (15:37 +0100)
committerDan Brown <redacted>
Sun, 4 Jun 2017 14:37:10 +0000 (15:37 +0100)
app/Services/PermissionService.php

index 6f9561a161ed0a8dc8ac85f00c317b1d9df23706..c6c9813370369fa6f270cb7be81444fc37979685 100644 (file)
@@ -259,7 +259,7 @@ class PermissionService
         $roleIds = array_map(function($role) {
             return $role->id;
         }, $roles);
         $roleIds = array_map(function($role) {
             return $role->id;
         }, $roles);
-        $this->jointPermission->newQuery()->whereIn('id', $roleIds)->delete();
+        $this->jointPermission->newQuery()->whereIn('role_id', $roleIds)->delete();
     }
 
     /**
     }
 
     /**