diff options
author | Marin Jankovski <marin@gitlab.com> | 2016-04-13 13:09:47 +0000 |
---|---|---|
committer | Marin Jankovski <marin@gitlab.com> | 2016-04-13 13:09:47 +0000 |
commit | c74604699269a2edbbe937309cce7a4ed789cb07 (patch) | |
tree | 3dc05906df853581ffed364ae554d3aeeedcd19f /config | |
parent | ab4ea3720c084063ab83cef3aaf3a0b6adbc2a3c (diff) | |
parent | 61fc9aa87ea3752f3c7b853ab1cb102e53d392f2 (diff) | |
download | gitlab-ce-c74604699269a2edbbe937309cce7a4ed789cb07.tar.gz |
Merge branch 'external-omniauth-providers' into 'master'
Allow Omniauth providers to be marked as external
Related to #4009
With this MR we will be able to allow the user to set which Omniauth Providers they would like to have as external. All users login in via these providers will be marked as external, even if they already had an account before. If the provider is removed form the list of external providers, the users will be marked as internal at their next login.
MR for Omnibus: gitlab-org/omnibus-gitlab!727
/cc @dblessing @DouweM
See merge request !3657
Diffstat (limited to 'config')
-rw-r--r-- | config/gitlab.yml.example | 7 | ||||
-rw-r--r-- | config/initializers/1_settings.rb | 1 |
2 files changed, 8 insertions, 0 deletions
diff --git a/config/gitlab.yml.example b/config/gitlab.yml.example index 803a9d07bee..b28fc5c8e01 100644 --- a/config/gitlab.yml.example +++ b/config/gitlab.yml.example @@ -316,6 +316,13 @@ production: &base # (default: false) auto_link_saml_user: false + # Set different Omniauth providers as external so that all users creating accounts + # via these providers will not be able to have access to internal projects. You + # will need to use the full name of the provider, like `google_oauth2` for Google. + # Refer to the examples below for the full names of the supported providers. + # (default: []) + external_providers: [] + ## Auth providers # Uncomment the following lines and fill in the data of the auth provider you want to use # If your favorite auth provider is not listed you can use others: diff --git a/config/initializers/1_settings.rb b/config/initializers/1_settings.rb index 630b6e594a7..287f99c724d 100644 --- a/config/initializers/1_settings.rb +++ b/config/initializers/1_settings.rb @@ -129,6 +129,7 @@ Settings['omniauth'] ||= Settingslogic.new({}) Settings.omniauth['enabled'] = false if Settings.omniauth['enabled'].nil? Settings.omniauth['auto_sign_in_with_provider'] = false if Settings.omniauth['auto_sign_in_with_provider'].nil? Settings.omniauth['allow_single_sign_on'] = false if Settings.omniauth['allow_single_sign_on'].nil? +Settings.omniauth['external_providers'] = [] if Settings.omniauth['external_providers'].nil? Settings.omniauth['block_auto_created_users'] = true if Settings.omniauth['block_auto_created_users'].nil? Settings.omniauth['auto_link_ldap_user'] = false if Settings.omniauth['auto_link_ldap_user'].nil? Settings.omniauth['auto_link_saml_user'] = false if Settings.omniauth['auto_link_saml_user'].nil? |