diff options
author | Oswaldo Ferreira <oswaldo@gitlab.com> | 2017-03-02 16:47:10 -0300 |
---|---|---|
committer | Toon Claes <toon@gitlab.com> | 2017-03-03 12:02:41 +0100 |
commit | 06e96907eef49c3be1b3608e77420e42d554943a (patch) | |
tree | 36e8c1d69e1822d04e46b0195c4ca4b83182b656 /lib | |
parent | a9a581567c6d56186feade11ad867a66ab872ca6 (diff) | |
download | gitlab-ce-06e96907eef49c3be1b3608e77420e42d554943a.tar.gz |
Add filter param for authorized projects for current_user for V4
Diffstat (limited to 'lib')
-rw-r--r-- | lib/api/helpers.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/api/helpers.rb b/lib/api/helpers.rb index 4600abc7dc7..cf57cb1b825 100644 --- a/lib/api/helpers.rb +++ b/lib/api/helpers.rb @@ -252,6 +252,10 @@ module API # project helpers def filter_projects(projects) + if params[:authorized] + projects = projects.merge(current_user.authorized_projects) + end + if params[:owned] projects = projects.merge(current_user.owned_projects) end |