0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-02-03 04:49:03 -05:00

Disable oidc registration when registration flag is disabled

This commit is contained in:
Andrey Antukh 2024-03-26 13:38:45 +01:00 committed by Andrés Moya
parent a969550aa4
commit 81b52d7170

View file

@ -574,7 +574,9 @@
:else :else
(let [info (assoc info :is-active (provider-has-email-verified? cfg info))] (let [info (assoc info :is-active (provider-has-email-verified? cfg info))]
(redirect-to-register cfg info)))) (if (contains? cf/flags :registration)
(redirect-to-register cfg info)
(redirect-with-error "registration-disabled")))))
(defn- auth-handler (defn- auth-handler
[cfg {:keys [params] :as request}] [cfg {:keys [params] :as request}]