mirror of
https://github.com/penpot/penpot.git
synced 2025-05-19 06:16:11 +02:00
Project and files edition and deletion
This commit is contained in:
parent
8b0eab5e90
commit
b210e84dd3
9 changed files with 143 additions and 63 deletions
|
@ -103,12 +103,12 @@
|
|||
"update file
|
||||
set name = $2
|
||||
where id = $1
|
||||
and deleted_at is null")
|
||||
and deleted_at is null
|
||||
returning *")
|
||||
|
||||
(defn- rename-file
|
||||
[conn {:keys [id name] :as params}]
|
||||
(-> (db/query-one conn [sql:rename-file id name])
|
||||
(p/then' su/constantly-nil)))
|
||||
(db/query-one conn [sql:rename-file id name]))
|
||||
|
||||
|
||||
;; --- Mutation: Delete Project File
|
||||
|
|
|
@ -26,6 +26,7 @@
|
|||
from project as p
|
||||
inner join team_profile_rel as tpr on (tpr.team_id = p.team_id)
|
||||
where tpr.profile_id = $1
|
||||
and p.deleted_at is null
|
||||
and (tpr.is_admin = true or
|
||||
tpr.is_owner = true or
|
||||
tpr.can_edit = true)
|
||||
|
@ -36,6 +37,7 @@
|
|||
from project as p
|
||||
inner join project_profile_rel as ppr on (ppr.project_id = p.id)
|
||||
where ppr.profile_id = $1
|
||||
and p.deleted_at is null
|
||||
and (ppr.is_admin = true or
|
||||
ppr.is_owner = true or
|
||||
ppr.can_edit = true)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue