comparison rhodecode/lib/middleware/simplegit.py @ 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 25d8e4836bc2
comparison
equal deleted inserted replaced
1619:6ece8795104a 1620:41696fc73c4d
165 165
166 if action in ['pull', 'push']: 166 if action in ['pull', 'push']:
167 username = get_container_username(environ, self.config) 167 username = get_container_username(environ, self.config)
168 try: 168 try:
169 user = self.__get_user(username) 169 user = self.__get_user(username)
170 if user is None: 170 if user is None or not user.active:
171 return HTTPForbidden()(environ, start_response) 171 return HTTPForbidden()(environ, start_response)
172 username = user.username 172 username = user.username
173 except: 173 except:
174 log.error(traceback.format_exc()) 174 log.error(traceback.format_exc())
175 return HTTPInternalServerError()(environ, 175 return HTTPInternalServerError()(environ,