mirror of
https://github.com/penpot/penpot.git
synced 2025-06-11 04:31:39 +02:00
✨ Make permissions subsystem more flexible.
And fix some bugs related to permissions.
This commit is contained in:
parent
92f89c6cc1
commit
f02bc82525
12 changed files with 162 additions and 162 deletions
|
@ -67,10 +67,10 @@
|
|||
i/full-screen-off
|
||||
i/full-screen)]
|
||||
|
||||
(when (:edit permissions)
|
||||
(when (:is-admin permissions)
|
||||
[:span.btn-primary {:on-click open-share-dialog} (tr "labels.share-prototype")])
|
||||
|
||||
(when (:edit permissions)
|
||||
(when (:can-edit permissions)
|
||||
[:span.btn-text-dark {:on-click go-to-workspace} (tr "labels.edit-file")])]))
|
||||
|
||||
(mf/defc header-sitemap
|
||||
|
@ -151,14 +151,16 @@
|
|||
:alt (tr "viewer.header.interactions-section")}
|
||||
i/play]
|
||||
|
||||
(when (:edit permissions)
|
||||
(when (:can-edit permissions)
|
||||
[:button.mode-zone-button.tooltip.tooltip-bottom
|
||||
{:on-click #(navigate :comments)
|
||||
:class (dom/classnames :active (= section :comments))
|
||||
:alt (tr "viewer.header.comments-section")}
|
||||
i/chat])
|
||||
|
||||
(when (:read permissions)
|
||||
(when (or (= (:type permissions) :membership)
|
||||
(and (= (:type permissions) :share-link)
|
||||
(contains? (:flags permissions) :section-handoff)))
|
||||
[:button.mode-zone-button.tooltip.tooltip-bottom
|
||||
{:on-click #(navigate :handoff)
|
||||
:class (dom/classnames :active (= section :handoff))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue