Show More
@@ -124,7 +124,7 b' class SimpleGit(BaseVCSController):' | |||||
124 | if action in ['pull', 'push']: |
|
124 | if action in ['pull', 'push']: | |
125 | anonymous_user = self.__get_user('default') |
|
125 | anonymous_user = self.__get_user('default') | |
126 | username = anonymous_user.username |
|
126 | username = anonymous_user.username | |
127 | anonymous_perm = self._check_permission(action,anonymous_user, |
|
127 | anonymous_perm = self._check_permission(action, anonymous_user, | |
128 | repo_name) |
|
128 | repo_name) | |
129 |
|
129 | |||
130 | if anonymous_perm is not True or anonymous_user.active is False: |
|
130 | if anonymous_perm is not True or anonymous_user.active is False: | |
@@ -157,7 +157,6 b' class SimpleGit(BaseVCSController):' | |||||
157 | #============================================================== |
|
157 | #============================================================== | |
158 | # CHECK PERMISSIONS FOR THIS REQUEST USING GIVEN USERNAME |
|
158 | # CHECK PERMISSIONS FOR THIS REQUEST USING GIVEN USERNAME | |
159 | #============================================================== |
|
159 | #============================================================== | |
160 | log.info('%s action on GIT repo "%s"' % (action, repo_name)) |
|
|||
161 | if action in ['pull', 'push']: |
|
160 | if action in ['pull', 'push']: | |
162 | try: |
|
161 | try: | |
163 | user = self.__get_user(username) |
|
162 | user = self.__get_user(username) | |
@@ -190,7 +189,7 b' class SimpleGit(BaseVCSController):' | |||||
190 | #invalidate cache on push |
|
189 | #invalidate cache on push | |
191 | if action == 'push': |
|
190 | if action == 'push': | |
192 | self._invalidate_cache(repo_name) |
|
191 | self._invalidate_cache(repo_name) | |
193 |
|
192 | log.info('%s action on GIT repo "%s"' % (action, repo_name)) | ||
194 | app = self.__make_app(repo_name, repo_path) |
|
193 | app = self.__make_app(repo_name, repo_path) | |
195 | return app(environ, start_response) |
|
194 | return app(environ, start_response) | |
196 | except Exception: |
|
195 | except Exception: |
@@ -120,7 +120,6 b' class SimpleHg(BaseVCSController):' | |||||
120 | #============================================================== |
|
120 | #============================================================== | |
121 | # CHECK PERMISSIONS FOR THIS REQUEST USING GIVEN USERNAME |
|
121 | # CHECK PERMISSIONS FOR THIS REQUEST USING GIVEN USERNAME | |
122 | #============================================================== |
|
122 | #============================================================== | |
123 | log.info('%s action on HG repo "%s"' % (action, repo_name)) |
|
|||
124 | if action in ['pull', 'push']: |
|
123 | if action in ['pull', 'push']: | |
125 | try: |
|
124 | try: | |
126 | user = self.__get_user(username) |
|
125 | user = self.__get_user(username) | |
@@ -161,7 +160,7 b' class SimpleHg(BaseVCSController):' | |||||
161 | # invalidate cache on push |
|
160 | # invalidate cache on push | |
162 | if action == 'push': |
|
161 | if action == 'push': | |
163 | self._invalidate_cache(repo_name) |
|
162 | self._invalidate_cache(repo_name) | |
164 |
|
163 | log.info('%s action on HG repo "%s"' % (action, repo_name)) | ||
165 | app = self.__make_app(repo_path, baseui, extras) |
|
164 | app = self.__make_app(repo_path, baseui, extras) | |
166 | return app(environ, start_response) |
|
165 | return app(environ, start_response) | |
167 | except RepoError, e: |
|
166 | except RepoError, e: |
General Comments 0
You need to be logged in to leave comments.
Login now