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
{{ message }}
This repository was archived by the owner on Sep 19, 2023. It is now read-only.
I'm not sure if this is a silly idea or if its even possible but can the plugin respect policies?
For example, in the scenario where a user is not allowed to view a model:
/**
* Determine whether the user can view the model.
*
* @param \App\Models\User $user
* @param \App\Models\User $model
* @return mixed
*/
public function view(User $user, User $model)
{
return false;
}
When they edit the record the breadcrumbs still include a link to the view page e.g:
http://app.test/dashboard/resources/users/16
When clicked, the policy kicks in as it should and results in a 403 but this seems misleading from a UI perspective. Maybe in this scenario that section of the breadcrumb should remain as text (not hyperlinked)?
I'm not sure if this is a silly idea or if its even possible but can the plugin respect policies?
For example, in the scenario where a user is not allowed to view a model:
When they edit the record the breadcrumbs still include a link to the
view pagee.g:When clicked, the policy kicks in as it should and results in a 403 but this seems misleading from a UI perspective. Maybe in this scenario that section of the breadcrumb should remain as text (not hyperlinked)?
Thanks for your time.