Mercurial > kallithea
changeset 1620:41696fc73c4d beta
Fixed middleware to prevent deactivated users from authenticating
author | Liad Shani <liadff@gmail.com> |
---|---|
date | Sat, 29 Oct 2011 16:36:26 +0200 |
parents | 6ece8795104a |
children | cbc2b1913cdf |
files | rhodecode/lib/middleware/simplegit.py rhodecode/lib/middleware/simplehg.py |
diffstat | 2 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/rhodecode/lib/middleware/simplegit.py Thu Oct 27 21:01:16 2011 +0200 +++ b/rhodecode/lib/middleware/simplegit.py Sat Oct 29 16:36:26 2011 +0200 @@ -167,7 +167,7 @@ username = get_container_username(environ, self.config) try: user = self.__get_user(username) - if user is None: + if user is None or not user.active: return HTTPForbidden()(environ, start_response) username = user.username except:
--- a/rhodecode/lib/middleware/simplehg.py Thu Oct 27 21:01:16 2011 +0200 +++ b/rhodecode/lib/middleware/simplehg.py Sat Oct 29 16:36:26 2011 +0200 @@ -133,7 +133,7 @@ username = get_container_username(environ, self.config) try: user = self.__get_user(username) - if user is None: + if user is None or not user.active: return HTTPForbidden()(environ, start_response) username = user.username except: