Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormicael.bergeron <micael.bergeron@solutionstlm.com>2017-07-29 18:04:42 +0300
committermicael.bergeron <micael.bergeron@solutionstlm.com>2017-09-06 16:00:57 +0300
commit966b1128d884a318dad4277e23368334fe67e836 (patch)
treec0007ce9697dfe0fe93b52e619e21e8341c35120 /app/helpers/notes_helper.rb
parent8fe1aa5dbbb41cdefffb7177d9eda44ac8652cc7 (diff)
WIP: refactor the first-contributor to Issuable
this will remove the need make N queries (per-note) at the cost of having to mark notes with an attribute this opens up the possibility for other special roles for notes
Diffstat (limited to 'app/helpers/notes_helper.rb')
-rw-r--r--app/helpers/notes_helper.rb7
1 files changed, 1 insertions, 6 deletions
diff --git a/app/helpers/notes_helper.rb b/app/helpers/notes_helper.rb
index 1e7d346ab8f..ce028195e51 100644
--- a/app/helpers/notes_helper.rb
+++ b/app/helpers/notes_helper.rb
@@ -73,12 +73,7 @@ module NotesHelper
end
def note_max_access_for_user(note)
- note.project.team.human_max_access(note.author_id)
- end
-
- def note_first_contribution_for_user?(note)
- note.noteable.author_id == note.author_id &&
- note.project.merge_requests.merged.where(author_id: note.author_id).empty?
+ note.project.team.max_member_access(note.author_id)
end
def discussion_path(discussion)