[FEATURE]: CustomField Resource Policies #386
Labels
No labels
bug
duplicate
enhancement
help wanted
high priority
invalid
L
low priority
M
medium priority
needs refinement
optional
question
S
UX research
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: local-it/mitgliederverwaltung#386
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Description
Add authorization policies to the CustomField resource. CustomFields are admin-managed; all authenticated users can read them (scope :all). No bypass policy is needed for read, because read uses scope :all and HasPermission authorizes list reads directly.
Tasks
lib/membership/custom_field.expoliciesblockaction_type([:read, :create, :update, :destroy])withauthorize_if Mv.Authorization.Checks.HasPermissionAcceptance Criteria
Test Strategy (TDD)
Test file:
test/mv/membership/custom_field_policies_test.exsStructure and helpers can follow
test/mv/membership/custom_field_value_policies_test.exs(system_actor setup, users with each permission set, etc.).Read access (all roles)
:own_datacan read all custom fields:read_onlycan read all custom fields:normal_usercan read all custom fields:admincan read all custom fieldsWrite access (admin only)
Notes
destroy :destroy_with_values(primary). HasPermission uses action_type:destroy, so no PermissionSets or policy change is needed for the destroy action.