noir-clojure / lib-noir

A set of libraries for ring apps, including stateful sessions.
Eclipse Public License 1.0
483 stars 47 forks source link

:access-rules do not work for restricted routes defined inside a compojure context #72

Closed da-z closed 11 years ago

da-z commented 11 years ago
(defroutes my-routes
  (context "/my" []
    (GET "/route" (restricted my-hander)))

In this scenario, the access rules for /my/route do not seem to be considered

Tested using lib-noir 0.6.3

yogthos commented 11 years ago

Ah good catch, have to take a look at what the URI inside the context looks like.

yogthos commented 11 years ago

ok so got that fixed, turns out route-matches in clout is a little too smart. When you give it the complete request it doesn't match. So I had to grab the :uri key and pass it separately

yogthos commented 11 years ago

I got 0.6.4 deployed to Clojars and the context should work as expected now, let me know if it looks good to you

da-z commented 11 years ago

Thank you. Please give me some time to test this.

yogthos commented 11 years ago

sounds good, glad we're going to get all this ironed out :)

da-z commented 11 years ago

Works flawlessly. Big thank you!