Merge branch 'main' into fix-member-deletion

This commit is contained in:
carla 2025-09-25 08:49:21 +02:00
commit b48038ed29
2 changed files with 48 additions and 4 deletions

View file

@ -19,16 +19,15 @@ defmodule Mv.Accounts.User do
Currently password and SSO with Rauthy as OIDC provider
"""
authentication do
session_identifier Application.compile_env(:mv, :session_identifier, :jti)
session_identifier Application.compile_env!(:mv, :session_identifier)
tokens do
enabled? true
token_resource Mv.Accounts.Token
require_token_presence_for_authentication? Application.compile_env(
require_token_presence_for_authentication? Application.compile_env!(
:mv,
:require_token_presence_for_authentication,
false
:require_token_presence_for_authentication
)
store_all_tokens? true

View file

@ -47,3 +47,48 @@ end
Accounts.create_user!(%{email: "admin@mv.local"}, upsert?: true, upsert_identity: :unique_email)
|> Ash.Changeset.for_update(:admin_set_password, %{password: "testpassword"})
|> Ash.update!()
# Create sample members for testing
for member_attrs <- [
%{
first_name: "Hans",
last_name: "Müller",
email: "hans.mueller@example.de",
birth_date: ~D[1985-06-15],
join_date: ~D[2023-01-15],
paid: true,
phone_number: "+49301234567",
city: "München",
street: "Hauptstraße",
house_number: "42",
postal_code: "80331"
},
%{
first_name: "Greta",
last_name: "Schmidt",
email: "greta.schmidt@example.de",
birth_date: ~D[1990-03-22],
join_date: ~D[2023-02-01],
paid: false,
phone_number: "+49309876543",
city: "Hamburg",
street: "Lindenstraße",
house_number: "17",
postal_code: "20095",
notes: "Interessiert an Fortgeschrittenen-Kursen"
},
%{
first_name: "Friedrich",
last_name: "Wagner",
email: "friedrich.wagner@example.de",
birth_date: ~D[1978-11-08],
join_date: ~D[2022-11-10],
paid: true,
phone_number: "+49301122334",
city: "Berlin",
street: "Kastanienallee",
house_number: "8"
}
] do
Membership.create_member!(member_attrs)
end