fix: correct access check in canAccessPanel method to use instance method instead of auth helper

This commit is contained in:
Yoga Pangestu 2026-02-24 14:22:11 +07:00
parent f4eef02c10
commit fb7fe2272b

View File

@ -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]);
}
}