fix: formatting
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
Moritz 2025-07-23 00:04:03 +02:00
parent 2accfffa46
commit 845f347fac
Signed by: moritz
GPG key ID: 1020A035E5DD0824
6 changed files with 199 additions and 143 deletions

View file

@ -109,6 +109,14 @@ defmodule Mv.Accounts.User do
end
end
# Global validations - applied to all relevant actions
validations do
# Password strength policy: minimum 8 characters for all password-related actions
validate string_length(:password, min: 8) do
where action_is([:register_with_password, :admin_set_password])
end
end
attributes do
uuid_primary_key :id
@ -126,14 +134,6 @@ defmodule Mv.Accounts.User do
identity :unique_oidc_id, [:oidc_id]
end
# Global validations - applied to all relevant actions
validations do
# Password strength policy: minimum 8 characters for all password-related actions
validate string_length(:password, min: 8) do
where action_is([:register_with_password, :admin_set_password])
end
end
# You can customize this if you wish, but this is a safe default that
# only allows user data to be interacted with via AshAuthentication.
# policies do