Show More
@@ -428,6 +428,11 b' class ChangesetController(BaseRepoContro' | |||||
428 | @jsonify |
|
428 | @jsonify | |
429 | def delete_comment(self, repo_name, comment_id): |
|
429 | def delete_comment(self, repo_name, comment_id): | |
430 | comment = ChangesetComment.get(comment_id) |
|
430 | comment = ChangesetComment.get(comment_id) | |
|
431 | if not comment: | |||
|
432 | log.debug('Comment with id:%s not found, skipping', comment_id) | |||
|
433 | # comment already deleted in another call probably | |||
|
434 | return True | |||
|
435 | ||||
431 | owner = (comment.author.user_id == c.rhodecode_user.user_id) |
|
436 | owner = (comment.author.user_id == c.rhodecode_user.user_id) | |
432 | is_repo_admin = h.HasRepoPermissionAny('repository.admin')(c.repo_name) |
|
437 | is_repo_admin = h.HasRepoPermissionAny('repository.admin')(c.repo_name) | |
433 | if h.HasPermissionAny('hg.admin')() or is_repo_admin or owner: |
|
438 | if h.HasPermissionAny('hg.admin')() or is_repo_admin or owner: |
General Comments 0
You need to be logged in to leave comments.
Login now