Skip to content
Snippets Groups Projects
Commit e34c8e09 authored by Cam Saül's avatar Cam Saül
Browse files

Don't fetch *current-user* just to check superuser :race_car:

parent 17e250fd
No related branches found
No related tags found
No related merge requests found
......@@ -65,7 +65,7 @@
(defn check-superuser
"Check that `*current-user*` is a superuser or throw a 403."
[]
(check-403 (:is_superuser @*current-user*)))
(check-403 (db/exists? 'User, :id *current-user-id*, :is_superuser true)))
;;; #### checkp- functions: as in "check param". These functions expect that you pass a symbol so they can throw exceptions w/ relevant error messages.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment