Commit 57d3e95313188e279cea81ba74e17abcddcfee7b

Thomas de Grivel 2022-12-14T21:23:47

give admin permissions on user totp

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/lib/kmxgit/user_manager/user.ex b/lib/kmxgit/user_manager/user.ex
index 22a00a8..b0aa86d 100644
--- a/lib/kmxgit/user_manager/user.ex
+++ b/lib/kmxgit/user_manager/user.ex
@@ -212,7 +212,7 @@ defmodule Kmxgit.UserManager.User do
 
   def admin_changeset(user, attrs \\ %{}, opts \\ []) do
     user
-    |> cast(attrs, [:deploy_only, :description, :email, :is_admin, :name, :password, :slug_, :ssh_keys])
+    |> cast(attrs, [:deploy_only, :description, :email, :is_admin, :name, :password, :slug_, :ssh_keys, :totp_last, :totp_secret])
     |> validate_email()
     |> maybe_validate_password(opts)
     |> common_changeset()