Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Document optional second map arg to authorize, ignore if it's the only component of & body #46

Closed
cemerick opened this Issue Jan 26, 2013 · 1 comment

Comments

Projects
None yet
1 participant
Owner

cemerick commented Jan 26, 2013

No description provided.

Owner

cemerick commented Jan 26, 2013

Clearly bad:

;=> (clojure.pprint/pprint (macroexpand '(authorize #{::admin} {:ring :response :map :here})))
(let*
 [roles__1417__auto__ #{:cemerick.friend/admin}]
 (if
  (cemerick.friend/authorized?
   roles__1417__auto__
   cemerick.friend/*identity*)
  (do)
  (cemerick.friend/throw-unauthorized
   cemerick.friend/*identity*
   (clojure.core/merge
    {:ring :response, :map :here}
    {:cemerick.friend/exprs '[],
     :cemerick.friend/required-roles roles__1417__auto__}))))

@cemerick cemerick closed this in b526dd4 Mar 12, 2013

cldwalker added a commit to cldwalker/friend that referenced this issue Mar 20, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment