summaryrefslogtreecommitdiff
path: root/app/services/notes/update_service.rb
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2022-04-20 10:00:54 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2022-04-20 10:00:54 +0000
commit3cccd102ba543e02725d247893729e5c73b38295 (patch)
treef36a04ec38517f5deaaacb5acc7d949688d1e187 /app/services/notes/update_service.rb
parent205943281328046ef7b4528031b90fbda70c75ac (diff)
downloadgitlab-ce-3cccd102ba543e02725d247893729e5c73b38295.tar.gz
Add latest changes from gitlab-org/gitlab@14-10-stable-eev14.10.0-rc42
Diffstat (limited to 'app/services/notes/update_service.rb')
-rw-r--r--app/services/notes/update_service.rb14
1 files changed, 1 insertions, 13 deletions
diff --git a/app/services/notes/update_service.rb b/app/services/notes/update_service.rb
index 1cbb5916107..04fc4c7c944 100644
--- a/app/services/notes/update_service.rb
+++ b/app/services/notes/update_service.rb
@@ -27,10 +27,7 @@ module Notes
note.assign_attributes(last_edited_at: Time.current, updated_by: current_user)
end
- note.with_transaction_returning_status do
- update_confidentiality(note)
- note.save
- end
+ note.save
unless only_commands || note.for_personal_snippet?
note.create_new_cross_references!(current_user)
@@ -88,15 +85,6 @@ module Notes
TodoService.new.update_note(note, current_user, old_mentioned_users)
end
- # This method updates confidentiality of all discussion notes at once
- def update_confidentiality(note)
- return unless params.key?(:confidential)
- return unless note.is_a?(DiscussionNote) # we don't need to do bulk update for single notes
- return unless note.start_of_discussion? # don't update all notes if a response is being updated
-
- Note.id_in(note.discussion.notes.map(&:id)).update_all(confidential: params[:confidential])
- end
-
def track_note_edit_usage_for_issues(note)
Gitlab::UsageDataCounters::IssueActivityUniqueCounter.track_issue_comment_edited_action(author: note.author)
end