<div><div class="gmail_quote">On Thu, Mar 17, 2011 at 10:07 AM,  <span dir="ltr">&lt;<a href="mailto:vagif.verdi@gmail.com">vagif.verdi@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

I am trying to build an intranet web app that would need access control<br>
(different modules are allowed/denied to different groups of users).<br>
<br>
I am thinking about putting a handle that checks credentials and then lets<br>
routing to continue to match the rest of the route.<br>
<br>
/app/moudle1 &lt;- Here i check the credentials<br>
/app/moudle1/path1 &lt;- If credential are OK, then the handler falls in here.<br>
/app/moudle1/path2<br>
<br>
How do i do that with yesod ? Is it something that needs a subsite ? I would<br>
appreciate a small example. It would help me a lot.<br>
<br></blockquote><div>You can look at the static subsite or some of the other existing ones. You should be able to avoid a subsite by checking the url in the auhorization callbacks. The community would find some kind of authorization library useful if you manage to generalize your approach.</div>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">-----------------<br>
<br>
Another question, Is there a way a automatically and transparently for<br>
developer encrypt part (or all ) of the url. Like this:<br>
<br>
<a href="http://www.website.com/app/jshdfbjkshabfjhvkjvjaksvdfjhvasjdhvfkjshadfhjasdhfkjasfjsvahf" target="_blank">www.website.com/app/jshdfbjkshabfjhvkjvjaksvdfjhvasjdhvfkjshadfhjasdhfkjasfjsvahf</a><br>
<br></blockquote><div><br></div><div>This seems possible using a custom route piece type and/or url rendering overrides.</div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">


where the encrypted part will be converted to normal route by the rounting<br>
handler, and when urls are generated, encrypted back. Of course using a<br>
separate key for each user/session.<br>
<br>
Regards,<br>
Vagif Verdi<br>
<br>
_______________________________________________<br>
web-devel mailing list<br>
<a href="mailto:web-devel@haskell.org">web-devel@haskell.org</a><br>
<a href="http://www.haskell.org/mailman/listinfo/web-devel" target="_blank">http://www.haskell.org/mailman/listinfo/web-devel</a><br>
</blockquote></div><br></div><div>Greg Weber</div>