♻️ Unify flags parsing on backend.

This commit is contained in:
Andrey Antukh 2021-09-16 14:40:50 +02:00 committed by Andrés Moya
parent da1135c80f
commit 8a0bba3c7a
13 changed files with 140 additions and 147 deletions

View file

@ -54,22 +54,11 @@
:browser
:webworker))
(def available-flags
#{:registration
:audit-log
:demo-users
:user-feedback
:demo-warning
:login-with-ldap})
(def default-flags
#{:registration :demo-users})
(defn- parse-flags
[global]
(let [flags (obj/get global "penpotFlags" "")
flags (into #{} (map keyword) (str/words flags))]
(flags/parse default-flags flags)))
(flags/parse flags flags/default)))
(defn- parse-version
[global]