From 9931d82379f8f8d77c19f795e6e5891c85e8526b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?andr=C3=A9s=20gonz=C3=A1lez?= Date: Fri, 9 Oct 2026 14:14:51 +0200 Subject: [PATCH] :bug: Show the themes permission message only to non-editors (#12203) The theme selector showed "You need to be an editor to use themes" whenever tokens could not be edited. That is also the case for editors when the tokens source is a library, and they can still switch themes. Base the message on file edit permission instead. Closes #12177 AI-assisted-by: claude-opus-5-5 --- frontend/src/app/main/ui/workspace/tokens/themes.cljs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/frontend/src/app/main/ui/workspace/tokens/themes.cljs b/frontend/src/app/main/ui/workspace/tokens/themes.cljs index 5c116ca4ad..81ad0d033f 100644 --- a/frontend/src/app/main/ui/workspace/tokens/themes.cljs +++ b/frontend/src/app/main/ui/workspace/tokens/themes.cljs @@ -23,6 +23,9 @@ (let [ordered-themes (mf/deref refs/workspace-token-themes-no-hidden) + can-edit-file? + (mf/use-ctx ctx/can-edit?) + can-edit-tokens? (mf/use-ctx ctx/can-edit-tokens?) @@ -50,6 +53,6 @@ :class (stl/css :edit-theme-button) :on-click open-modal} (tr "labels.edit")]] - [:div {:title (when-not can-edit-tokens? + [:div {:title (when-not can-edit-file? (tr "workspace.tokens.no-permission-themes"))} [:> theme-selector* {:tokens-source tokens-source}]]))]))