Show More
@@ -285,6 +285,15 b' class SimpleVCS(object):' | |||||
285 | action = self._get_action(environ) |
|
285 | action = self._get_action(environ) | |
286 |
|
286 | |||
287 | # ====================================================================== |
|
287 | # ====================================================================== | |
|
288 | # Check if this is a request to a shadow repository of a pull request. | |||
|
289 | # In this case only pull action is allowed. | |||
|
290 | # ====================================================================== | |||
|
291 | if self.pr_id is not None and action != 'pull': | |||
|
292 | reason = 'Only pull action is allowed for shadow repositories.' | |||
|
293 | log.debug('User not allowed to proceed, %s', reason) | |||
|
294 | return HTTPNotAcceptable(reason)(environ, start_response) | |||
|
295 | ||||
|
296 | # ====================================================================== | |||
288 | # CHECK ANONYMOUS PERMISSION |
|
297 | # CHECK ANONYMOUS PERMISSION | |
289 | # ====================================================================== |
|
298 | # ====================================================================== | |
290 | if action in ['pull', 'push']: |
|
299 | if action in ['pull', 'push']: |
General Comments 0
You need to be logged in to leave comments.
Login now