Show More
@@ -173,7 +173,7 b' def includeme(config):' | |||
|
173 | 173 | |
|
174 | 174 | config.add_route( |
|
175 | 175 | name='repo_commit_comment_history_view', |
|
176 |
pattern='/{repo_name:.*?[^/]}/changeset/{commit_id}/comment/{comment_history_id} |
|
|
176 | pattern='/{repo_name:.*?[^/]}/changeset/{commit_id}/comment/{comment_id}/history_view/{comment_history_id}', repo_route=True) | |
|
177 | 177 | config.add_view( |
|
178 | 178 | RepoCommitsView, |
|
179 | 179 | attr='repo_commit_comment_history_view', |
@@ -539,9 +539,10 b' class RepoCommitsView(RepoAppView):' | |||
|
539 | 539 | @CSRFRequired() |
|
540 | 540 | def repo_commit_comment_history_view(self): |
|
541 | 541 | c = self.load_default_context() |
|
542 | comment_id = self.request.matchdict['comment_id'] | |
|
542 | 543 | comment_history_id = self.request.matchdict['comment_history_id'] |
|
543 | 544 | |
|
544 |
comment = ChangesetComment.get_or_404(comment_ |
|
|
545 | comment = ChangesetComment.get_or_404(comment_id) | |
|
545 | 546 | comment_owner = (comment.author.user_id == self._rhodecode_db_user.user_id) |
|
546 | 547 | if comment.draft and not comment_owner: |
|
547 | 548 | # if we see draft comments history, we only allow this for owner |
@@ -289,7 +289,7 b' function registerRCRoutes() {' | |||
|
289 | 289 | pyroutes.register('repo_commit_comment_create', '/%(repo_name)s/changeset/%(commit_id)s/comment/create', ['repo_name', 'commit_id']); |
|
290 | 290 | pyroutes.register('repo_commit_comment_delete', '/%(repo_name)s/changeset/%(commit_id)s/comment/%(comment_id)s/delete', ['repo_name', 'commit_id', 'comment_id']); |
|
291 | 291 | pyroutes.register('repo_commit_comment_edit', '/%(repo_name)s/changeset/%(commit_id)s/comment/%(comment_id)s/edit', ['repo_name', 'commit_id', 'comment_id']); |
|
292 |
pyroutes.register('repo_commit_comment_history_view', '/%(repo_name)s/changeset/%(commit_id)s/comment/%(comment_history_ |
|
|
292 | pyroutes.register('repo_commit_comment_history_view', '/%(repo_name)s/changeset/%(commit_id)s/comment/%(comment_id)s/history_view/%(comment_history_id)s', ['repo_name', 'commit_id', 'comment_id', 'comment_history_id']); | |
|
293 | 293 | pyroutes.register('repo_commit_comment_preview', '/%(repo_name)s/changeset/%(commit_id)s/comment/preview', ['repo_name', 'commit_id']); |
|
294 | 294 | pyroutes.register('repo_commit_data', '/%(repo_name)s/changeset-data/%(commit_id)s', ['repo_name', 'commit_id']); |
|
295 | 295 | pyroutes.register('repo_commit_download', '/%(repo_name)s/changeset-download/%(commit_id)s', ['repo_name', 'commit_id']); |
@@ -572,7 +572,8 b' var CommentsController = function() {' | |||
|
572 | 572 | 'repo_commit_comment_history_view', |
|
573 | 573 | { |
|
574 | 574 | 'repo_name': templateContext.repo_name, |
|
575 | 'commit_id': comment_id, | |
|
575 | 'commit_id': null, // We don't need to check the commit data here... | |
|
576 | 'comment_id': comment_id, | |
|
576 | 577 | 'comment_history_id': comment_history_id, |
|
577 | 578 | } |
|
578 | 579 | ); |
General Comments 0
You need to be logged in to leave comments.
Login now