Dont show blocked users in autocomplete
This commit is contained in:
parent
07a88d6699
commit
3b42c267a6
2 changed files with 2 additions and 0 deletions
|
@ -24,6 +24,7 @@ $ ->
|
||||||
data: (term, page) ->
|
data: (term, page) ->
|
||||||
search: term # search term
|
search: term # search term
|
||||||
per_page: 10
|
per_page: 10
|
||||||
|
active: true
|
||||||
private_token: gon.api_token
|
private_token: gon.api_token
|
||||||
|
|
||||||
results: (data, page) -> # parse the results into the format expected by Select2.
|
results: (data, page) -> # parse the results into the format expected by Select2.
|
||||||
|
|
|
@ -10,6 +10,7 @@ module Gitlab
|
||||||
# GET /users
|
# GET /users
|
||||||
get do
|
get do
|
||||||
@users = User.scoped
|
@users = User.scoped
|
||||||
|
@users = @users.active if params[:active].present?
|
||||||
@users = @users.search(params[:search]) if params[:search].present?
|
@users = @users.search(params[:search]) if params[:search].present?
|
||||||
present @users, with: Entities::User
|
present @users, with: Entities::User
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue