Hi,

a workaround for this (and I like it) is:
auth = Auth(globals(),db, request.controller)

With this I redirect to the login page for the correct controller when
authentication fails.

Regards,
Joaquin.

On Tue, Mar 15, 2011 at 12:15 PM, Joaquin Orbe <joaquino...@gmail.com> wrote:
> Hi All,
>
> I have "two kind of users" in my application: admins and users. Each
> of them has different index function which I've decored, that's why I
> get these URLs when trying to login:
>
> * admins login through
> http://127.0.0.1:8000/myapp/default/user/login?_next=/myapp/admin/index
> * common users login through
> http://127.0.0.1:8000/myapp/default/user/login?_next=/myapp/default/index
>
> Everything work as I expected, but when authentication fails both
> groups are redirect to http://127.0.0.1:8000/myapp/default/user/login.
> Is it possible to have non-redirection when authentication fails? I've
> been playing with auth.settings.on_failed_authorization and
> auth.settings.on_failed_authentication but couldn't get it work.
> Any help will be appreciated.
>
>
> Joaquin.
>

Reply via email to