diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2015-06-22 17:53:11 +0300 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2015-06-22 17:53:11 +0300 |
commit | b21390936a02764cc5aee8cfeef3d2f8419da4fc (patch) | |
tree | 708159d606d1c6b9797704261bfd17383fb01d68 /lib/gitlab/o_auth | |
parent | 8f89a4884744cf633fcff218dcfc657a8ff922b4 (diff) |
Make provider a select for identities form in admin area
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Diffstat (limited to 'lib/gitlab/o_auth')
-rw-r--r-- | lib/gitlab/o_auth/provider.rb | 19 |
1 files changed, 19 insertions, 0 deletions
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 |