mirror of
https://github.com/penpot/penpot.git
synced 2025-01-08 16:00:19 -05:00
Merge pull request #5334 from penpot/niwinz-bug-features
🐛 Preserve frontend-only flags already present on team
This commit is contained in:
commit
b80ccbec0f
3 changed files with 5 additions and 6 deletions
|
@ -111,8 +111,7 @@
|
|||
;; features, because some features can be enabled
|
||||
;; globally, but the team is still not migrated properly.
|
||||
features (-> (cfeat/get-team-enabled-features cf/flags team)
|
||||
(cfeat/check-client-features! (:features params))
|
||||
(set/difference cfeat/frontend-only-features))
|
||||
(cfeat/check-client-features! (:features params)))
|
||||
|
||||
;; We also include all no migration features declared by
|
||||
;; client; that enables the ability to enable a runtime
|
||||
|
@ -124,7 +123,7 @@
|
|||
|
||||
params (-> params
|
||||
(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/team-id team-id
|
||||
|
|
|
@ -139,8 +139,7 @@
|
|||
|
||||
features (-> (cfeat/get-team-enabled-features cf/flags team)
|
||||
(cfeat/check-client-features! (:features params))
|
||||
(cfeat/check-file-features! (:features file) (:features params))
|
||||
(set/difference cfeat/frontend-only-features))
|
||||
(cfeat/check-file-features! (:features file) (:features params)))
|
||||
|
||||
changes (if changes-with-metadata
|
||||
(->> changes-with-metadata (mapcat :changes) vec)
|
||||
|
@ -148,7 +147,7 @@
|
|||
|
||||
params (-> params
|
||||
(assoc :profile-id profile-id)
|
||||
(assoc :features features)
|
||||
(assoc :features (set/difference features cfeat/frontend-only-features))
|
||||
(assoc :team team)
|
||||
(assoc :file file)
|
||||
(assoc :changes changes))
|
||||
|
|
|
@ -155,6 +155,7 @@
|
|||
team-features (into #{} xf-remove-ephimeral (:features team))]
|
||||
(-> enabled-features
|
||||
(set/intersection no-migration-features)
|
||||
(set/difference frontend-only-features)
|
||||
(set/union team-features))))
|
||||
|
||||
(defn check-client-features!
|
||||
|
|
Loading…
Reference in a new issue