<div><br></div><div><br></div><div><div class="gmail_quote">On Thu, Mar 17, 2011 at 11:01 AM, <span dir="ltr"><<a href="mailto:vagif.verdi@gmail.com">vagif.verdi@gmail.com</a>></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>
> 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 "authorize" 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>
> On Thu, Mar 17, 2011 at 10:07 AM, <<a href="mailto:vagif.verdi@gmail.com">vagif.verdi@gmail.com</a>> wrote:<br>
> > 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<br>
> > lets routing to continue to match the rest of the route.<br>
> ><br>
> > /app/moudle1 <- Here i check the credentials<br>
> > /app/moudle1/path1 <- If credential are OK, then the handler falls in<br>
> > here. /app/moudle1/path2<br>
> ><br>
> > How do i do that with yesod ? Is it something that needs a subsite ? I<br>
> > would<br>
> > appreciate a small example. It would help me a lot.<br>
> ><br>
> > You can look at the static subsite or some of the other existing ones.<br>
> > You<br>
><br>
> should be able to avoid a subsite by checking the url in the auhorization<br>
> callbacks. The community would find some kind of authorization library<br>
> useful if you manage to generalize your approach.<br>
><br>
> > -----------------<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>
> ><br>
> > <a href="http://www.website.com/app/jshdfbjkshabfjhvkjvjaksvdfjhvasjdhvfkjshadfhjasdhfkja" target="_blank">www.website.com/app/jshdfbjkshabfjhvkjvjaksvdfjhvasjdhvfkjshadfhjasdhfkja</a><br>
> > sfjsvahf<br>
><br>
> This seems possible using a custom route piece type and/or url rendering<br>
> overrides.<br>
><br>
> where the encrypted part will be converted to normal route by the rounting<br>
><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>
><br>
> 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>