[web-devel] Yesod. Routes. Resources. Authorization. ACL
Антон Чешков
acheshkov at gmail.com
Fri Feb 11 16:57:58 CET 2011
Hi Michael.
I want to make authorization in Yesod application build on ACL principle.
We have in Yesod "*Routes*". *"Route"* is resource. I have the list :
*Resource | Access*
----------------------------------
RouteA | Allow
RouteB | Deny
I would like to :
1. save, read this list outward yesod
2. check, that the concrete route satisfy or not satisfy the list
3. have more flexible way to define *resource pattern* in list. For example
i have *RouteX String Int. *I wish to define pattern * "RouteX * 666"*
*
*
If i had this, i would to implement *Yesod.isAuthorized* method similar
*isAuthorized _ = do*
* acl <- getACL*
* route <- getCurrentRoute*
* case check acl route of*
* True -> return Authorized*
* **False -> return Unauthorized*
*
*
*
*
I do not know, may be there is the way to make this now.
How i can put it into practice ?
Thanks.
--
Best regards,
Cheshkov Anton
Phone: +7 909 005 18 82
Skype: cheshkov_anton
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/web-devel/attachments/20110211/c194b6e8/attachment.htm>
More information about the web-devel
mailing list