Skip to content
Snippets Groups Projects
Commit 8b3ada75 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets
Browse files

Respect group members in mentionable concern

parent d422ee0f
No related branches found
No related tags found
1 merge request!4948CentOS 6.4 install GitLab 6 0 stable ssh Auth fail
This commit is part of merge request !4948. Comments created here will be created in the context of that merge request.
Loading
@@ -15,7 +15,7 @@ module Mentionable
Loading
@@ -15,7 +15,7 @@ module Mentionable
matches.each do |match| matches.each do |match|
identifier = match.delete "@" identifier = match.delete "@"
if has_project if has_project
id = project.users_projects.joins(:user).where(users: { username: identifier }).pluck(:user_id).first id = project.team.members.find { |u| u.username == identifier }.try(:id)
else else
id = User.where(username: identifier).pluck(:id).first id = User.where(username: identifier).pluck(:id).first
end end
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment