summaryrefslogtreecommitdiff
path: root/lib/api/users.rb
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2018-04-20 12:21:48 +0300
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2018-04-23 11:54:45 +0300
commitc87c55bb35f3c20b8a4116cf5298628f7339b042 (patch)
tree007586c7fe9babaad0bec47fd27e98a7df147d7b /lib/api/users.rb
parentc212908aad9b32352653dfe9ca966f148c8dfc1a (diff)
downloadgitlab-ce-c87c55bb35f3c20b8a4116cf5298628f7339b042.tar.gz
Add 2FA filter to users API for admins only
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Diffstat (limited to 'lib/api/users.rb')
-rw-r--r--lib/api/users.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/api/users.rb b/lib/api/users.rb
index 3920171205f..14b8a796c8e 100644
--- a/lib/api/users.rb
+++ b/lib/api/users.rb
@@ -77,7 +77,7 @@ module API
authenticated_as_admin! if params[:external].present? || (params[:extern_uid].present? && params[:provider].present?)
unless current_user&.admin?
- params.except!(:created_after, :created_before, :order_by, :sort)
+ params.except!(:created_after, :created_before, :order_by, :sort, :two_factor)
end
users = UsersFinder.new(current_user, params).execute