Clean up Member leftovers: unused field-visibility helper and cycle-log initiator #588
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#588
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?
Motivation
The Member resource split (#537) kept two pre-existing quirks unchanged on purpose, because that issue
was limited to behavior-preserving moves. Both are small and touch the extracted Member modules, so they
are bundled here.
Scope (ordered steps, CI green each)
Mv.Membership.Member.FieldVisibility.show_in_overview?/1(
lib/mv/membership/member/field_visibility.ex) has no production caller; only its own doctests andtest/mv/membership/member/field_visibility_test.exscall it. The live overview reads the visibilitysetting through
MvWeb.MemberLive.Index.FieldVisibility, so there are now two modules namedFieldVisibilitywith overlapping responsibility. Delete the module and its test file, and remove itsentry from the CODE_GUIDELINES §1.1 tree. Keep the
update_single_member_field_visibility/3tests intest/mv/membership/member_field_visibility_test.exs– they cover live Settings code.Mv.Membership.Member.Changes.GenerateCyclesAfterTransactionreads the initiator from the top-level:actorkey ofchangeset.context. Nothing sets that key – Ash keeps the action's actor undercontext.private.actor– so the cycle-generation log always saysinitiator: system, even when anadmin created or edited the member. Take the actor from the
change/3context (context.actor) andupdate the module doc that currently documents the workaround.
Acceptance criteria
show_in_overview?/1and its module are gone; no otherFieldVisibilitymodule than the overview oneremains in
lib/; the Settings visibility tests still run.Successfully generated cycles for member (initiator: <actor email>); a call without an actor stilllogs
system. Covered by a test that captures the log.just ci-devgreen after each step.Dependencies
Run after #537 (the modules are only at these paths once the Member split is merged).