mirror of
https://github.com/penpot/penpot.git
synced 2025-05-25 19:16:10 +02:00
✨ Add project ids to create-file mutation for audit log
This commit is contained in:
parent
310c322883
commit
667598a0eb
1 changed files with 6 additions and 3 deletions
|
@ -27,6 +27,7 @@
|
||||||
[promesa.core :as p]))
|
[promesa.core :as p]))
|
||||||
|
|
||||||
(declare create-file)
|
(declare create-file)
|
||||||
|
(declare retrieve-team-id)
|
||||||
|
|
||||||
;; --- Helpers & Specs
|
;; --- Helpers & Specs
|
||||||
|
|
||||||
|
@ -48,8 +49,11 @@
|
||||||
(sv/defmethod ::create-file
|
(sv/defmethod ::create-file
|
||||||
[{:keys [pool] :as cfg} {:keys [profile-id project-id] :as params}]
|
[{:keys [pool] :as cfg} {:keys [profile-id project-id] :as params}]
|
||||||
(db/with-atomic [conn pool]
|
(db/with-atomic [conn pool]
|
||||||
|
(let [team-id (retrieve-team-id conn project-id)]
|
||||||
(proj/check-edition-permissions! conn profile-id project-id)
|
(proj/check-edition-permissions! conn profile-id project-id)
|
||||||
(create-file conn params)))
|
(with-meta
|
||||||
|
(create-file conn params)
|
||||||
|
{::audit/props {:team-id team-id}}))))
|
||||||
|
|
||||||
(defn create-file-role
|
(defn create-file-role
|
||||||
[conn {:keys [file-id profile-id role]}]
|
[conn {:keys [file-id profile-id role]}]
|
||||||
|
@ -246,7 +250,6 @@
|
||||||
|
|
||||||
(declare insert-change)
|
(declare insert-change)
|
||||||
(declare retrieve-lagged-changes)
|
(declare retrieve-lagged-changes)
|
||||||
(declare retrieve-team-id)
|
|
||||||
(declare send-notifications)
|
(declare send-notifications)
|
||||||
(declare update-file)
|
(declare update-file)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue