mirror of
https://github.com/penpot/penpot.git
synced 2025-04-15 16:31:25 -05: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
backend/src/app/rpc/mutations
common/src/app/common
frontend/src/app/main/ui/auth
|
@ -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
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
(def default
|
||||
"A common flags that affects both: backend and frontend."
|
||||
[:enable-registration
|
||||
:enable-demo-users])
|
||||
:enable-login])
|
||||
|
||||
(defn parse
|
||||
[& flags]
|
||||
|
|
|
@ -96,7 +96,6 @@
|
|||
(login-with-ldap event (with-meta params
|
||||
{:on-error on-error
|
||||
:on-success on-succes})))))]
|
||||
|
||||
[:*
|
||||
(when-let [message @error]
|
||||
[:& msgs/inline-banner
|
||||
|
|
Loading…
Add table
Reference in a new issue