Changeset - 41696fc73c4d
[Not reviewed]
beta
0 2 0
Liad Shani - 14 years ago 2011-10-29 16:36:26
liadff@gmail.com
Fixed middleware to prevent deactivated users from authenticating
2 files changed with 2 insertions and 2 deletions:
0 comments (0 inline, 0 general)
rhodecode/lib/middleware/simplegit.py
Show inline comments
 
@@ -164,13 +164,13 @@ class SimpleGit(object):
 
                #==============================================================
 

	
 
                if action in ['pull', 'push']:
 
                    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:
 
                        log.error(traceback.format_exc())
 
                        return HTTPInternalServerError()(environ,
 
                                                         start_response)
rhodecode/lib/middleware/simplehg.py
Show inline comments
 
@@ -130,13 +130,13 @@ class SimpleHg(object):
 
                #==============================================================
 

	
 
                if action in ['pull', 'push']:
 
                    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:
 
                        log.error(traceback.format_exc())
 
                        return HTTPInternalServerError()(environ,
 
                                                         start_response)
0 comments (0 inline, 0 general)