diff options
author | Douwe Maan <douwe@gitlab.com> | 2017-02-15 15:45:40 +0000 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2017-02-15 15:45:40 +0000 |
commit | cc0c2d18445a9115e87594c22cb47fcb1e8e5c41 (patch) | |
tree | a0e27c4337e3b6bfd3701fba0a98f40ade1e3eae /lib/api/helpers.rb | |
parent | 178b6014f856dbca1653961a1f8341d7d1d38d2f (diff) | |
parent | 4ca6a719a9f961efa8e9b2a9401319cbfc6403df (diff) | |
download | gitlab-ce-zj-remove-deprecated-ci-service.tar.gz |
Merge branch 'master' into 'zj-remove-deprecated-ci-service'zj-remove-deprecated-ci-service
# Conflicts:
# db/schema.rb
Diffstat (limited to 'lib/api/helpers.rb')
-rw-r--r-- | lib/api/helpers.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/api/helpers.rb b/lib/api/helpers.rb index dfab60f7fa5..13896dd91b9 100644 --- a/lib/api/helpers.rb +++ b/lib/api/helpers.rb @@ -256,6 +256,14 @@ module API # project helpers def filter_projects(projects) + if params[:owned] + projects = projects.merge(current_user.owned_projects) + end + + if params[:starred] + projects = projects.merge(current_user.starred_projects) + end + if params[:search].present? projects = projects.search(params[:search]) end |