0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-03-11 07:11:32 -05:00

🐛 Fix auth flag handling on rpc metadata

This commit is contained in:
Andrey Antukh 2023-02-07 14:41:34 +01:00
parent 69556f19ac
commit 9162f0e1fd

View file

@ -162,10 +162,10 @@
(defn- wrap-authentication (defn- wrap-authentication
[_ f {:keys [::auth] :as mdata}] [_ f mdata]
(fn [cfg params] (fn [cfg params]
(let [profile-id (::profile-id params)] (let [profile-id (::profile-id params)]
(if (and auth (not (uuid? profile-id))) (if (and (::auth mdata true) (not (uuid? profile-id)))
(p/rejected (p/rejected
(ex/error :type :authentication (ex/error :type :authentication
:code :authentication-required :code :authentication-required