diff --git a/VERSION b/VERSION index c2738e24..910de432 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -Version 2.3.0 (2012-12-12 22:02:50) rc1 +Version 2.3.0 (2012-12-12 22:06:35) rc1 diff --git a/gluon/tools.py b/gluon/tools.py index 325ff533..f1c4a798 100644 --- a/gluon/tools.py +++ b/gluon/tools.py @@ -2899,7 +2899,9 @@ class Auth(object): user = user or self.user if requires_login: if not user: - if not otherwise is None: + if current.request.ajax: + raise HTTP(401) + elif not otherwise is None: if callable(otherwise): return otherwise() redirect(otherwise)