mirror of
https://github.com/openvk/openvk
synced 2024-12-22 16:42:32 +03:00
Modify OpenVKPresenter::hasPermission
This commit is contained in:
parent
d8db273f20
commit
e4787750fa
1 changed files with 1 additions and 1 deletions
|
@ -72,7 +72,7 @@ abstract class OpenVKPresenter extends SimplePresenter
|
|||
return ($action === "register" || $action === "login");
|
||||
}
|
||||
|
||||
return (bool) $this->user->raw->can($action)->model($model)->whichBelongsTo($context);
|
||||
return (bool) $this->user->raw->can($action)->model($model)->whichBelongsTo($context === -1 ? null : $context);
|
||||
}
|
||||
|
||||
protected function assertPermission(string $model, string $action, int $context, bool $throw = false): void
|
||||
|
|
Loading…
Reference in a new issue