fix admin database seeding closes #357 #358
No reviewers
Labels
No labels
bug
duplicate
enhancement
help wanted
high priority
invalid
L
low priority
M
medium priority
needs refinement
optional
question
S
UX research
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: local-it/mitgliederverwaltung#358
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "bugfix/reseeding-database-not-working"
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?
Description of the implemented changes
The changes were:
Fix database seeding: Admin user role assignment now works for both newly created users and existing users (e.g., via OIDC). Added support for configurable admin email via environment variable.
What has been changed?
Fixed admin user role assignment in seeds:
admin@mv.localto configurableadmin@localhost(default, can be overridden viaADMIN_EMAILenv var)Ash.read_onecalls to use proper Query syntax withAsh.Query.filterinstead of invalid direct filter argumentsAdded test for authorization:
test/membership/member_test.exs- "user without role cannot create member"Ash.Error.Forbidden.Policywhen attempting to create membersDocumentation updates:
docs/development-progress-log.mdto reflect new default admin emailDefinition of Done
Code Quality
Accessibility
Testing
Additional Notes
ADMIN_EMAILenvironment variable (defaults toadmin@localhost)admin@localhost) will automatically receive the admin role when seeds are runadmin@mv.localtoadmin@localhostfor better local development compatibilitytype: :append_and_remove(was already correct, no change needed)closes #357to fix admin database seeding closes #357