feat: update access control logic in User model to restrict panel access based on user roles
This commit is contained in:
parent
37d4b3b39a
commit
f4eef02c10
@ -40,6 +40,6 @@ protected function withoutDeveloper(Builder $query): void
|
|||||||
|
|
||||||
public function canAccessPanel(Panel $panel): bool
|
public function canAccessPanel(Panel $panel): bool
|
||||||
{
|
{
|
||||||
return true;
|
return auth()->user()->hasRole([RoleEnum::DEVELOPER, RoleEnum::OWNER, RoleEnum::ADMINISTRATOR]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user