Show More
@@ -153,11 +153,6 b' class SimpleVCS(object):' | |||
|
153 | 153 | self.pr_id = None |
|
154 | 154 | |
|
155 | 155 | @property |
|
156 | def repo_name(self): | |
|
157 | # TODO: johbo: Remove, switch to correct repo name attribute | |
|
158 | return self.acl_repo_name | |
|
159 | ||
|
160 | @property | |
|
161 | 156 | def scm_app(self): |
|
162 | 157 | custom_implementation = self.config.get('vcs.scm_app_implementation') |
|
163 | 158 | if custom_implementation and custom_implementation != 'pyro4': |
@@ -289,11 +284,11 b' class SimpleVCS(object):' | |||
|
289 | 284 | log.debug('User not allowed to proceed, %s', reason) |
|
290 | 285 | return HTTPNotAcceptable(reason)(environ, start_response) |
|
291 | 286 | |
|
292 | if not self.repo_name: | |
|
293 | log.warning('Repository name is empty: %s', self.repo_name) | |
|
287 | if not self.url_repo_name: | |
|
288 | log.warning('Repository name is empty: %s', self.url_repo_name) | |
|
294 | 289 | # failed to get repo name, we fail now |
|
295 | 290 | return HTTPNotFound()(environ, start_response) |
|
296 | log.debug('Extracted repo name is %s', self.repo_name) | |
|
291 | log.debug('Extracted repo name is %s', self.url_repo_name) | |
|
297 | 292 | |
|
298 | 293 | ip_addr = get_ip_addr(environ) |
|
299 | 294 | username = None |
@@ -324,7 +319,7 b' class SimpleVCS(object):' | |||
|
324 | 319 | if anonymous_user.active: |
|
325 | 320 | # ONLY check permissions if the user is activated |
|
326 | 321 | anonymous_perm = self._check_permission( |
|
327 | action, anonymous_user, self.repo_name, ip_addr) | |
|
322 | action, anonymous_user, self.acl_repo_name, ip_addr) | |
|
328 | 323 | else: |
|
329 | 324 | anonymous_perm = False |
|
330 | 325 | |
@@ -389,7 +384,7 b' class SimpleVCS(object):' | |||
|
389 | 384 | |
|
390 | 385 | # check permissions for this repository |
|
391 | 386 | perm = self._check_permission( |
|
392 | action, user, self.repo_name, ip_addr) | |
|
387 | action, user, self.acl_repo_name, ip_addr) | |
|
393 | 388 | if not perm: |
|
394 | 389 | return HTTPForbidden()(environ, start_response) |
|
395 | 390 | |
@@ -397,14 +392,14 b' class SimpleVCS(object):' | |||
|
397 | 392 | # in hooks executed by rhodecode |
|
398 | 393 | check_locking = _should_check_locking(environ.get('QUERY_STRING')) |
|
399 | 394 | extras = vcs_operation_context( |
|
400 | environ, repo_name=self.repo_name, username=username, | |
|
395 | environ, repo_name=self.acl_repo_name, username=username, | |
|
401 | 396 | action=action, scm=self.SCM, |
|
402 | 397 | check_locking=check_locking) |
|
403 | 398 | |
|
404 | 399 | # ====================================================================== |
|
405 | 400 | # REQUEST HANDLING |
|
406 | 401 | # ====================================================================== |
|
407 | str_repo_name = safe_str(self.repo_name) | |
|
402 | str_repo_name = safe_str(self.url_repo_name) | |
|
408 | 403 | repo_path = os.path.join( |
|
409 | 404 | safe_str(self.basepath), safe_str(self.vcs_repo_name)) |
|
410 | 405 | log.debug('Repository path is %s', repo_path) |
General Comments 0
You need to be logged in to leave comments.
Login now