From 8ac32fc3c25f7594091c8d4eaec07b93944a5074 Mon Sep 17 00:00:00 2001 From: Pablo Alba Date: Tue, 12 Jul 2022 13:05:31 +0200 Subject: [PATCH] :sparkles: Add audit log for create shared link --- frontend/src/app/main/ui/share_link.cljs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/frontend/src/app/main/ui/share_link.cljs b/frontend/src/app/main/ui/share_link.cljs index 490cb2f96..48accd369 100644 --- a/frontend/src/app/main/ui/share_link.cljs +++ b/frontend/src/app/main/ui/share_link.cljs @@ -10,6 +10,7 @@ [app.common.logging :as log] [app.config :as cf] [app.main.data.common :as dc] + [app.main.data.events :as ev] [app.main.data.messages :as dm] [app.main.data.modal :as modal] [app.main.refs :as refs] @@ -19,6 +20,7 @@ [app.util.i18n :as i18n :refer [tr]] [app.util.router :as rt] [app.util.webapi :as wapi] + [potok.core :as ptk] [rumext.alpha :as mf])) (log/set-level! :warn) @@ -89,7 +91,11 @@ (fn [_] (let [params (prepare-params @opts) params (assoc params :file-id (:id file))] - (st/emit! (dc/create-share-link params)))) + (st/emit! (dc/create-share-link params) + (ptk/event ::ev/event {::ev/name "create-shared-link" + ::ev/origin "viewer" + :can-comment (:who-comment params) + :can-inspect-code (:who-inspect params)})))) copy-link (fn [_]