mirror of
https://github.com/flarum/core.git
synced 2025-08-07 08:56:38 +02:00
Make AbstractPolicy compatible with both object and class as $model (#1977)
This commit is contained in:
@@ -35,7 +35,7 @@ abstract class AbstractPolicy
|
||||
*/
|
||||
public function getPermission(GetPermission $event)
|
||||
{
|
||||
if (! $event->model instanceof $this->model) {
|
||||
if (! $event->model instanceof $this->model && $event->model !== $this->model) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user