diff --git a/app/controllers/api/base_controller.rb b/app/controllers/api/base_controller.rb index 5c19597e7..226b8b76f 100644 --- a/app/controllers/api/base_controller.rb +++ b/app/controllers/api/base_controller.rb @@ -133,7 +133,8 @@ class Api::BaseController < ApplicationController end def disallow_unauthenticated_api_access? - (ENV['DISALLOW_UNAUTHENTICATED_API_ACCESS'] == 'true' || Rails.configuration.x.whitelist_mode) unless current_user + return false if current_user + ENV['DISALLOW_UNAUTHENTICATED_API_ACCESS'] == 'true' || Rails.configuration.x.whitelist_mode end def user_would_block_unauthenticated_api_access?(account)