From 24e51eef5bd3763b1f4611077caf9ebe29742023 Mon Sep 17 00:00:00 2001 From: Pablo Alba Date: Thu, 12 Dec 2024 15:15:27 +0100 Subject: [PATCH] :bug: Fix viewer role is unable to generate thumbnails on dashboard --- backend/src/app/rpc/commands/files_thumbnails.clj | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/backend/src/app/rpc/commands/files_thumbnails.clj b/backend/src/app/rpc/commands/files_thumbnails.clj index eb7bf3c16..c3a5cb5d4 100644 --- a/backend/src/app/rpc/commands/files_thumbnails.clj +++ b/backend/src/app/rpc/commands/files_thumbnails.clj @@ -402,7 +402,10 @@ [cfg {:keys [::rpc/profile-id file-id] :as params}] (db/tx-run! cfg (fn [{:keys [::db/conn] :as cfg}] - (files/check-edition-permissions! conn profile-id file-id) + ;; TODO For now we check read permissions instead of write, + ;; to allow viewer users to update thumbnails. We might + ;; review this approach on the future. + (files/check-read-permissions! conn profile-id file-id) (when-not (db/read-only? conn) (let [media (create-file-thumbnail! cfg params)] {:uri (files/resolve-public-uri (:id media))