mirror of
https://github.com/penpot/penpot.git
synced 2025-06-18 18:01:39 +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
|
{:name name
|
||||||
:team-id team-id})
|
:team-id team-id})
|
||||||
action-name (if in-project? :create-file :create-project)
|
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)
|
(when can-edit?
|
||||||
(rx/map action))))))
|
(->> (rp/cmd! action-name params)
|
||||||
|
(rx/map action)))))))
|
||||||
|
|
||||||
(defn open-selected-file
|
(defn open-selected-file
|
||||||
[]
|
[]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue