-
-
Save charles-dyfis-net/153833c315cdde8361f4 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;=> auth-context | |
#<Delay@2cca1df3: #<JiraAuthenticationContextImpl com.atlassian.jira.security.JiraAuthenticationContextImpl@142a3945>> | |
;=> (defmacro as-user [user & body] | |
`(let [old-user# (.getUser @auth-context ~user)] | |
(.setUser @auth-context ~user) | |
(try | |
~@body | |
(finally (.setUser @auth-context old-user#))))) | |
#'com.indeed.jira-releng-plugin.jira/as-user | |
;=> (macroexpand '(as-user FOO (bar baz))) | |
(let* [old-user__942__auto__ (.getUser (clojure.core/deref clojure.core/auth-context) FOO)] (.setUser (clojure.core/deref clojure.core/auth-context) FOO) (try (bar baz) (finally (.setUser (clojure.core/deref clojure.core/auth-context) old│ | |
-user__942__auto__)))) | |
;;; ...the clojure.core/auth-context references are the immediate issue here. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment