From 8d70188a1fcc00a8fbcddd768cd8b53647bf71ce Mon Sep 17 00:00:00 2001 From: Martin Bornhold Date: Fri, 5 Aug 2016 16:56:38 +0200 Subject: [PATCH] vcs: Retrieve base path and realm with new helper methods. --- rhodecode/lib/middleware/simplevcs.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/rhodecode/lib/middleware/simplevcs.py b/rhodecode/lib/middleware/simplevcs.py index 5103fdfe..229692a0 100644 --- a/rhodecode/lib/middleware/simplevcs.py +++ b/rhodecode/lib/middleware/simplevcs.py @@ -42,7 +42,8 @@ from rhodecode.lib.exceptions import ( from rhodecode.lib.hooks_daemon import prepare_callback_daemon from rhodecode.lib.middleware import appenlight from rhodecode.lib.middleware.utils import scm_app -from rhodecode.lib.utils import is_valid_repo +from rhodecode.lib.utils import ( + is_valid_repo, get_rhodecode_realm, get_rhodecode_base_path) from rhodecode.lib.utils2 import safe_str, fix_PATH, str2bool from rhodecode.model import meta from rhodecode.model.db import User, Repository @@ -84,7 +85,7 @@ class SimpleVCS(object): self.application = application self.config = config # base path of repo locations - self.basepath = self.config['base_path'] + self.basepath = get_rhodecode_base_path() # authenticate this VCS request using authfunc auth_ret_code_detection = \ str2bool(self.config.get('auth_ret_code_detection', False)) @@ -289,8 +290,7 @@ class SimpleVCS(object): # If not authenticated by the container, running basic auth if not username: - self.authenticate.realm = \ - safe_str(self.config['rhodecode_realm']) + self.authenticate.realm = get_rhodecode_realm() try: result = self.authenticate(environ)