You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have 2 panels. An Admin panel with an auth guard "admin" where only the system administrator can log into. And an Application panel with an "web" guard for customer users.
The Admin users are saved in their own table called 'admins' apart from the normal application users who use the Application Panel and a table 'users'.
I have the Shield panel installed on my admin panel since I only manage roles and permissions for there for both panels. As you probably know well, the only way for Spatie Permissions to distinguish between the two is through the auth guard: one for web and one for admin.
In my config the only way I see to generate permissions for both panels is to set the following in my filament-shield config:
But when I want to create a role for the Application Panel only with the web auth, it also shows also the permissions for the Admin Panel. It would be great if there (where there is currently the free-type field for the guard) could have a select drop down which is populated ie. from the shield config in a pattern like:
or it can be populated from the standard Laravel Config/Auth.php file. And once the auth is selected it filters the selectable permissions and resources down to the select auth guard. Or have a filter on the resource and permissions select view to only filter to the available ones for the targeted guard. Or show the guard for the specific resource listed on that page.
Do you think this is possible, or does it already support this and I am doing maybe something wrong in my setup?
My folder structure is like this (following the standard Filment practice):
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Hi @bezhanSalleh
I have 2 panels. An Admin panel with an auth guard "admin" where only the system administrator can log into. And an Application panel with an "web" guard for customer users.
The Admin users are saved in their own table called 'admins' apart from the normal application users who use the Application Panel and a table 'users'.
I have the Shield panel installed on my admin panel since I only manage roles and permissions for there for both panels. As you probably know well, the only way for Spatie Permissions to distinguish between the two is through the auth guard: one for web and one for admin.
In my config the only way I see to generate permissions for both panels is to set the following in my filament-shield config:
But when I want to create a role for the Application Panel only with the web auth, it also shows also the permissions for the Admin Panel. It would be great if there (where there is currently the free-type field for the guard) could have a select drop down which is populated ie. from the shield config in a pattern like:
[ 'web' => 'Web Application', 'admin' => 'Admin Portal' ]with the default:
[ 'web' => 'Web Application', ]or it can be populated from the standard Laravel Config/Auth.php file. And once the auth is selected it filters the selectable permissions and resources down to the select auth guard. Or have a filter on the resource and permissions select view to only filter to the available ones for the targeted guard. Or show the guard for the specific resource listed on that page.
Do you think this is possible, or does it already support this and I am doing maybe something wrong in my setup?
My folder structure is like this (following the standard Filment practice):
Especially when I have 2 resources with the same name it becomes hard to see which one is for which since it is shown twice.
Would appreciate your feedback. I have tried to see if I can add it as a pull-request but went a bit down a rabbit hole to figure it out. :)
Thanks!
All reactions