##// END OF EJS Templates
vcs: Retrieve base path and realm with new helper methods.
Martin Bornhold -
r579:ecb16d2d default
parent child Browse files
Show More
@@ -42,7 +42,8 b' from rhodecode.lib.exceptions import ('
42 from rhodecode.lib.hooks_daemon import prepare_callback_daemon
42 from rhodecode.lib.hooks_daemon import prepare_callback_daemon
43 from rhodecode.lib.middleware import appenlight
43 from rhodecode.lib.middleware import appenlight
44 from rhodecode.lib.middleware.utils import scm_app
44 from rhodecode.lib.middleware.utils import scm_app
45 from rhodecode.lib.utils import is_valid_repo
45 from rhodecode.lib.utils import (
46 is_valid_repo, get_rhodecode_realm, get_rhodecode_base_path)
46 from rhodecode.lib.utils2 import safe_str, fix_PATH, str2bool
47 from rhodecode.lib.utils2 import safe_str, fix_PATH, str2bool
47 from rhodecode.model import meta
48 from rhodecode.model import meta
48 from rhodecode.model.db import User, Repository
49 from rhodecode.model.db import User, Repository
@@ -84,7 +85,7 b' class SimpleVCS(object):'
84 self.application = application
85 self.application = application
85 self.config = config
86 self.config = config
86 # base path of repo locations
87 # base path of repo locations
87 self.basepath = self.config['base_path']
88 self.basepath = get_rhodecode_base_path()
88 # authenticate this VCS request using authfunc
89 # authenticate this VCS request using authfunc
89 auth_ret_code_detection = \
90 auth_ret_code_detection = \
90 str2bool(self.config.get('auth_ret_code_detection', False))
91 str2bool(self.config.get('auth_ret_code_detection', False))
@@ -289,8 +290,7 b' class SimpleVCS(object):'
289
290
290 # If not authenticated by the container, running basic auth
291 # If not authenticated by the container, running basic auth
291 if not username:
292 if not username:
292 self.authenticate.realm = \
293 self.authenticate.realm = get_rhodecode_realm()
293 safe_str(self.config['rhodecode_realm'])
294
294
295 try:
295 try:
296 result = self.authenticate(environ)
296 result = self.authenticate(environ)
General Comments 0
You need to be logged in to leave comments. Login now