diff options
author | Lin Jen-Shin <godfat@godfat.org> | 2017-06-30 13:46:51 +0800 |
---|---|---|
committer | Lin Jen-Shin <godfat@godfat.org> | 2017-06-30 13:46:51 +0800 |
commit | 62fdbbeeb01810f9215a7b8bdf880901fcb48c65 (patch) | |
tree | 388bee91b591f3110185c103882469ce42b80784 /lib/api/projects.rb | |
parent | 0d5e6536e7c18d839b1c1da0807aa90ba5be3e06 (diff) | |
parent | 6bbbc0ba80d98a5479cf1c962835487f73e00ef7 (diff) | |
download | gitlab-ce-62fdbbeeb01810f9215a7b8bdf880901fcb48c65.tar.gz |
Merge remote-tracking branch 'upstream/master' into 32815--Add-Custom-CI-Config-Path
* upstream/master: (123 commits)
Backport changes to Projects::IssuesController and the search bar
bugfix: use `require_dependency` to bring in DeclarativePolicy
Resolve "Select branch dropdown is too close to branch name"
Clean up issuable lists
Defer project destroys within a namespace in Groups::DestroyService#async_execute
Fixed new navgiation bar logo height in Safari
Resolve "Issue dropdown persists when adding issue number to issue description"
Move verification to block level instead of paragraph
Revert "Merge branch 'dm-drop-default-scope-on-sortable-finders' into 'master'"
Added code for defining SHA attributes
Minor edits
Job details won't scroll horizontally to show long lines
Run mysql tests on stable preperation branches like 9-3-stable-patch-2
Bring back branches badge to main project page
optimize translation content based on comments
supplement traditional chinese in taiwan translation
Inserts exact matches of username, email and name to the top of the user search list
Remove Namespace model default scope override and write additional test to Project search
optimize translation content based on comments
Limit OpenGraph image size to 64x64
...
Diffstat (limited to 'lib/api/projects.rb')
-rw-r--r-- | lib/api/projects.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/api/projects.rb b/lib/api/projects.rb index 20707e97e53..a781869fc19 100644 --- a/lib/api/projects.rb +++ b/lib/api/projects.rb @@ -1,3 +1,5 @@ +require_dependency 'declarative_policy' + module API # Projects API class Projects < Grape::API @@ -397,7 +399,7 @@ module API use :pagination end get ':id/users' do - users = user_project.team.users + users = DeclarativePolicy.subject_scope { user_project.team.users } users = users.search(params[:search]) if params[:search].present? present paginate(users), with: Entities::UserBasic |