Commit graph

37 commits

Author SHA1 Message Date
24d130ffb5 OIDC: use UserHelpers.has_oidc? in index and show
- Index OIDC column and show OIDC item use has_oidc? instead of raw oidc_id.
- Avoids empty string showing as Linked.
2026-02-04 11:40:21 +01:00
d7c6d20483 User form: red warning for OIDC users when setting/changing password
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/promote/production Build is passing
- Show alert when user has oidc_id and password section is visible.
- Explains that password here does not change SSO/identity provider password.
2026-02-04 11:07:01 +01:00
c6082f2831 Users list and show: Role, Password, OIDC columns; UserHelpers
- Index: load :role; columns Role, Password (has_password?), OIDC; contrast fix.
- Show: Role, OIDC (Linked/Not linked); has_password? for Password Authentication.
- UserHelpers: has_password?/1, has_oidc?/1. Gettext: new strings and DE translations.
2026-02-04 11:06:52 +01:00
8ec4a07103 User form: persist role, member linking, Forbidden handling
- User resource: update_user accepts role_id, manage_relationship :member
- user_live/form: touch role_id, params_with_member_if_unchanged to avoid unlink
- Handle Forbidden in form, extract error message for display
- user_policies_test and form_test coverage
2026-02-03 23:52:20 +01:00
ee6bfbacbb User LiveViews: row_id and data-testid for actions
Table row_id for scoped selectors; data-testid on New/Edit/Delete.
2026-02-03 17:16:13 +01:00
2f67c7099d
Apply UI authorization to User LiveViews (Index and Show)
Gate New User button, Edit and Delete links with can?/3.
Edit button on User Show visible only when user can update the user.
2026-02-03 16:56:51 +01:00
6e13a3aa34
Docs: note User-Member Linking enforcement in code
Some checks reported errors
continuous-integration/drone/push Build was killed
continuous-integration/drone/promote/production Build is failing
- update_user restricted via ActorIsAdmin; Form gates Member-Linking UI
2026-01-30 11:28:41 +01:00
06d6531569 UserLive.Form: gate Member-Linking to admin, use :update for non-admin
- Show Member-Linking UI only when can_manage_member_linking (admin)
- perform_member_link_action runs only for admin
- assign_form: non-admin uses :update (email), admin uses :update_user
- Load members for linking only when can_manage_member_linking
2026-01-30 11:13:28 +01:00
124ab295a6
fix: select all checkbox handling 2026-01-29 15:14:36 +01:00
cbcb93418e feat(user_live): handle system user in form and show
Early return / load_user_or_redirect, use system_user? to avoid editing system actor.
2026-01-27 17:39:04 +01:00
41bc031cc6 refactor(web): extract format_ash_error to MvWeb.ErrorHelpers
Use shared ErrorHelpers in UserLive.Index for consistent Ash error formatting.
2026-01-27 17:39:04 +01:00
8ad5201e1a Hide system actor from user list and block show/edit
Index: filter out SystemActor.system_user_email() in query. Show/Form:
redirect to /users with flash when viewing or editing system actor user.
Index format_error: handle Ash errors without :message field.
2026-01-27 17:39:04 +01:00
86c8b23c77
chore: increase test timeout and cleanup unused code
All checks were successful
continuous-integration/drone/push Build is passing
2026-01-25 13:42:54 +01:00
47c938cc50 Centralize role preloading in global LiveView on_mount
Add ensure_user_role_loaded to global live_view quote block.
Remove redundant on_mount calls from individual LiveViews.
2026-01-22 21:36:15 +01:00
89fbd55250
refactor: Reduce nesting depth in UserLive.Form.load_members_for_linking 2026-01-13 15:21:00 +01:00
eb81d5f7cb
refactor: Simplify UserLive.Form handle_event and improve error handling
- Extract handle_member_linking, perform_member_link_action helpers
- Extract handle_save_success, get_action_name, handle_member_link_error
- Replace hardcoded strings with gettext translations
- Use submit_form wrapper for consistent actor handling
- Group all handle_event/3 clauses together
- Add early return in load_members_for_linking if actor is nil
2026-01-13 15:17:07 +01:00
a22081f288
refactor: Replace bang calls with error handling in Index LiveViews
- Replace Ash.get!/Ash.destroy! with Ash.get/Ash.destroy
- Add case statements for Forbidden, NotFound, and generic errors
- Display user-friendly flash messages for all error cases
- Use Enum.map_join/3 for efficient error formatting
2026-01-13 15:17:07 +01:00
cd7e6b0843
Use current_actor/1 helper in all LiveViews
Replace inconsistent actor access patterns with current_actor/1 helper
and ensure actor is passed to all Ash operations for proper authorization.
2026-01-13 15:16:00 +01:00
ee3e1745e0 fix linting errors
Some checks failed
continuous-integration/drone/push Build is failing
2026-01-07 10:59:20 +01:00
9f97515d74 chore: movs display name helper to won helper module 2026-01-07 09:54:37 +01:00
b59a4ef61a feat: adds email as fallback for name in member details
Some checks failed
continuous-integration/drone/push Build is failing
2026-01-06 16:43:13 +01:00
ee414c9440
Hide OIDC ID and ID columns for users 2025-12-03 14:20:14 +01:00
3da0ebcb3f
feat: Add keyboard navigation to member linking dropdown
All checks were successful
continuous-integration/drone/push Build is passing
2025-11-27 16:05:56 +01:00
4b4ec63613 feat: improve user-member linking UI and error messages
All checks were successful
continuous-integration/drone/push Build is passing
Reload members on email change, extract user-friendly errors from Ash, add translations
2025-11-20 21:45:05 +01:00
9a03485604
refactor: add typespecs and module constants
- Add @spec for public functions in Member and UserLive.Form
- Replace magic numbers with module constants:
  - @member_search_limit = 10
  - @default_similarity_threshold = 0.2
- Add comprehensive @doc for filter_by_email_match and fuzzy_search
2025-11-20 16:51:45 +01:00
af193840e2
feat: add user-member linking UI with autocomplete (#168) 2025-11-20 16:51:44 +01:00
1805916359
docs: add @moduledoc to all LiveView modules
Add comprehensive module documentation to 12 LiveView modules covering
member, user, property, and property_type management views.
2025-11-13 11:20:32 +01:00
23d1ca8a32
fix: axe-core critical and major issues 2025-10-16 12:30:02 +02:00
eeed537062
feat: add member-user link in member view and user view 2025-10-16 12:30:01 +02:00
1d334c7da1
fix: add missing user for view and fix test
Some checks failed
continuous-integration/drone/push Build is failing
2025-09-29 16:59:35 +02:00
863821f3ae
test: fix tests and skip tests for initials generation
Some checks failed
continuous-integration/drone/push Build is failing
2025-09-29 16:05:00 +02:00
e3dd333e89
feat: add userdata for profile button #170 2025-09-29 15:34:00 +02:00
06574a932d fix: formatting
All checks were successful
continuous-integration/drone/push Build is passing
2025-07-24 17:07:20 +02:00
662e80cc74 feat: set password for new and for existing user 2025-07-24 17:07:20 +02:00
5959c9f545 feat: use layout from memberlist 2025-07-24 17:07:20 +02:00
df9966bb12 feat: account live view - basic functionality 2025-07-24 17:07:20 +02:00
fd8c853879 feat: account live view - generated files 2025-07-24 17:07:20 +02:00