forked from External/greenlight
Added variable in .env to enforce certain domains in account registrations (#1589)
Allow REQUIRE_MAIL_DOMAIN to not exist in addition to it being empty Undo changes in config/locales/de_DE.yml changed .env variable name to GREENLIGHT_ACCOUNT_HD; allowed only comma and no whitespace as separator Allow the admin to change email-addresses, just enforce domain on registration Co-authored-by: Gaja Sophie Peters <gaja.peters@uni-hamburg.de> Co-authored-by: Ahmad Farhat <ahmad.af.farhat@gmail.com>
This commit is contained in:
@ -94,6 +94,9 @@ module Greenlight
|
||||
# Determine if GreenLight should enable email verification
|
||||
config.enable_email_verification = parse_bool(ENV['ALLOW_MAIL_NOTIFICATIONS'])
|
||||
|
||||
# Determine if GreenLight should require a certain mail-domain
|
||||
config.require_email_domain = ENV["GREENLIGHT_ACCOUNT_HD"].to_s.split(",")
|
||||
|
||||
# Determine if GreenLight should allow non-omniauth signup/login.
|
||||
config.allow_user_signup = parse_bool(ENV['ALLOW_GREENLIGHT_ACCOUNTS'])
|
||||
|
||||
|
@ -269,6 +269,7 @@ en:
|
||||
accepted: must be accepted
|
||||
confirmation: doesn't match %{attribute}
|
||||
inclusion: is not included in the list
|
||||
domain: must end with "%{email_domain}"
|
||||
no_provider:
|
||||
message: The site you are trying to access is not enabled
|
||||
help: Please contact your system administrator to setup Greenlight
|
||||
|
Reference in New Issue
Block a user