Changeset - a04844d9c85b
[Not reviewed]
beta
0 2 0
Marcin Kuzminski - 14 years ago 2012-02-22 20:20:50
marcin@python-works.com
better logging
2 files changed with 2 insertions and 3 deletions:
0 comments (0 inline, 0 general)
rhodecode/lib/middleware/simplegit.py
Show inline comments
 
@@ -154,13 +154,13 @@ class SimpleGit(BaseVCSController):
 
                    else:
 
                        return result.wsgi_application(environ, start_response)
 

	
 
                #==============================================================
 
                # CHECK PERMISSIONS FOR THIS REQUEST USING GIVEN USERNAME
 
                #==============================================================
 

	
 
                log.info('%s action on GIT repo "%s"' % (action, repo_name))
 
                if action in ['pull', 'push']:
 
                    try:
 
                        user = self.__get_user(username)
 
                        if user is None or not user.active:
 
                            return HTTPForbidden()(environ, start_response)
 
                        username = user.username
rhodecode/lib/middleware/simplehg.py
Show inline comments
 
@@ -77,13 +77,12 @@ class SimpleHg(BaseVCSController):
 
            return HTTPInternalServerError()(environ, start_response)
 

	
 
        #======================================================================
 
        # GET ACTION PULL or PUSH
 
        #======================================================================
 
        action = self.__get_action(environ)
 

	
 
        #======================================================================
 
        # CHECK ANONYMOUS PERMISSION
 
        #======================================================================
 
        if action in ['pull', 'push']:
 
            anonymous_user = self.__get_user('default')
 

	
 
@@ -118,13 +117,13 @@ class SimpleHg(BaseVCSController):
 
                    else:
 
                        return result.wsgi_application(environ, start_response)
 

	
 
                #==============================================================
 
                # CHECK PERMISSIONS FOR THIS REQUEST USING GIVEN USERNAME
 
                #==============================================================
 

	
 
                log.info('%s action on HG repo "%s"' % (action, repo_name))
 
                if action in ['pull', 'push']:
 
                    try:
 
                        user = self.__get_user(username)
 
                        if user is None or not user.active:
 
                            return HTTPForbidden()(environ, start_response)
 
                        username = user.username
0 comments (0 inline, 0 general)