mirror of
https://github.com/penpot/penpot.git
synced 2025-06-02 09:11:37 +02:00
🐛 Fix share button being displayed with no permissions (#6476)
* 🐛 Fix share button being displayed with no permissions * ✨ Simplify impl by accessing perms from teams directly --------- Co-authored-by: Andrey Antukh <niwi@niwi.nz>
This commit is contained in:
parent
f5f1316f0b
commit
ba25ce3098
2 changed files with 8 additions and 1 deletions
|
@ -50,6 +50,7 @@
|
||||||
- Fix problem while syncing library colors and typographies [Taiga #11068](https://tree.taiga.io/project/penpot/issue/11068)
|
- 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 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 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
|
## 2.6.2
|
||||||
|
|
||||||
|
|
|
@ -129,6 +129,12 @@
|
||||||
input-ref (mf/use-ref nil)
|
input-ref (mf/use-ref nil)
|
||||||
|
|
||||||
team (mf/deref refs/team)
|
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
|
nav-to-viewer
|
||||||
(mf/use-fn
|
(mf/use-fn
|
||||||
|
@ -216,7 +222,7 @@
|
||||||
:on-click toggle-history}
|
:on-click toggle-history}
|
||||||
i/history]])
|
i/history]])
|
||||||
|
|
||||||
(when (not (:is-default team))
|
(when display-share-button?
|
||||||
[:a {:class (stl/css :viewer-btn)
|
[:a {:class (stl/css :viewer-btn)
|
||||||
:title (tr "workspace.header.share")
|
:title (tr "workspace.header.share")
|
||||||
:on-click open-share-dialog}
|
:on-click open-share-dialog}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue