add ENV to filter authorized users
This commit is contained in:
@@ -11,6 +11,11 @@ module Users
|
||||
@user = User.from_omniauth(request.env['omniauth.auth'])
|
||||
|
||||
if @user.persisted?
|
||||
unless ENV['ALLOWED_BNET_USERS'].split(',').include?(@user.battletag)
|
||||
set_flash_message(:alert, :not_authorized)
|
||||
redirect_to root_path
|
||||
return
|
||||
end
|
||||
sign_in_and_redirect @user, event: :authentication
|
||||
WowCharactersWorker.perform_async(@user.id)
|
||||
WowMountsCollectionWorker.perform_async(@user.id)
|
||||
|
||||
Reference in New Issue
Block a user