mirror of
https://github.com/penpot/penpot.git
synced 2025-06-06 23:01:37 +02:00
✨ Improve disabled registry flows
This commit is contained in:
parent
00bb988ecc
commit
cd51f2f652
6 changed files with 99 additions and 30 deletions
|
@ -180,10 +180,11 @@
|
|||
(defn- validate-register-attempt!
|
||||
[cfg params]
|
||||
|
||||
(when-not (contains? cf/flags :registration)
|
||||
(when-not (contains? params :invitation-token)
|
||||
(ex/raise :type :restriction
|
||||
:code :registration-disabled)))
|
||||
(when (or
|
||||
(not (contains? cf/flags :registration))
|
||||
(not (contains? cf/flags :login-with-password)))
|
||||
(ex/raise :type :restriction
|
||||
:code :registration-disabled))
|
||||
|
||||
(when (contains? params :invitation-token)
|
||||
(let [invitation (tokens/verify (::setup/props cfg)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue