feat: update access control logic in User model to restrict panel access based on user roles

This commit is contained in:
Yoga Pangestu 2026-02-24 14:18:35 +07:00
parent 37d4b3b39a
commit f4eef02c10

View File

@ -40,6 +40,6 @@ protected function withoutDeveloper(Builder $query): void
public function canAccessPanel(Panel $panel): bool
{
return true;
return auth()->user()->hasRole([RoleEnum::DEVELOPER, RoleEnum::OWNER, RoleEnum::ADMINISTRATOR]);
}
}