rename pam email environment variable to something more understandable and default to LOCAL_DOMAIN (better fallback) (#6833)

main
Alexander 7 years ago committed by Eugen Rochko
parent 0306e3e9be
commit 33ee347c99

@ -155,8 +155,8 @@ STREAMING_CLUSTER_NUM=1
# The pam environment variable "email" is provided by: # The pam environment variable "email" is provided by:
# https://github.com/devkral/pam_email_extractor # https://github.com/devkral/pam_email_extractor
# PAM_ENABLED=true # PAM_ENABLED=true
# Fallback Suffix for email address generation (nil by default) # Fallback email domain for email address generation (LOCAL_DOMAIN by default)
# PAM_DEFAULT_SUFFIX=pam # PAM_EMAIL_DOMAIN=example.com
# Name of the pam service (pam "auth" section is evaluated) # Name of the pam service (pam "auth" section is evaluated)
# PAM_DEFAULT_SERVICE=rpam # PAM_DEFAULT_SERVICE=rpam
# Name of the pam service used for checking if an user can register (pam "account" section is evaluated) (nil (disabled) by default) # Name of the pam service used for checking if an user can register (pam "account" section is evaluated) (nil (disabled) by default)

@ -342,7 +342,7 @@ Devise.setup do |config|
config.usernamefield = nil config.usernamefield = nil
config.emailfield = 'email' config.emailfield = 'email'
config.check_at_sign = true config.check_at_sign = true
config.pam_default_suffix = ENV.fetch('PAM_DEFAULT_SUFFIX') { nil } config.pam_default_suffix = ENV.fetch('PAM_EMAIL_DOMAIN') { ENV['LOCAL_DOMAIN'] }
config.pam_default_service = ENV.fetch('PAM_DEFAULT_SERVICE') { 'rpam' } config.pam_default_service = ENV.fetch('PAM_DEFAULT_SERVICE') { 'rpam' }
config.pam_controlled_service = ENV.fetch('PAM_CONTROLLED_SERVICE') { nil } config.pam_controlled_service = ENV.fetch('PAM_CONTROLLED_SERVICE') { nil }
end end

Loading…
Cancel
Save