mirror of
https://github.com/flarum/framework.git
synced 2025-02-11 19:56:16 +08:00
Instances of models should not matter when checking permissions (#2186)
This commit is contained in:
parent
88090660d4
commit
063df058b6
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user