Skip to content
Snippets Groups Projects
Commit 59e7c39f authored by http://jneen.net/'s avatar http://jneen.net/
Browse files

use subject scope in :id/users

since we're loading all the members anyways
parent e895b49f
No related branches found
No related tags found
No related merge requests found
require 'declarative_policy'
module API
# Projects API
class Projects < Grape::API
Loading
Loading
@@ -396,7 +398,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
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment