Show More
@@ -61,7 +61,7 log = logging.getLogger(__name__) | |||
|
61 | 61 | |
|
62 | 62 | class FilesController(BaseRepoController): |
|
63 | 63 | |
|
64 | @LoginRequired() | |
|
64 | ||
|
65 | 65 | def __before__(self): |
|
66 | 66 | super(FilesController, self).__before__() |
|
67 | 67 | c.cut_off_limit = self.cut_off_limit |
@@ -113,6 +113,7 class FilesController(BaseRepoController | |||
|
113 | 113 | |
|
114 | 114 | return file_node |
|
115 | 115 | |
|
116 | @LoginRequired() | |
|
116 | 117 | @HasRepoPermissionAnyDecorator('repository.read', 'repository.write', |
|
117 | 118 | 'repository.admin') |
|
118 | 119 | def index(self, repo_name, revision, f_path, annotate=False): |
@@ -169,6 +170,7 class FilesController(BaseRepoController | |||
|
169 | 170 | |
|
170 | 171 | return render('files/files.html') |
|
171 | 172 | |
|
173 | @LoginRequired() | |
|
172 | 174 | @HasRepoPermissionAnyDecorator('repository.read', 'repository.write', |
|
173 | 175 | 'repository.admin') |
|
174 | 176 | def rawfile(self, repo_name, revision, f_path): |
@@ -181,6 +183,7 class FilesController(BaseRepoController | |||
|
181 | 183 | response.content_type = file_node.mimetype |
|
182 | 184 | return file_node.content |
|
183 | 185 | |
|
186 | @LoginRequired() | |
|
184 | 187 | @HasRepoPermissionAnyDecorator('repository.read', 'repository.write', |
|
185 | 188 | 'repository.admin') |
|
186 | 189 | def raw(self, repo_name, revision, f_path): |
@@ -227,6 +230,7 class FilesController(BaseRepoController | |||
|
227 | 230 | response.content_type = mimetype |
|
228 | 231 | return file_node.content |
|
229 | 232 | |
|
233 | @LoginRequired() | |
|
230 | 234 | @HasRepoPermissionAnyDecorator('repository.write', 'repository.admin') |
|
231 | 235 | def edit(self, repo_name, revision, f_path): |
|
232 | 236 | r_post = request.POST |
@@ -276,6 +280,7 class FilesController(BaseRepoController | |||
|
276 | 280 | |
|
277 | 281 | return render('files/files_edit.html') |
|
278 | 282 | |
|
283 | @LoginRequired() | |
|
279 | 284 | @HasRepoPermissionAnyDecorator('repository.write', 'repository.admin') |
|
280 | 285 | def add(self, repo_name, revision, f_path): |
|
281 | 286 | r_post = request.POST |
@@ -330,6 +335,7 class FilesController(BaseRepoController | |||
|
330 | 335 | |
|
331 | 336 | return render('files/files_add.html') |
|
332 | 337 | |
|
338 | @LoginRequired() | |
|
333 | 339 | @HasRepoPermissionAnyDecorator('repository.read', 'repository.write', |
|
334 | 340 | 'repository.admin') |
|
335 | 341 | def archivefile(self, repo_name, fname): |
@@ -387,6 +393,7 class FilesController(BaseRepoController | |||
|
387 | 393 | response.content_type = str(content_type) |
|
388 | 394 | return get_chunked_archive(archive) |
|
389 | 395 | |
|
396 | @LoginRequired() | |
|
390 | 397 | @HasRepoPermissionAnyDecorator('repository.read', 'repository.write', |
|
391 | 398 | 'repository.admin') |
|
392 | 399 | def diff(self, repo_name, f_path): |
@@ -485,9 +492,10 class FilesController(BaseRepoController | |||
|
485 | 492 | |
|
486 | 493 | return hist_l |
|
487 | 494 | |
|
488 | @jsonify | |
|
495 | @LoginRequired() | |
|
489 | 496 | @HasRepoPermissionAnyDecorator('repository.read', 'repository.write', |
|
490 | 497 | 'repository.admin') |
|
498 | @jsonify | |
|
491 | 499 | def nodelist(self, repo_name, revision, f_path): |
|
492 | 500 | if request.environ.get('HTTP_X_PARTIAL_XHR'): |
|
493 | 501 | cs = self.__get_cs_or_redirect(revision, repo_name) |
General Comments 0
You need to be logged in to leave comments.
Login now