Let members change only their contact data on their own record closes #664 #680
No reviewers
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!680
Loading…
Reference in a new issue
No description provided.
Delete branch "issue/mitgliederverwaltung-664"
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?
closes #664
Description of the implemented changes
The changes were:
Security: a member could change fields of the own record that only the board may change (exit and join date, notes, data field values, membership fee type). The server now accepts only the contact data from members, and the member pages show the rest read-only.
What has been changed?
Definition of Done
Code Quality
Accessibility
Testing
Additional Notes
Mv.Membership.Member.FieldAccessis the single place that decides which member fields an actor may change. It reads the Member update scope fromPermissionSets, not role names: scope:allgets the full:update_member, scope:linkedgets the new:update_contact_data(first/last name, email, street, house number, postal code, city, country). Both the policy and the LiveViews ask it.:update_memberhas an additional policy (ActorMayUpdateAllMembers), so a member gets Forbidden on it for every field, including forged requests outside the UI. Theown_datapermission set no longer creates, updates or destroys custom field values; reading stays.:update_contact_data, so a missing join date or postal code the board must fill does not block a member's address change.MvWeb.Authorization.can?(user, :update, member)is still true for a member on the own record (contact data). Controls meant for the board must checkFieldAccess.full_access?/1.