Mercurial > kallithea
changeset 1283:d6524f3025e8 beta
small fixes for gitmiddleware
author | Marcin Kuzminski <marcin@python-works.com> |
---|---|
date | Sun, 24 Apr 2011 23:20:58 +0200 |
parents | faaadfc3c359 |
children | 6e5c543904ef f56533aa1caa |
files | rhodecode/lib/middleware/simplegit.py |
diffstat | 1 files changed, 4 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/rhodecode/lib/middleware/simplegit.py Sun Apr 24 17:36:09 2011 +0200 +++ b/rhodecode/lib/middleware/simplegit.py Sun Apr 24 23:20:58 2011 +0200 @@ -127,7 +127,7 @@ #====================================================================== # CHECK ANONYMOUS PERMISSION #====================================================================== - if self.action in ['pull', 'push'] or self.action: + if self.action in ['pull', 'push']: anonymous_user = self.__get_user('default') self.username = anonymous_user.username anonymous_perm = self.__check_permission(self.action, @@ -161,7 +161,7 @@ # BASIC AUTH #============================================================== - if self.action in ['pull', 'push'] or self.action: + if self.action in ['pull', 'push']: username = REMOTE_USER(environ) try: user = self.__get_user(username) @@ -175,7 +175,6 @@ perm = self.__check_permission(self.action, user, self.repo_name) if perm is not True: - print 'not allowed' return HTTPForbidden()(environ, start_response) self.extras = {'ip': self.ipaddr, @@ -200,11 +199,8 @@ #invalidate cache on push if self.action == 'push': self.__invalidate_cache(self.repo_name) - messages = [] - messages.append('thank you for using rhodecode') - return app(environ, start_response) - else: - return app(environ, start_response) + + return app(environ, start_response) def __make_app(self): _d = {'/' + self.repo_name: Repo(self.repo_path)}