diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/api/users.rb | 2 | ||||
-rw-r--r-- | lib/gitlab/o_auth/provider.rb | 19 |
2 files changed, 20 insertions, 1 deletions
diff --git a/lib/api/users.rb b/lib/api/users.rb index 7d4c68c7412..9b268cfe8bc 100644 --- a/lib/api/users.rb +++ b/lib/api/users.rb @@ -194,7 +194,7 @@ module API user = User.find_by(id: params[:id]) if user - DeleteUserService.new.execute(user) + DeleteUserService.new(current_user).execute(user) else not_found!('User') end diff --git a/lib/gitlab/o_auth/provider.rb b/lib/gitlab/o_auth/provider.rb new file mode 100644 index 00000000000..f986499a27c --- /dev/null +++ b/lib/gitlab/o_auth/provider.rb @@ -0,0 +1,19 @@ +module Gitlab + module OAuth + class Provider + def self.names + providers = [] + + Gitlab.config.ldap.servers.values.each do |server| + providers << server['provider_name'] + end + + Gitlab.config.omniauth.providers.each do |provider| + providers << provider['name'] + end + + providers + end + end + end +end |