0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-02-12 18:18:24 -05:00

Merge pull request #5296 from penpot/palba-bugs-viewer-role

Bugs viewer role
This commit is contained in:
Andrey Antukh 2024-11-13 14:17:29 +01:00 committed by GitHub
commit 8f72d8583e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 6 additions and 4 deletions

View file

@ -1191,10 +1191,12 @@
{:name name
:team-id team-id})
action-name (if in-project? :create-file :create-project)
action (if in-project? file-created project-created)]
action (if in-project? file-created project-created)
can-edit? (dm/get-in state [:permissions :can-edit])]
(->> (rp/cmd! action-name params)
(rx/map action))))))
(when can-edit?
(->> (rp/cmd! action-name params)
(rx/map action)))))))
(defn open-selected-file
[]

View file

@ -90,7 +90,7 @@
show-templates
(and (contains? cf/flags :dashboard-templates-section)
(not (:can-edit permissions)))]
(:can-edit permissions))]
(mf/with-effect []
(let [key1 (events/listen js/window "resize" on-resize)]