<div><br></div><div><br></div><div><div class="gmail_quote">On Thu, Mar 17, 2011 at 11:01 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;">

Both Snap and Happstack can match against partial route. And after handling it<br>
let it fall deeper to the next handler.<br>
<br>
Does yesod routing support such model ?</blockquote><div><br></div><div>Yes, this should be possible but you may have to go about it in a different way.</div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">


<div class="im"><br>
&gt; You should be able to avoid a subsite by checking the url in the<br>
auhorization callbacks.<br>
<br>
</div>Could you please elaborate. I do not even know where to begin to look for such<br>
callbacks.<br>
<br>
The scaffolded site has an authentication example. But it is implemented as a<br>
subsite. And i have a hard time figuring out how to create a subsite without a<br>
documentation.</blockquote><div> </div><div>there is an isAuthorized callback.</div><div>The most productive way to use yesod is to start cloning the repos and do a search for where things like &quot;authorize&quot; are defined.</div>

<div>It will take time to improve the docs.</div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div><div></div><div class="h5"><br>
<br>
<br>
On Thursday, March 17, 2011 10:29:40 AM you wrote:<br>
&gt; On Thu, Mar 17, 2011 at 10:07 AM, &lt;<a href="mailto:vagif.verdi@gmail.com">vagif.verdi@gmail.com</a>&gt; wrote:<br>
&gt; &gt; I am trying to build an intranet web app that would need access control<br>
&gt; &gt; (different modules are allowed/denied to different groups of users).<br>
&gt; &gt;<br>
&gt; &gt; I am thinking about putting a handle that checks credentials and then<br>
&gt; &gt; lets routing to continue to match the rest of the route.<br>
&gt; &gt;<br>
&gt; &gt; /app/moudle1 &lt;- Here i check the credentials<br>
&gt; &gt; /app/moudle1/path1 &lt;- If credential are OK, then the handler falls in<br>
&gt; &gt; here. /app/moudle1/path2<br>
&gt; &gt;<br>
&gt; &gt; How do i do that with yesod ? Is it something that needs a subsite ? I<br>
&gt; &gt; would<br>
&gt; &gt; appreciate a small example. It would help me a lot.<br>
&gt; &gt;<br>
&gt; &gt; You can look at the static subsite or some of the other existing ones.<br>
&gt; &gt; You<br>
&gt;<br>
&gt; should be able to avoid a subsite by checking the url in the auhorization<br>
&gt; callbacks. The community would find some kind of authorization library<br>
&gt; useful if you manage to generalize your approach.<br>
&gt;<br>
&gt; &gt; -----------------<br>
&gt; &gt;<br>
&gt; &gt; Another question, Is there a way a automatically and transparently for<br>
&gt; &gt; developer encrypt part (or all ) of the url. Like this:<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt; <a href="http://www.website.com/app/jshdfbjkshabfjhvkjvjaksvdfjhvasjdhvfkjshadfhjasdhfkja" target="_blank">www.website.com/app/jshdfbjkshabfjhvkjvjaksvdfjhvasjdhvfkjshadfhjasdhfkja</a><br>
&gt; &gt; sfjsvahf<br>
&gt;<br>
&gt; This seems possible using a custom route piece type and/or url rendering<br>
&gt; overrides.<br>
&gt;<br>
&gt; where the encrypted part will be converted to normal route by the rounting<br>
&gt;<br>
&gt; &gt; handler, and when urls are generated, encrypted back. Of course using a<br>
&gt; &gt; separate key for each user/session.<br>
&gt; &gt;<br>
&gt; &gt; Regards,<br>
&gt; &gt; Vagif Verdi<br>
&gt; &gt;<br>
&gt; &gt; _______________________________________________<br>
&gt; &gt; web-devel mailing list<br>
&gt; &gt; <a href="mailto:web-devel@haskell.org">web-devel@haskell.org</a><br>
&gt; &gt; <a href="http://www.haskell.org/mailman/listinfo/web-devel" target="_blank">http://www.haskell.org/mailman/listinfo/web-devel</a><br>
&gt;<br>
&gt; Greg Weber<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>
</div></div></blockquote></div><br></div>