Merge branch 'main' into feat/299_plz
This commit is contained in:
commit
bfc078d5aa
45 changed files with 2187 additions and 425 deletions
29
priv/repo/migrations/20260224122831_add_oidc_to_settings.exs
Normal file
29
priv/repo/migrations/20260224122831_add_oidc_to_settings.exs
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
defmodule Mv.Repo.Migrations.AddOidcToSettings do
|
||||
@moduledoc """
|
||||
Adds OIDC configuration columns to settings (ENV-overridable in UI).
|
||||
"""
|
||||
|
||||
use Ecto.Migration
|
||||
|
||||
def up do
|
||||
alter table(:settings) do
|
||||
add :oidc_client_id, :string
|
||||
add :oidc_base_url, :string
|
||||
add :oidc_redirect_uri, :string
|
||||
add :oidc_client_secret, :string
|
||||
add :oidc_admin_group_name, :string
|
||||
add :oidc_groups_claim, :string
|
||||
end
|
||||
end
|
||||
|
||||
def down do
|
||||
alter table(:settings) do
|
||||
remove :oidc_client_id
|
||||
remove :oidc_base_url
|
||||
remove :oidc_redirect_uri
|
||||
remove :oidc_client_secret
|
||||
remove :oidc_admin_group_name
|
||||
remove :oidc_groups_claim
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
@ -0,0 +1,20 @@
|
|||
defmodule Mv.Repo.Migrations.AddOidcOnlyToSettings do
|
||||
@moduledoc """
|
||||
Adds oidc_only flag to settings. When true and OIDC is configured,
|
||||
the sign-in page shows only OIDC (password login is hidden).
|
||||
"""
|
||||
|
||||
use Ecto.Migration
|
||||
|
||||
def up do
|
||||
alter table(:settings) do
|
||||
add :oidc_only, :boolean, default: false, null: false
|
||||
end
|
||||
end
|
||||
|
||||
def down do
|
||||
alter table(:settings) do
|
||||
remove :oidc_only
|
||||
end
|
||||
end
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue