Skip to content
Snippets Groups Projects
Unverified Commit bbbf73d6 authored by Case Nelson's avatar Case Nelson Committed by GitHub
Browse files

Properly check if api/*current-user* is bound (#26028)

When I moved tests from using an api to testing function calls more
directly, it exposed this faulty superuser check that was expected to be
skipped. Both passing in isolation but together they caused the moved
tests to fail.
parent f5a9ea85
No related branches found
No related tags found
No related merge requests found
......@@ -183,7 +183,7 @@
;; TODO -- need to check permissions once we have Actions-specific perms in place. For now just make sure the
;; current User is an admin. This check is only done if [[api/*current-user*]] is bound (which will always be
;; the case when invoked from an API endpoint) to make Actions testable separately from the API endpoints.
(when api/*current-user*
(when @api/*current-user*
(api/check-superuser))
;; Ok, now we can hand off to [[perform-action!*]]
(perform-action!* driver action db arg-map)))))
......
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