mirror of
https://github.com/penpot/penpot.git
synced 2025-08-07 14:38:33 +02:00
🐛 Set proper exception type on notauthorized requests.
This commit is contained in:
parent
9805f8b9f2
commit
af310854fc
3 changed files with 6 additions and 6 deletions
|
@ -44,7 +44,7 @@
|
|||
(when-not (or (some :can-edit rows)
|
||||
(some :is-admin rows)
|
||||
(some :is-owner rows))
|
||||
(ex/raise :type :validation
|
||||
(ex/raise :type :authorization
|
||||
:code :not-authorized))))
|
||||
|
||||
(defn check-read-permissions!
|
||||
|
@ -54,7 +54,7 @@
|
|||
project-id profile-id])]
|
||||
|
||||
(when-not (seq rows)
|
||||
(ex/raise :type :validation
|
||||
(ex/raise :type :authorization
|
||||
:code :not-authorized))))
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue