summaryrefslogtreecommitdiff
path: root/app/models/user.rb
diff options
context:
space:
mode:
authorToon Claes <toon@gitlab.com>2017-05-23 22:40:07 +0200
committerToon Claes <toon@gitlab.com>2017-05-30 22:45:59 +0200
commit8e72ad70bd2479ae5a465eac1df74f99f03ea731 (patch)
treec282901f94ffddc335496481eb278e70749f93bc /app/models/user.rb
parent07fc79e7c53a4fa7c4dd33835b905dfa8a609ff8 (diff)
downloadgitlab-ce-8e72ad70bd2479ae5a465eac1df74f99f03ea731.tar.gz
Add starred_by scope to Project
Add a scope to search for the projects that are starred by a certain user.
Diffstat (limited to 'app/models/user.rb')
-rw-r--r--app/models/user.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/user.rb b/app/models/user.rb
index 3f816a250c2..20894ce269a 100644
--- a/app/models/user.rb
+++ b/app/models/user.rb
@@ -557,7 +557,7 @@ class User < ActiveRecord::Base
authorized_projects(Gitlab::Access::REPORTER).where(id: projects)
end
- def viewable_starred_projects
+ def viewable_starred_projects # DEPRECATED: Use ProjectFinder instead. Remove together with API V3
starred_projects.where("projects.visibility_level IN (?) OR projects.id IN (?)",
[Project::PUBLIC, Project::INTERNAL],
authorized_projects.select(:project_id))