laravel / nova-issues

556 stars 34 forks source link

Policy not evaluated or reflected in UI for repeaters #6226

Open davidbankes opened 9 months ago

davidbankes commented 9 months ago

Description:

I have a parent model/resource with a HasMany relation. I have two UIs to manage the child relation: a HasMany field on the parent resource, and a Repeater on the parent resource. Both refer to the same underlying model.

The HasMany relation will reflect the associated Policy (e.g., the delete button will disappear if the nova user lacks permission to delete the resource). But on the repeater, all UI remains.

Detailed steps to reproduce the issue on a fresh Nova installation:

  1. Create a model & resource with a HasMany model & resource.
  2. Create a policy for the child resource that disallows, e.g., creation or deletion.
  3. Create a Repeater for the child resource on the parent. Note that it still has UI for creation and deletion of models.
stale[bot] commented 8 months ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.