summaryrefslogtreecommitdiff
path: root/app/models/user.rb
diff options
context:
space:
mode:
authorGrzegorz Bizon <grzesiek.bizon@gmail.com>2016-03-14 11:25:04 +0100
committerGrzegorz Bizon <grzesiek.bizon@gmail.com>2016-03-17 07:39:16 +0100
commitbcd5806960f3f74e27bc8e7c8a6fab3a044c181a (patch)
tree6f8ea9683756ed4aebee538706e7e80ff4d9dc21 /app/models/user.rb
parenta91101b19a44d98005dd21b06d8509abcd82ddfc (diff)
downloadgitlab-ce-bcd5806960f3f74e27bc8e7c8a6fab3a044c181a.tar.gz
Add access-level filter support for projects select
This also refactores ProjectSelect adding some decorator-like functions.
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 68b242888aa..5ba72dc0ae9 100644
--- a/app/models/user.rb
+++ b/app/models/user.rb
@@ -429,7 +429,7 @@ class User < ActiveRecord::Base
Group.where("namespaces.id IN (#{union.to_sql})")
end
- # Returns the groups a user is authorized to access.
+ # Returns projects user is authorized to access.
def authorized_projects
Project.where("projects.id IN (#{projects_union.to_sql})")
end