mirror of
https://github.com/penpot/penpot.git
synced 2025-05-26 01:36:13 +02:00
✨ Enable login flag and disable demo-users by default
This commit is contained in:
parent
36eaa18749
commit
2d76364b09
3 changed files with 8 additions and 5 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue