Commit ebffa96b authored by Yorick Peterse's avatar Yorick Peterse

Backport parameters for API::Users

This backports the EE specific parameters for API::Users, and wraps them
in a conditional.
parent 8228bab9
......@@ -52,9 +52,10 @@ module API
optional :private_profile, type: Boolean, desc: 'Flag indicating the user has a private profile'
all_or_none_of :extern_uid, :provider
# EE
if Gitlab.ee?
optional :shared_runners_minutes_limit, type: Integer, desc: 'Pipeline minutes quota for this user'
end
end
params :sort_params do
optional :order_by, type: String, values: %w[id name username created_at updated_at],
......@@ -84,9 +85,10 @@ module API
use :pagination
use :with_custom_attributes
# EE
if Gitlab.ee?
optional :skip_ldap, type: Boolean, default: false, desc: 'Skip LDAP users'
end
end
# rubocop: disable CodeReuse/ActiveRecord
get do
authenticated_as_admin! if params[:external].present? || (params[:extern_uid].present? && params[:provider].present?)
......
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