diff --git a/CHANGES.md b/CHANGES.md index d88f64ff3..047dc59dc 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -50,6 +50,7 @@ - Fix problem while syncing library colors and typographies [Taiga #11068](https://tree.taiga.io/project/penpot/issue/11068) - Fix problem with path edition of shapes [Taiga #9496](https://tree.taiga.io/project/penpot/issue/9496) - Fix exception on paste invalid html [Taiga #11047](https://tree.taiga.io/project/penpot/issue/11047) +- Fix share button being displayed with no permissions [Taiga #11086](https://tree.taiga.io/project/penpot/issue/11086) ## 2.6.2 diff --git a/frontend/src/app/main/ui/workspace/right_header.cljs b/frontend/src/app/main/ui/workspace/right_header.cljs index 96a9883c3..e004d9e38 100644 --- a/frontend/src/app/main/ui/workspace/right_header.cljs +++ b/frontend/src/app/main/ui/workspace/right_header.cljs @@ -129,6 +129,12 @@ input-ref (mf/use-ref nil) team (mf/deref refs/team) + permissions (get team :permissions) + + display-share-button? + (and (not (:is-default team)) + (or (:is-admin permissions) + (:is-owner permissions))) nav-to-viewer (mf/use-fn @@ -216,7 +222,7 @@ :on-click toggle-history} i/history]]) - (when (not (:is-default team)) + (when display-share-button? [:a {:class (stl/css :viewer-btn) :title (tr "workspace.header.share") :on-click open-share-dialog}