diff options
author | Douwe Maan <douwe@gitlab.com> | 2015-03-27 12:19:34 +0100 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2015-04-02 10:57:01 +0200 |
commit | e62b5a2b072eb1bc8587b095e906bd194475eacc (patch) | |
tree | 41c8af3aa73cce323bc9bdb53091c5c44ad39951 /app/services/projects | |
parent | 756e7aa8c347ccf211db03a7fa16ab33c021f820 (diff) | |
download | gitlab-ce-e62b5a2b072eb1bc8587b095e906bd194475eacc.tar.gz |
Only allow user to see participants from groups they have access to.
Diffstat (limited to 'app/services/projects')
-rw-r--r-- | app/services/projects/participants_service.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/services/projects/participants_service.rb b/app/services/projects/participants_service.rb index bcbacbff562..bcdde0950c5 100644 --- a/app/services/projects/participants_service.rb +++ b/app/services/projects/participants_service.rb @@ -21,10 +21,10 @@ module Projects users = case type when "Issue" issue = @project.issues.find_by_iid(id) - issue ? issue.participants : [] + issue ? issue.participants(user) : [] when "MergeRequest" merge_request = @project.merge_requests.find_by_iid(id) - merge_request ? merge_request.participants : [] + merge_request ? merge_request.participants(user) : [] when "Commit" author_ids = Note.for_commit_id(id).pluck(:author_id).uniq User.where(id: author_ids) |