0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-02-12 18:18:24 -05:00

🐛 Fix anonymous access to shared prototypes

This commit is contained in:
alonso.torres 2024-02-15 16:39:09 +01:00
parent 7ac4b89a0e
commit 619b557c80
2 changed files with 5 additions and 2 deletions

View file

@ -351,6 +351,7 @@
(sv/defmethod ::get-file-fragment
"Retrieve a file fragment by its ID. Only authenticated users."
{::doc/added "1.17"
::rpc/auth false
::sm/params schema:get-file-fragment
::sm/result schema:file-fragment}
[{:keys [::db/pool] :as cfg} {:keys [::rpc/profile-id file-id fragment-id share-id]}]

View file

@ -74,9 +74,11 @@
(assoc-in [:viewer-local :interactions-show?] interactions-show?)))
ptk/WatchEvent
(watch [_ _ _]
(watch [_ state _]
(rx/of (fetch-bundle (d/without-nils params))
(fetch-comment-threads params)))
;; Only fetch threads for logged-in users
(when (some? (:profile state))
(fetch-comment-threads params))))
ptk/EffectEvent
(effect [_ _ _]