🐛 Fix viewer role can use shortcut for create project

This commit is contained in:
Pablo Alba 2024-11-13 11:55:32 +01:00
parent d4cf817b83
commit e31b4b58ce

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
[]