reimplemented security
This commit is contained in:
@@ -39,7 +39,10 @@
|
||||
{:status 301
|
||||
:headers {"Location" (str "/?jwt=" (jwt/sign {:user (:name profile)
|
||||
:exp (time/plus (time/now) (time/days 7))
|
||||
:user/clients (:user/clients user)
|
||||
:user/clients (map (fn [c]
|
||||
(dissoc c :client/bank-accounts )
|
||||
)
|
||||
(:user/clients user))
|
||||
:user/role (name (:user/role user))
|
||||
:user/name (:name profile)}
|
||||
(:jwt-secret env)
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
(wrap-routes
|
||||
(context "/graphql" []
|
||||
(GET "/" {:keys [query-params] :as r}
|
||||
(when (= "none" (:role (:identity r)))
|
||||
(when (= "none" (:user/role (:identity r)))
|
||||
(throw-unauthorized))
|
||||
|
||||
(try
|
||||
|
||||
@@ -165,6 +165,7 @@
|
||||
(map (parse-or-error :client-id parse-client-id))
|
||||
(map (parse-or-error :date parse-date)))
|
||||
error-rows (filter :errors rows)
|
||||
_ (println "importing raw transactions" rows)
|
||||
|
||||
raw-transactions (vec (->> rows
|
||||
(filter #(not (seq (:errors %))) )
|
||||
|
||||
Reference in New Issue
Block a user