[BUG]: Members can change fields they must not change on their own record #664
Labels
No labels
bug
duplicate
enhancement
help wanted
high priority
invalid
L
low priority
M
medium priority
needs refinement
optional
question
S
security
technical improvement
UX Improvement
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
local-it/mitgliederverwaltung#664
Loading…
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
A member who is signed in (permission set
own_data) can change every field of their own member record, not only their contact data. Reproduced on maina927a3a4: signed in as a member, a note was saved on the own record.What a member can change today:
membership_fee_start_date(not in the form, but accepted by the action);Protected today: linking to a user account, deleting the member, fee cycles.
Cause:
:update_memberaccepts allmember_fieldsplus fee fields (lib/mv/membership/member.ex:129); theown_datapolicy checks only the record scope:linked(member.ex:244-248,lib/mv/authorization/permission_sets.ex:123-128); the deactivate component offers reactivate to members (lib/mv_web/live/member_live/show/deactivate_component.ex:31-49).Proposal
Acceptance criteria
membership_fee_start_dateor any custom field gets them rejected; tests send the forged input through the LiveView and the action.Dependencies