Remove nitrate teams with expired license from the teams list

This commit is contained in:
Pablo Alba 2026-05-12 12:32:05 +02:00 committed by Pablo Alba
parent d26412740a
commit ddfe2f7406
2 changed files with 5 additions and 2 deletions

View File

@ -194,7 +194,9 @@
(dm/with-open [conn (db/open pool)]
(cond->> (get-teams conn profile-id)
(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
"SELECT t.id, t.name,

View File

@ -16,6 +16,7 @@
[:owner-id ::sm/uuid]
[:avatar-bg-url ::sm/uri]
[:logo-id {:optional true} [:maybe ::sm/uuid]]
[:expired-license {:optional true} [:maybe :boolean]]
[:permissions {:optional true}
[:maybe [:map
[:create-teams {:optional true} [:maybe [:enum "any" "onlyMe"]]]
@ -30,7 +31,7 @@
(def organization->team-keys
"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
"Updates a team map with organization fields in a nested :organization map.