Commit 291fa9e9 authored by http://jneen.net/'s avatar http://jneen.net/

use subject scope in :id/users

since we're loading all the members anyways
parent 366adac5
require 'declarative_policy'
module API
# Projects API
class Projects < Grape::API
......@@ -408,7 +410,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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment