From 913d67b9786de7ab9f2d8172de21b7e06768ab5c Mon Sep 17 00:00:00 2001 From: Moritz Date: Tue, 13 Jan 2026 17:20:15 +0100 Subject: [PATCH] chore: update docs --- CHANGELOG.md | 35 +++ CODE_GUIDELINES.md | 89 +++++-- README.md | 12 +- docs/csv-member-import-v1.md | 3 +- docs/database-schema-readme.md | 72 +++++- docs/database_schema.dbml | 140 ++++++++++- docs/development-progress-log.md | 158 +++++++++++- docs/documentation-sync-todos.md | 128 ++++++++++ docs/feature-roadmap.md | 178 +++++++------ docs/membership-fee-architecture.md | 4 +- docs/membership-fee-overview.md | 4 +- docs/roles-and-permissions-architecture.md | 8 +- ...les-and-permissions-implementation-plan.md | 3 +- docs/roles-and-permissions-overview.md | 4 +- docs/sidebar-analysis-current-state.md | 9 +- docs/sidebar-requirements-v2.md | 3 +- docs/test-failures-analysis.md | 233 ------------------ docs/test-status-membership-fee-ui.md | 137 ---------- docs/umsetzung-sidebar.md | 11 +- 19 files changed, 732 insertions(+), 499 deletions(-) create mode 100644 docs/documentation-sync-todos.md delete mode 100644 docs/test-failures-analysis.md delete mode 100644 docs/test-status-membership-fee-ui.md diff --git a/CHANGELOG.md b/CHANGELOG.md index 28b4a37..2c23c01 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,27 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] ### Added +- **Roles and Permissions System (RBAC)** - Complete implementation (#345, 2026-01-08) + - Four hardcoded permission sets: `own_data`, `read_only`, `normal_user`, `admin` + - Database-backed roles with permission set references + - Member resource policies with scope filtering (`:own`, `:linked`, `:all`) + - Authorization checks via `Mv.Authorization.Checks.HasPermission` + - System role protection (critical roles cannot be deleted) + - Role management UI at `/admin/roles` +- **Membership Fees System** - Full implementation + - Membership fee types with intervals (monthly, quarterly, half_yearly, yearly) + - Individual billing cycles per member with payment status tracking + - Cycle generation and regeneration + - Global membership fee settings + - UI components for fee management +- **Global Settings Management** - Singleton settings resource + - Club name configuration (with environment variable support) + - Member field visibility settings + - Membership fee default settings +- **Sidebar Navigation** - Replaced navbar with standard-compliant sidebar (#260, 2026-01-12) +- **CSV Import Templates** - German and English templates (#329, 2026-01-13) + - Template files in `priv/static/templates/` + - CSV specification documented - User-Member linking with fuzzy search autocomplete (#168) - PostgreSQL trigram-based member search with typo tolerance - WCAG 2.1 AA compliant autocomplete dropdown with ARIA support @@ -19,8 +40,22 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - German/English translations - Docker secrets support via `_FILE` environment variables for all sensitive configuration (SECRET_KEY_BASE, TOKEN_SIGNING_SECRET, OIDC_CLIENT_SECRET, DATABASE_URL, DATABASE_PASSWORD) +### Changed +- **Actor Handling Refactoring** (2026-01-09) + - Standardized actor access with `current_actor/1` helper function + - `ash_actor_opts/1` helper for consistent authorization options + - `submit_form/3` wrapper for form submissions with actor + - All Ash operations now properly pass `actor` parameter +- **Error Handling Improvements** (2026-01-13) + - Replaced `Ash.read!` with proper error handling in LiveViews + - Consistent flash message handling for authorization errors + - Early return patterns for unauthenticated users + ### Fixed - Email validation false positive when linking user and member with identical emails (#168 Problem #4) - Relationship data extraction from Ash manage_relationship during validation - Copy button count now shows only visible selected members when filtering +- Language headers in German `.po` files (corrected from "en" to "de") +- Critical deny-filter bug in authorization system (2026-01-08) +- HasPermission auto_filter and strict_check implementation (2026-01-08) diff --git a/CODE_GUIDELINES.md b/CODE_GUIDELINES.md index 5cc792c..636f3fb 100644 --- a/CODE_GUIDELINES.md +++ b/CODE_GUIDELINES.md @@ -83,7 +83,18 @@ lib/ │ ├── member.ex # Member resource │ ├── custom_field_value.ex # Custom field value resource │ ├── custom_field.ex # CustomFieldValue type resource +│ ├── setting.ex # Global settings (singleton resource) │ └── email.ex # Email custom type +├── membership_fees/ # MembershipFees domain +│ ├── membership_fees.ex # Domain definition +│ ├── membership_fee_type.ex # Membership fee type resource +│ ├── membership_fee_cycle.ex # Membership fee cycle resource +│ └── changes/ # Ash changes for membership fees +├── mv/authorization/ # Authorization domain +│ ├── authorization.ex # Domain definition +│ ├── role.ex # Role resource +│ ├── permission_sets.ex # Hardcoded permission sets +│ └── checks/ # Authorization checks ├── mv/ # Core application modules │ ├── accounts/ # Domain-specific logic │ │ └── user/ @@ -107,7 +118,7 @@ lib/ │ │ ├── table_components.ex │ │ ├── layouts.ex │ │ └── layouts/ # Layout templates -│ │ ├── navbar.ex +│ │ ├── sidebar.ex │ │ └── root.html.heex │ ├── controllers/ # HTTP controllers │ │ ├── auth_controller.ex @@ -123,7 +134,12 @@ lib/ │ │ ├── member_live/ # Member CRUD LiveViews │ │ ├── custom_field_value_live/ # CustomFieldValue CRUD LiveViews │ │ ├── custom_field_live/ -│ │ └── user_live/ # User management LiveViews +│ │ ├── user_live/ # User management LiveViews +│ │ ├── role_live/ # Role management LiveViews +│ │ ├── membership_fee_type_live/ # Membership fee type LiveViews +│ │ ├── membership_fee_settings_live.ex # Membership fee settings +│ │ ├── global_settings_live.ex # Global settings +│ │ └── contribution_type_live/ # Contribution types (mock-up) │ ├── auth_overrides.ex # AshAuthentication overrides │ ├── endpoint.ex # Phoenix endpoint │ ├── gettext.ex # I18n configuration @@ -818,14 +834,17 @@ end ```heex -