mirror of
https://github.com/penpot/penpot.git
synced 2026-08-01 10:56:20 +00:00
✨ Remove nitrate teams with expired license from the teams list
This commit is contained in:
parent
d26412740a
commit
ddfe2f7406
@ -194,7 +194,9 @@
|
|||||||
(dm/with-open [conn (db/open pool)]
|
(dm/with-open [conn (db/open pool)]
|
||||||
(cond->> (get-teams conn profile-id)
|
(cond->> (get-teams conn profile-id)
|
||||||
(contains? cf/flags :nitrate)
|
(contains? cf/flags :nitrate)
|
||||||
(map #(nitrate/add-org-info-to-team cfg % params)))))
|
(map #(nitrate/add-org-info-to-team cfg % params))
|
||||||
|
(contains? cf/flags :nitrate)
|
||||||
|
(remove #(get-in % [:organization :expired-license])))))
|
||||||
|
|
||||||
(def ^:private sql:get-owned-teams
|
(def ^:private sql:get-owned-teams
|
||||||
"SELECT t.id, t.name,
|
"SELECT t.id, t.name,
|
||||||
|
|||||||
@ -16,6 +16,7 @@
|
|||||||
[:owner-id ::sm/uuid]
|
[:owner-id ::sm/uuid]
|
||||||
[:avatar-bg-url ::sm/uri]
|
[:avatar-bg-url ::sm/uri]
|
||||||
[:logo-id {:optional true} [:maybe ::sm/uuid]]
|
[:logo-id {:optional true} [:maybe ::sm/uuid]]
|
||||||
|
[:expired-license {:optional true} [:maybe :boolean]]
|
||||||
[:permissions {:optional true}
|
[:permissions {:optional true}
|
||||||
[:maybe [:map
|
[:maybe [:map
|
||||||
[:create-teams {:optional true} [:maybe [:enum "any" "onlyMe"]]]
|
[:create-teams {:optional true} [:maybe [:enum "any" "onlyMe"]]]
|
||||||
@ -30,7 +31,7 @@
|
|||||||
|
|
||||||
(def organization->team-keys
|
(def organization->team-keys
|
||||||
"Organization field keys to include in the nested :organization map."
|
"Organization field keys to include in the nested :organization map."
|
||||||
[:id :name :custom-photo :slug :avatar-bg-url :owner-id :permissions])
|
[:id :name :custom-photo :slug :avatar-bg-url :owner-id :expired-license :permissions])
|
||||||
|
|
||||||
(defn apply-organization
|
(defn apply-organization
|
||||||
"Updates a team map with organization fields in a nested :organization map.
|
"Updates a team map with organization fields in a nested :organization map.
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user