Mercurial > kallithea
changeset 1619:6ece8795104a beta
Added container-based authentication support to git middleware
author | Liad Shani <liadff@gmail.com> |
---|---|
date | Thu, 27 Oct 2011 21:01:16 +0200 |
parents | 9353189b7675 |
children | 41696fc73c4d |
files | rhodecode/lib/middleware/simplegit.py |
diffstat | 1 files changed, 3 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/rhodecode/lib/middleware/simplegit.py Thu Oct 27 20:40:49 2011 +0200 +++ b/rhodecode/lib/middleware/simplegit.py Thu Oct 27 21:01:16 2011 +0200 @@ -70,7 +70,7 @@ from paste.httpheaders import REMOTE_USER, AUTH_TYPE from rhodecode.lib import safe_str -from rhodecode.lib.auth import authfunc, HasPermissionAnyMiddleware +from rhodecode.lib.auth import authfunc, HasPermissionAnyMiddleware, get_container_username from rhodecode.lib.utils import invalidate_cache, is_valid_repo from rhodecode.model.db import User @@ -148,7 +148,7 @@ # NEED TO AUTHENTICATE AND ASK FOR AUTH USER PERMISSIONS #============================================================== - if not REMOTE_USER(environ): + if not get_container_username(environ, self.config): self.authenticate.realm = \ safe_str(self.config['rhodecode_realm']) result = self.authenticate(environ) @@ -164,7 +164,7 @@ #============================================================== if action in ['pull', 'push']: - username = REMOTE_USER(environ) + username = get_container_username(environ, self.config) try: user = self.__get_user(username) if user is None: