mirror of
https://github.com/penpot/penpot.git
synced 2025-01-24 23:49:45 -05:00
Merge remote-tracking branch 'origin/main' into develop
This commit is contained in:
commit
5e788fff99
4 changed files with 12 additions and 4 deletions
|
@ -117,11 +117,15 @@
|
|||
(s/def ::delete-project
|
||||
(s/keys :req-un [::id ::profile-id]))
|
||||
|
||||
;; TODO: right now, we just don't allow delete default projects, in a
|
||||
;; future we need to ensure raise a correct exception signaling that
|
||||
;; this is not allowed.
|
||||
|
||||
(sv/defmethod ::delete-project
|
||||
[{:keys [pool] :as cfg} {:keys [id profile-id] :as params}]
|
||||
(db/with-atomic [conn pool]
|
||||
(proj/check-edition-permissions! conn profile-id id)
|
||||
(db/update! conn :project
|
||||
{:deleted-at (dt/now)}
|
||||
{:id id})
|
||||
{:id id :is-default false})
|
||||
nil))
|
||||
|
|
|
@ -125,6 +125,10 @@
|
|||
(s/def ::delete-team
|
||||
(s/keys :req-un [::profile-id ::id]))
|
||||
|
||||
;; TODO: right now just don't allow delete default team, in future it
|
||||
;; should raise a speific exception for signal that this acction is
|
||||
;; not allowed.
|
||||
|
||||
(sv/defmethod ::delete-team
|
||||
[{:keys [pool] :as cfg} {:keys [id profile-id] :as params}]
|
||||
(db/with-atomic [conn pool]
|
||||
|
@ -135,7 +139,7 @@
|
|||
|
||||
(db/update! conn :team
|
||||
{:deleted-at (dt/now)}
|
||||
{:id id})
|
||||
{:id id :is-default false})
|
||||
nil)))
|
||||
|
||||
|
||||
|
|
|
@ -95,7 +95,8 @@
|
|||
(defn retrieve-profile-data-by-email
|
||||
[conn email]
|
||||
(try
|
||||
(db/get-by-params conn :profile {:email (str/lower email)})
|
||||
(db/get-by-params conn :profile {:email (str/lower email)
|
||||
:deleted-at nil})
|
||||
(catch Exception _e)))
|
||||
|
||||
;; --- Attrs Helpers
|
||||
|
|
|
@ -206,7 +206,6 @@
|
|||
(dissoc state
|
||||
:current-file-id
|
||||
:current-project-id
|
||||
:current-team-id
|
||||
:workspace-data
|
||||
:workspace-editor-state
|
||||
:workspace-file
|
||||
|
|
Loading…
Add table
Reference in a new issue