Show More
@@ -177,10 +177,7 b' class ChangesetController(BaseRepoContro' | |||||
177 | c.users_array = repo_model.get_users_js() |
|
177 | c.users_array = repo_model.get_users_js() | |
178 | c.users_groups_array = repo_model.get_users_groups_js() |
|
178 | c.users_groups_array = repo_model.get_users_groups_js() | |
179 |
|
179 | |||
180 | @LoginRequired() |
|
180 | def _index(self, revision, method): | |
181 | @HasRepoPermissionAnyDecorator('repository.read', 'repository.write', |
|
|||
182 | 'repository.admin') |
|
|||
183 | def index(self, revision, method='show'): |
|
|||
184 | c.anchor_url = anchor_url |
|
181 | c.anchor_url = anchor_url | |
185 | c.ignorews_url = _ignorews_url |
|
182 | c.ignorews_url = _ignorews_url | |
186 | c.context_url = _context_url |
|
183 | c.context_url = _context_url | |
@@ -315,20 +312,26 b' class ChangesetController(BaseRepoContro' | |||||
315 | @LoginRequired() |
|
312 | @LoginRequired() | |
316 | @HasRepoPermissionAnyDecorator('repository.read', 'repository.write', |
|
313 | @HasRepoPermissionAnyDecorator('repository.read', 'repository.write', | |
317 | 'repository.admin') |
|
314 | 'repository.admin') | |
|
315 | def index(self, revision, method='show'): | |||
|
316 | return self._index(revision, method=method) | |||
|
317 | ||||
|
318 | @LoginRequired() | |||
|
319 | @HasRepoPermissionAnyDecorator('repository.read', 'repository.write', | |||
|
320 | 'repository.admin') | |||
318 | def changeset_raw(self, revision): |
|
321 | def changeset_raw(self, revision): | |
319 | return self.index(revision, method='raw') |
|
322 | return self._index(revision, method='raw') | |
320 |
|
323 | |||
321 | @LoginRequired() |
|
324 | @LoginRequired() | |
322 | @HasRepoPermissionAnyDecorator('repository.read', 'repository.write', |
|
325 | @HasRepoPermissionAnyDecorator('repository.read', 'repository.write', | |
323 | 'repository.admin') |
|
326 | 'repository.admin') | |
324 | def changeset_patch(self, revision): |
|
327 | def changeset_patch(self, revision): | |
325 | return self.index(revision, method='patch') |
|
328 | return self._index(revision, method='patch') | |
326 |
|
329 | |||
327 | @LoginRequired() |
|
330 | @LoginRequired() | |
328 | @HasRepoPermissionAnyDecorator('repository.read', 'repository.write', |
|
331 | @HasRepoPermissionAnyDecorator('repository.read', 'repository.write', | |
329 | 'repository.admin') |
|
332 | 'repository.admin') | |
330 | def changeset_download(self, revision): |
|
333 | def changeset_download(self, revision): | |
331 | return self.index(revision, method='download') |
|
334 | return self._index(revision, method='download') | |
332 |
|
335 | |||
333 | @LoginRequired() |
|
336 | @LoginRequired() | |
334 | @NotAnonymous() |
|
337 | @NotAnonymous() |
General Comments 0
You need to be logged in to leave comments.
Login now