F
Filament9mo ago
S3UD

Accessing Panel

so I have 3 models in my project users(students), Supervisor and Committee , and i created a panel called supervisor and i want only the supervisor to access this panel , how can i achieve this ?
2 Replies
Sjoerd24
Sjoerd249mo ago
Don’t know how many supervisors you have, if it is very limited you could hard code access in canAccessPanel() in User model (see documentation) . if you have more users with different roles i would integrate something like the plugin filament shield.
Dennis Koch
Dennis Koch9mo ago
canAccessPanel() on the User model would be the easiest. Policies would be another option

Did you find this page helpful?