Raising an HTTP didn't work?
On Wednesday, November 2, 2011 4:28:05 PM UTC-4, haggis wrote:
>
> As I wrote Massimo directly by accident, he answered me via mail: it's
> not possible.
> That's a pity. May this be possible in a future release? Otherwise
> it's difficult to develope an application that works with ajax only.
> In this case the only way I see to redirect a user after his session
> timed out is to resign the decorators and check access in each
> callback function.
> Are there other ways I don't know?
>
>
>
> On 2 Nov., 19:36, haggis <[email protected]> wrote:
> > Hello,
> > is it possible to return json to the calling jQuery.ajax() function
> > after access was denied by decorator @auth.requires_login()?
> >
> > I know there is a possibility to specify a function when authorization/
> > authentication failed with
> > auth.settings.on_failed_authentication = myFunc and
> > auth.settings.on_failed_authorization = myFunc
> >
> > I put this two lines in model db.py. However, I don't know how to just
> > return json containing a url to which the user should be redirected.
> >
> > Any suggestions are welcome!
> > Thanks, haggis