diff options
author | Daniel <git@baby-gnu.org> | 2021-08-25 16:41:24 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-08-25 18:41:24 +0200 |
commit | 2ed1c92c6331029ebd2762cc425a3a163dffd113 (patch) | |
tree | 82e9c08cf7fab9124a3fa46b350622588cfbd7ab /config/initializers | |
parent | 366e0b82dbfd51b4502586beb39f65594ddf36a5 (diff) |
New env variable: CAS_SECURITY_ASSUME_EMAIL_IS_VERIFIED (#16655)
When using a CAS server, the users only have a temporary email `change@me-foo-cas.com` which can't be changed but by an administrator. We need a new environment variable like for SAML to assume the email from CAS is verified. * config/initializers/omniauth.rb: define CAS option for assuming email are always verified. * .env.nanobox: add new variable as an example.
Diffstat (limited to 'config/initializers')
-rw-r--r-- | config/initializers/omniauth.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/config/initializers/omniauth.rb b/config/initializers/omniauth.rb index 9e037f421..5039b4c1f 100644 --- a/config/initializers/omniauth.rb +++ b/config/initializers/omniauth.rb @@ -30,6 +30,8 @@ Devise.setup do |config| cas_options[:location_key] = ENV['CAS_LOCATION_KEY'] || 'location' cas_options[:image_key] = ENV['CAS_IMAGE_KEY'] || 'image' cas_options[:phone_key] = ENV['CAS_PHONE_KEY'] || 'phone' + cas_options[:security] = {} + cas_options[:security][:assume_email_is_verified] = ENV['CAS_SECURITY_ASSUME_EMAIL_IS_VERIFIED'] == 'true' config.omniauth :cas, cas_options end |