Skip to content
This repository was archived by the owner on Sep 19, 2023. It is now read-only.
This repository was archived by the owner on Sep 19, 2023. It is now read-only.

Breadcrumbs that respect policies #126

Description

@atmediauk

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)?

Thanks for your time.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions