Split the Member resource closes #537 #587

Merged
moritz merged 21 commits from issue/mitgliederverwaltung-537 into main 2026-10-14 00:45:37 +02:00
Owner

Description of the implemented changes

The changes were:

  • Bugfixing
  • New Feature
  • Breaking Change
  • Refactoring

Split the Member resource: Member was the membership domain's fan-in hub, mixing the resource declaration with cycle-sync logic, search logic and several inline anonymous-function validations. Behavior at the resource boundary is pinned by tests first; then cycle status, cycle sync, search, the validations and field visibility move into named modules (member.ex shrinks from 1593 to 574 lines and keeps only resource DSL), and a few long-standing bugs are fixed along the way, each with a regression test.

What has been changed?

  • Pin overview search parity and that lone LIKE wildcards match nothing
  • Pin cycle generation on join and exit date changes
  • Pin rejection of linking a user owned by another member
  • Move cycle status helpers into a dedicated read-side module
  • Ignore cycles without a loaded fee type when sorting by cycle end
  • Move cycle generation hooks into named changes and a CycleSync module
  • Generate cycles in the calling process instead of awaiting a task
  • Simplify cycle regeneration and reuse the calendar current-cycle check
  • Move search composition into a Search module with named preparations
  • Move the linked-user guard into a named validation
  • Check user links as system actor without disclosing link state to non-admins
  • Move the required custom fields check into a named validation
  • Move the settings-driven required fields check into a named validation
  • Share one email format validation between members and users
  • Drop leftover imports and point the moduledoc at the extracted modules
  • List the extracted member submodules and the shared email format validation
  • Move overview field visibility out of the resource
  • Count overdue cycles without an unreachable non-list fallback
  • Drop the unused pattern parameter of the substring search filter
  • Let search terms with LIKE metacharacters substring-match literally

Definition of Done

Code Quality

  • No new technical depths
  • Linting passed
  • Documentation is added were needed

Accessibility

  • New elements are properly defined with html-tags
  • Colour contrast follows WCAG criteria
  • Aria labels are added when needed
  • Everything is accessible by keyboard
  • Tab-Order is comprehensible
  • All interactive elements have a visible focus

Testing

  • Tests for new code are written
  • All tests pass
  • axe-core dev tools show no critical or major issues
## Description of the implemented changes The changes were: - [x] Bugfixing - [ ] New Feature - [ ] Breaking Change - [x] Refactoring Split the Member resource: `Member` was the membership domain's fan-in hub, mixing the resource declaration with cycle-sync logic, search logic and several inline anonymous-function validations. Behavior at the resource boundary is pinned by tests first; then cycle status, cycle sync, search, the validations and field visibility move into named modules (`member.ex` shrinks from 1593 to 574 lines and keeps only resource DSL), and a few long-standing bugs are fixed along the way, each with a regression test. ## What has been changed? - Pin overview search parity and that lone LIKE wildcards match nothing - Pin cycle generation on join and exit date changes - Pin rejection of linking a user owned by another member - Move cycle status helpers into a dedicated read-side module - Ignore cycles without a loaded fee type when sorting by cycle end - Move cycle generation hooks into named changes and a CycleSync module - Generate cycles in the calling process instead of awaiting a task - Simplify cycle regeneration and reuse the calendar current-cycle check - Move search composition into a Search module with named preparations - Move the linked-user guard into a named validation - Check user links as system actor without disclosing link state to non-admins - Move the required custom fields check into a named validation - Move the settings-driven required fields check into a named validation - Share one email format validation between members and users - Drop leftover imports and point the moduledoc at the extracted modules - List the extracted member submodules and the shared email format validation - Move overview field visibility out of the resource - Count overdue cycles without an unreachable non-list fallback - Drop the unused pattern parameter of the substring search filter - Let search terms with LIKE metacharacters substring-match literally ## Definition of Done ### Code Quality - [ ] No new technical depths - [x] Linting passed - [x] Documentation is added were needed ### Accessibility - [ ] New elements are properly defined with html-tags - [ ] Colour contrast follows WCAG criteria - [ ] Aria labels are added when needed - [ ] Everything is accessible by keyboard - [ ] Tab-Order is comprehensible - [ ] All interactive elements have a visible focus ### Testing - [x] Tests for new code are written - [x] All tests pass - [ ] axe-core dev tools show no critical or major issues
The link validation runs before the admin-only link policy. Looking the
user up with the caller's actor hid other members' links from admins with
a narrow read scope, while a system-actor lookup for every caller would
tell non-admins whether a user id exists and is linked. Admins, the system
actor and bootstrap calls are now checked as system actor; everyone else is
left to the policy, which forbids the link uniformly.
docs(changelog): record the Member resource split fixes under Unreleased
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/promote/production Build is passing
2e4a7d90a2
moritz merged commit 1278be119e into main 2026-10-14 00:45:37 +02:00
moritz deleted branch issue/mitgliederverwaltung-537 2026-10-14 00:45:37 +02:00
Sign in to join this conversation.
No description provided.