mirror of
https://github.com/penpot/penpot.git
synced 2025-06-18 18:11:43 +02:00
🐛 Fix viewer role can use shortcut for create project
This commit is contained in:
parent
d4cf817b83
commit
e31b4b58ce
1 changed files with 5 additions and 3 deletions
|
@ -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
|
||||
[]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue