Merge pull request #181 from Tarrasch/patch-1

Update `isAuthorized` documentation
This commit is contained in:
Michael Snoyman 2011-12-04 20:39:40 -08:00
commit 15055a8d43

View File

@ -170,9 +170,9 @@ class RenderRoute (Route a) => Yesod a where
-- | Determine if a request is authorized or not.
--
-- Return 'Nothing' is the request is authorized, 'Just' a message if
-- unauthorized. If authentication is required, you should use a redirect;
-- the Auth helper provides this functionality automatically.
-- Return 'Authorized' if the request is authorized,
-- 'Unauthorized' a message if unauthorized.
-- If authentication is required, return 'AuthenticationRequired'.
isAuthorized :: Route a
-> Bool -- ^ is this a write request?
-> GHandler s a AuthResult