
I understand that it is provided for convenience. In case the authors
of yesod are considering changes in the function's interface, it would
be more convenient to write
isAuthorized HomeR POST = Unauthorized
Admitably is just a little more convenient and perhaps is not worth
the hassle to check if anyone is using the Bool parameter of
isAuthorized and possibly make a non backward compatible change.
On Tue, Jul 19, 2011 at 6:31 AM, Max Cantor
forgot to reply to all
Begin forwarded message:
From: Max Cantor
Date: July 19, 2011 10:45:54 AM GMT+08:00 To: Anakreon Mentis Subject: Re: [web-devel] Yesod. Routes. Resources. Authorization. ACL Since isAuthorized runs in the Handler monad you can pull out the request method from the request. I think the second parameter is just intended as a bit of a timesaver.
max
On Jul 19, 2011, at 5:46 AM, Anakreon Mentis wrote:
Regarding the isAuthorized function discussed at http://www.haskell.org/pipermail/web-devel/2011/000855.html, I believe it would be better if the second parameter was the method (GET, POST, ..) instead of a boolean indicating if it is POST or DELETE.
_______________________________________________ web-devel mailing list web-devel@haskell.org http://www.haskell.org/mailman/listinfo/web-devel
_______________________________________________ web-devel mailing list web-devel@haskell.org http://www.haskell.org/mailman/listinfo/web-devel