mirror of
https://github.com/flarum/core.git
synced 2025-07-26 19:20:21 +02:00
Instances of models should not matter when checking permissions (#2186)
This commit is contained in:
committed by
GitHub
parent
26256c436f
commit
3c87f800dd
@@ -103,7 +103,7 @@ class UserServiceProvider extends AbstractServiceProvider
|
|||||||
// If no policy covered this permission query, we will only grant
|
// If no policy covered this permission query, we will only grant
|
||||||
// the permission if the actor's groups have it. Otherwise, we will
|
// the permission if the actor's groups have it. Otherwise, we will
|
||||||
// not allow the user to perform this action.
|
// not allow the user to perform this action.
|
||||||
if ($actor->isAdmin() || (! $model && $actor->hasPermission($ability))) {
|
if ($actor->isAdmin() || $actor->hasPermission($ability)) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user