##// END OF EJS Templates
comments: skip already deleted comments and make sure we don't raise unnecessary errors.
marcink -
r1330:17b0bbae default
parent child Browse files
Show More
@@ -428,6 +428,11 b' class ChangesetController(BaseRepoContro'
428 428 @jsonify
429 429 def delete_comment(self, repo_name, comment_id):
430 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 436 owner = (comment.author.user_id == c.rhodecode_user.user_id)
432 437 is_repo_admin = h.HasRepoPermissionAny('repository.admin')(c.repo_name)
433 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