From b85d8f69927e216d1ad33de623a7ef511e657831 Mon Sep 17 00:00:00 2001 From: Graeme Porteous Date: Thu, 29 Feb 2024 09:27:02 +0000 Subject: [PATCH] fixup! Patch authority only response gatekeeper --- lib/authority_only_response_gatekeeper.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/authority_only_response_gatekeeper.rb b/lib/authority_only_response_gatekeeper.rb index 56cdb092..1c3bcb87 100644 --- a/lib/authority_only_response_gatekeeper.rb +++ b/lib/authority_only_response_gatekeeper.rb @@ -3,11 +3,11 @@ module AuthorityOnlyResponseGatekeeper { public_body_id: 27, email: 'no-reply@cabinetoffice.ecase.co.uk' } ] - def calculate_allow_reason(info_request, mail) + def allow?(mail) public_body_id = info_request.public_body_id email = MailHandler.get_from_address(mail) - return [true, nil] if EXTRA_ALLOWED_EMAILS.any? do |a| + return true if EXTRA_ALLOWED_EMAILS.any? do |a| a[:public_body_id] == public_body_id && a[:email] == email end