mirror of
https://github.com/penpot/penpot.git
synced 2025-12-12 06:24:17 +01:00
🐛 Preserve frontend-only flags already present on team
This commit is contained in:
@@ -111,8 +111,7 @@
|
|||||||
;; features, because some features can be enabled
|
;; features, because some features can be enabled
|
||||||
;; globally, but the team is still not migrated properly.
|
;; globally, but the team is still not migrated properly.
|
||||||
features (-> (cfeat/get-team-enabled-features cf/flags team)
|
features (-> (cfeat/get-team-enabled-features cf/flags team)
|
||||||
(cfeat/check-client-features! (:features params))
|
(cfeat/check-client-features! (:features params)))
|
||||||
(set/difference cfeat/frontend-only-features))
|
|
||||||
|
|
||||||
;; We also include all no migration features declared by
|
;; We also include all no migration features declared by
|
||||||
;; client; that enables the ability to enable a runtime
|
;; client; that enables the ability to enable a runtime
|
||||||
@@ -124,7 +123,7 @@
|
|||||||
|
|
||||||
params (-> params
|
params (-> params
|
||||||
(assoc :profile-id profile-id)
|
(assoc :profile-id profile-id)
|
||||||
(assoc :features features))]
|
(assoc :features (set/difference features cfeat/frontend-only-features)))]
|
||||||
|
|
||||||
(quotes/check! cfg {::quotes/id ::quotes/files-per-project
|
(quotes/check! cfg {::quotes/id ::quotes/files-per-project
|
||||||
::quotes/team-id team-id
|
::quotes/team-id team-id
|
||||||
|
|||||||
@@ -139,8 +139,7 @@
|
|||||||
|
|
||||||
features (-> (cfeat/get-team-enabled-features cf/flags team)
|
features (-> (cfeat/get-team-enabled-features cf/flags team)
|
||||||
(cfeat/check-client-features! (:features params))
|
(cfeat/check-client-features! (:features params))
|
||||||
(cfeat/check-file-features! (:features file) (:features params))
|
(cfeat/check-file-features! (:features file) (:features params)))
|
||||||
(set/difference cfeat/frontend-only-features))
|
|
||||||
|
|
||||||
changes (if changes-with-metadata
|
changes (if changes-with-metadata
|
||||||
(->> changes-with-metadata (mapcat :changes) vec)
|
(->> changes-with-metadata (mapcat :changes) vec)
|
||||||
@@ -148,7 +147,7 @@
|
|||||||
|
|
||||||
params (-> params
|
params (-> params
|
||||||
(assoc :profile-id profile-id)
|
(assoc :profile-id profile-id)
|
||||||
(assoc :features features)
|
(assoc :features (set/difference features cfeat/frontend-only-features))
|
||||||
(assoc :team team)
|
(assoc :team team)
|
||||||
(assoc :file file)
|
(assoc :file file)
|
||||||
(assoc :changes changes))
|
(assoc :changes changes))
|
||||||
|
|||||||
@@ -155,6 +155,7 @@
|
|||||||
team-features (into #{} xf-remove-ephimeral (:features team))]
|
team-features (into #{} xf-remove-ephimeral (:features team))]
|
||||||
(-> enabled-features
|
(-> enabled-features
|
||||||
(set/intersection no-migration-features)
|
(set/intersection no-migration-features)
|
||||||
|
(set/difference frontend-only-features)
|
||||||
(set/union team-features))))
|
(set/union team-features))))
|
||||||
|
|
||||||
(defn check-client-features!
|
(defn check-client-features!
|
||||||
|
|||||||
Reference in New Issue
Block a user