mirror of
https://github.com/penpot/penpot.git
synced 2025-06-03 02:11:38 +02:00
♻️ Unify flags parsing on backend.
This commit is contained in:
parent
da1135c80f
commit
8a0bba3c7a
13 changed files with 140 additions and 147 deletions
|
@ -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]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue