Enable login flag and disable demo-users by default

This commit is contained in:
Andrey Antukh 2022-03-10 08:37:54 +01:00
parent 36eaa18749
commit 2d76364b09
3 changed files with 8 additions and 5 deletions

View file

@ -281,10 +281,14 @@
:opt-un [::scope ::invitation-token]))
(sv/defmethod ::login
{:auth false
::async/dispatch :default
::rlimit/permits (cf/get :rlimit-password)}
{:auth false ::rlimit/permits (cf/get :rlimit-password)}
[{:keys [pool session tokens] :as cfg} {:keys [email password] :as params}]
(when-not (contains? cf/flags :login)
(ex/raise :type :restriction
:code :login-disabled
:hint "login is disabled in this instance"))
(letfn [(check-password [profile password]
(when (= (:password profile) "!")
(ex/raise :type :validation