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

Merge pull request #2650 from metabase/massive-performance-improvement

Don't fetch *current-user* just to check superuser status :race_car:
parents 17e250fd e34c8e09
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