mirror of
https://github.com/penpot/penpot.git
synced 2025-06-05 21:01:39 +02:00
✨ Add parameter to disable registration
This commit is contained in:
parent
79f7d29df9
commit
e8bd7436aa
6 changed files with 14 additions and 2 deletions
|
@ -62,6 +62,7 @@
|
|||
|
||||
"history.alert-message" "You are seeing version %s"
|
||||
"errors.api.form.old-password-not-match" "Incorrect old password"
|
||||
"errors.api.form.registration-disabled" "The registration is currently disabled."
|
||||
"errors.api.form.email-already-exists" "The email is already in use by another user."
|
||||
"errors.api.form.username-already-exists" "The username is already in use by another user."
|
||||
"errors.api.form.user-not-exists" "Username or email does not matches any existing user."
|
||||
|
|
|
@ -62,6 +62,7 @@
|
|||
|
||||
"history.alert-message" "Vous voyez la version %s"
|
||||
"errors.api.form.old-password-not-match" "Ancien mot de passe incorrect"
|
||||
"errors.api.form.registration-disabled" "L'enregistrement est actuellement désactivé."
|
||||
"errors.api.form.email-already-exists" "L'email est déjà utilisé par un autre utilisateur."
|
||||
"errors.api.form.username-already-exists" "Le nom d'utilisateur est déjà utilisé par un autre utilisateur."
|
||||
"errors.api.form.user-not-exists" "Le nom d'utilisateur ou l'e-mail ne correspond à aucun utilisateur existant."
|
||||
|
|
|
@ -51,6 +51,8 @@
|
|||
(st/emit! (assoc-value field value))))
|
||||
(on-error [{:keys [type code] :as payload}]
|
||||
(case code
|
||||
:uxbox.services.users/registration-disabled
|
||||
(st/emit! "Registration is disabled")
|
||||
:uxbox.services.users/email-already-exists
|
||||
(st/emit! (assoc-error :email "Email already exists"))
|
||||
:uxbox.services.users/username-already-exists
|
||||
|
|
|
@ -59,6 +59,8 @@
|
|||
(st/emit! (assoc-value field value))))
|
||||
(on-error [{:keys [code] :as payload}]
|
||||
(case code
|
||||
:uxbox.services.users/registration-disabled
|
||||
(st/emit! "Registration is disabled")
|
||||
:uxbox.services.users/email-already-exists
|
||||
(st/emit! (assoc-error :email "Email already exists"))
|
||||
:uxbox.services.users/username-already-exists
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue