fix: correct access check in canAccessPanel method to use instance method instead of auth helper
This commit is contained in:
parent
f4eef02c10
commit
fb7fe2272b
@ -40,6 +40,6 @@ protected function withoutDeveloper(Builder $query): void
|
||||
|
||||
public function canAccessPanel(Panel $panel): bool
|
||||
{
|
||||
return auth()->user()->hasRole([RoleEnum::DEVELOPER, RoleEnum::OWNER, RoleEnum::ADMINISTRATOR]);
|
||||
return $this->hasRole([RoleEnum::DEVELOPER, RoleEnum::OWNER, RoleEnum::ADMINISTRATOR]);
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user