9a7622ebed
fix: pass actor to CustomFieldLive.FormComponent for save
...
IndexComponent now passes actor to FormComponent; FormComponent uses
assigns[:actor] instead of current_actor(socket). Add test that submits
new custom field form on settings page.
2026-01-29 16:10:12 +01:00
1d17c4f2dd
fix: CustomField policies, no system-actor fallback, guidelines
...
- Tests and UI pass actor for CustomField create/read/destroy; seeds use actor
- Member required-custom-fields validation uses context.actor only (no fallback)
- CODE_GUIDELINES: add rule forbidding system-actor fallbacks
2026-01-29 16:10:12 +01:00
36b5d5880b
Add CustomField resource policies and tests
...
- Add policies block with HasPermission for read/create/update/destroy
- Add authorizers: [Ash.Policy.Authorizer] to CustomField resource
- Add custom_field_policies_test.exs (read all roles, write admin only)
- Fix CustomField path in roles-and-permissions doc (lib/membership)
2026-01-29 16:10:12 +01:00
9b314a9806
fix: credo error
continuous-integration/drone/push Build is passing
continuous-integration/drone/promote/production Build is passing
2026-01-29 15:26:45 +01:00
b4adf63e83
feix: optimize queries for groups
continuous-integration/drone/push Build is failing
2026-01-29 15:22:40 +01:00
124ab295a6
fix: select all checkbox handling
2026-01-29 15:14:36 +01:00
0a1b52d978
test: fix tests
continuous-integration/drone/push Build was killed
continuous-integration/drone/pr Build is failing
2026-01-29 14:39:31 +01:00
0b29fbbd21
test: restore removed tests including optimizations
2026-01-29 12:59:06 +01:00
3f0dc868c9
chore: disable test performance output again
continuous-integration/drone/push Build is passing
2026-01-28 14:54:59 +01:00
c3ad8894b0
refactor: implement more review comments
continuous-integration/drone/push Build is passing
2026-01-28 14:47:30 +01:00
ea3bdcaa65
refactor: apply review comments
continuous-integration/drone/push Build is passing
2026-01-28 14:42:16 +01:00
050ca4a13c
test: move slow and less critical tests to nightly suite
continuous-integration/drone/push Build is passing
2026-01-28 14:34:05 +01:00
91f8bb03bc
refactor: remove tests against basic framework functionalities
continuous-integration/drone/push Build is passing
2026-01-28 13:46:18 +01:00
15d328afbf
test: optimize single test and update docs
continuous-integration/drone/push Build is passing
2026-01-28 13:33:39 +01:00
6efad280bd
refactor: apply review comments
continuous-integration/drone/push Build is passing
2026-01-28 12:36:19 +01:00
67e06e12ce
refactor: move slow performance tests to extra test suite
continuous-integration/drone/push Build is passing
2026-01-28 12:00:32 +01:00
fce01ddf83
style: fix formatting
continuous-integration/drone/push Build is passing
2026-01-28 11:32:46 +01:00
f9403c1da9
refactor: improve seeds tests performance by reducing complexity
continuous-integration/drone/push Build is failing
2026-01-28 11:31:31 +01:00
ddc8335cc0
refactor: improve groups LiveView based on code review feedback
continuous-integration/drone/push Build is passing
2026-01-28 10:33:27 +01:00
3eb4cde0b7
Merge remote-tracking branch 'origin/main' into feature/372-groups-management
continuous-integration/drone/push Build is passing
2026-01-27 23:48:31 +01:00
9991291b2f
test: adapt tests to reflect implementation details
continuous-integration/drone/push Build is passing
2026-01-27 23:40:12 +01:00
6faa9847f4
feat: add groups administration #372
2026-01-27 21:55:17 +01:00
f05fae3ea3
test: add tdd tests for groups administration #372
continuous-integration/drone/push Build is failing
2026-01-27 18:24:42 +01:00
2b4e1e3963
Sync user email to member when changing password (admin_set_password)
...
continuous-integration/drone/push Build is passing
Add SyncUserEmailToMember change to admin_set_password so email+password
updates in the user form sync the new email to the linked member.
2026-01-27 17:58:35 +01:00
7d33acde9f
feat(system_actor): add system_user?/1 and normalize email
...
Case-insensitive email comparison for system-actor detection.
2026-01-27 17:39:04 +01:00
9c31f0c16c
Add tests for system actor protection and hiding
...
Index: system actor not in list, destroy returns Ash.Error.Invalid. Show/Form:
redirect to /users when viewing or editing system actor user.
2026-01-27 17:39:04 +01:00
5df1da1573
Merge branch 'main' into feature/371-groups-resource
continuous-integration/drone/push Build is passing
2026-01-27 17:16:34 +01:00
fc8306cfee
test: resolve warnings
continuous-integration/drone/push Build is passing
2026-01-27 16:38:17 +01:00
0219073d33
CFV policies test: system_actor for setup, verify destroy with actor
...
- create_linked_member_for_user and create_unlinked_member use actor
(system_actor) directly instead of creating admin user per call
- Remove create_admin_user helper
- After destroy, verify with Ash.get(..., actor: actor) to avoid
false positive from Forbidden vs NotFound
2026-01-27 16:07:01 +01:00
4e032ea778
Add CustomFieldValue policy tests (own_data, read_only, normal_user, admin)
...
Covers read/update/create/destroy for linked vs unlinked members and CRUD
permissions per permission set.
2026-01-27 16:07:01 +01:00
17831a0948
Pass actor to CustomFieldValue destroy and load in existing tests
...
Required after CustomFieldValue gained authorization policies.
2026-01-27 16:07:01 +01:00
6db64bf996
feat: add groups resource #371
continuous-integration/drone/push Build is failing
2026-01-27 16:03:21 +01:00
0216dfcbbb
test: add tests for group resource #371
continuous-integration/drone/push Build is failing
2026-01-27 15:04:26 +01:00
562265f212
Security: Require actor parameter in CSV import
...
Remove fallback to system_actor in process_chunk to prevent
unauthorized access. Actor must now be explicitly provided.
2026-01-25 18:33:25 +01:00
79361c72d2
fix tests and linting
2026-01-25 17:31:49 +01:00
0fe4a55e80
formatting and refactoring
2026-01-25 17:31:48 +01:00
bf7e47ce5c
refactor
2026-01-25 17:31:42 +01:00
04b0916c1e
refactor
2026-01-25 17:30:07 +01:00
092fd99d48
fat: adds csv import live view to settings
2026-01-25 17:30:03 +01:00
bf9e47b257
test: adds live view csv import tests
2026-01-25 17:22:28 +01:00
2d446f63ea
Add NOT NULL constraint to users.role_id and optimize default_role_id
...
continuous-integration/drone/push Build is passing
- Add database-level NOT NULL constraint for users.role_id
- Update SystemActor tests to verify NOT NULL constraint enforcement
- Add process dictionary caching for default_role_id/0 to reduce DB queries
2026-01-25 17:04:48 +01:00
8f3fd9d0d7
test: adapt tests for attribute-level default solution
2026-01-25 13:42:45 +01:00
e7bf777be2
refactor: remove AssignDefaultRole change module
...
The attribute-level default solution makes this change module obsolete.
All role assignment is now handled via the role_id attribute's default
function, which is more robust and works for all creation paths.
2026-01-25 13:42:35 +01:00
21b63cbe86
Add comprehensive tests for default role assignment
continuous-integration/drone/push Build is passing
2026-01-24 19:16:57 +01:00
3b5b5044fb
Add test support for default role assignment
2026-01-24 19:16:43 +01:00
b545d2b9e1
Remove NoActor module, improve Member validation, update docs
2026-01-24 11:59:18 +01:00
71c13d0ac0
Fix missing actor parameters and restore AshAuthentication bypass tests
continuous-integration/drone/push Build is passing
2026-01-24 08:51:58 +01:00
15a7c615d6
Fix rebase conflict: Add actor parameter to helper functions in index_test.exs
continuous-integration/drone/push Build is passing
2026-01-24 02:39:28 +01:00
fcca4b0b89
Use admin_user instead of system_actor in LiveView tests
2026-01-24 02:21:10 +01:00
bebd7f6fe2
Fix tests: Remove redundant system_actor and update test descriptions
2026-01-24 02:21:09 +01:00