Notification instead of 403 error page
Hi everyone!
As I'm working with roles and permissions, I have a lot of action that can and cannot be done depending on the user and its role.
Is it possible to get that, instead of triggering a 403 error (from a gate or other policy), a notification with the message "Unauthorized" is triggered?
I imagine it can be done by managing Notifications in the various actions, but I would prefer to write it once and have it work for all cases.
Thank you very much for the support!
As I'm working with roles and permissions, I have a lot of action that can and cannot be done depending on the user and its role.
Is it possible to get that, instead of triggering a 403 error (from a gate or other policy), a notification with the message "Unauthorized" is triggered?
I imagine it can be done by managing Notifications in the various actions, but I would prefer to write it once and have it work for all cases.
Thank you very much for the support!