Skip to content

Commit 52de2e7

Browse files
committed
Refactor the last remaining error_no_message to the new format.
1 parent ab6170d commit 52de2e7

8 files changed

Lines changed: 42 additions & 26 deletions

File tree

CHANGELOG.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,27 @@ the EngineBlock wiki.
1515
Features:
1616
* Added `coin:azure_domain_hint` configuration option for IdPs. When set, EngineBlock appends a `whr=<domain>` query parameter to the HTTP-Redirect AuthnRequest sent to the IdP, allowing Microsoft Azure / EntraID to skip the account picker (#1864).
1717

18+
### Translation key changes
19+
#### `error_invalid_acs_location`
20+
21+
The `error_invalid_acs_location` translation key has changed meaning. Previously it held the **error description** text. It now holds the **page title**.
22+
23+
If you have overridden this key in your theme translations (`theme/{name}/translations/messages.*.php`), rename it to `error_invalid_acs_location_desc` and add a new `error_invalid_acs_location` entry for the page title.
24+
25+
**Before:**
26+
```php
27+
'error_invalid_acs_location' => 'Your custom description text.',
28+
```
29+
30+
**After:**
31+
```php
32+
'error_invalid_acs_location' => 'Error - Invalid ACS location',
33+
'error_invalid_acs_location_desc' => 'Your custom description text.',
34+
```
35+
36+
See https://github.com/OpenConext/OpenConext-engineblock/issues/1758
37+
38+
1839
## UNRELEASED 7.2.0
1940
Upgrade to Symfony 7.4
2041
Upgrade to `doctrine/dbal` 4

languages/messages.en.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -176,11 +176,10 @@
176176
'error_authorization_policy_violation_desc_no_name' => 'You cannot use this service because your %organisationNoun% limits access to this service (the "Service Provider") with an authorization policy. Please contact the helpdesk of your %organisationNoun% if you think you should be allowed access to this service.',
177177
'error_authorization_policy_violation_info' => 'Message from %idpName%: ',
178178
'error_authorization_policy_violation_info_no_idp_name' => 'Message from your %organisationNoun%: ',
179-
'error_no_message' => 'Error - No message received',
180-
'error_no_message_desc' => 'We were expecting a SAML message, but did not get one. Something went wrong. Please try again.',
181179
'error_unable_to_receive_message' => 'Error - No message received',
182180
'error_unable_to_receive_message_desc' => 'We were expecting a SAML message, but did not get one. Something went wrong. Please try again.',
183-
'error_invalid_acs_location' => 'The given "Assertion Consumer Service" is unknown or invalid.',
181+
'error_invalid_acs_location' => 'Error - Invalid ACS location',
182+
'error_invalid_acs_location_desc' => 'The given "Assertion Consumer Service" is unknown or invalid.',
184183
'error_invalid_acs_binding' => 'Error - Invalid ACS binding type',
185184
'error_invalid_acs_binding_desc' => 'The provided or configured "Assertion Consumer Service" Binding Type is unknown or invalid.',
186185
'error_unsupported_signature_method' => 'Error - Signature method is not supported',

languages/messages.nl.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -176,11 +176,10 @@
176176
'error_authorization_policy_violation_desc_no_name' => 'Neem contact op met de helpdesk van je eigen %organisationNoun% als je toegang tot deze dienst wilt. Vermeld daarbij op welke dienst je probeerde in te loggen en dat je werd tegengehouden door een autorisatieregel van %suiteName%, geconfigureerd door jouw eigen %organisationNoun%.',
177177
'error_authorization_policy_violation_info' => 'Bericht van %idpName%: ',
178178
'error_authorization_policy_violation_info_no_idp_name' => 'Bericht van je %organisationNoun%: ',
179-
'error_no_message' => 'Fout - Geen bericht ontvangen',
180-
'error_no_message_desc' => 'We verwachtten een SAML bericht, maar we hebben er geen ontvangen. Er is iets fout gegaan. Probeer het alstublieft opnieuw.',
181179
'error_unable_to_receive_message' => 'Fout - Geen bericht ontvangen',
182180
'error_unable_to_receive_message_desc' => 'We verwachtten een SAML bericht, maar we hebben er geen ontvangen. Er is iets fout gegaan. Probeer het alstublieft opnieuw.',
183-
'error_invalid_acs_location' => 'De opgegeven "Assertion Consumer Service" is onjuist of bestaat niet.',
181+
'error_invalid_acs_location' => 'Fout - Ongeldige ACS locatie',
182+
'error_invalid_acs_location_desc' => 'De opgegeven "Assertion Consumer Service" is onjuist of bestaat niet.',
184183
'error_invalid_acs_binding' => 'Fout - Onjuist ACS binding type',
185184
'error_invalid_acs_binding_desc' => 'Het opgegeven of geconfigureerde "Assertion Consumer Service" Binding Type is onjuist of bestaat niet.',
186185
'error_unsupported_signature_method' => 'Fout - Ondertekeningsmethode wordt niet ondersteund',

languages/messages.pt.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -174,11 +174,10 @@
174174
'error_authorization_policy_violation_desc_no_name' => 'Você autenticu-se com sucesso na sua %organisationNoun%, mas infelizmente você não pode utilizar este serviço (o "Fornecedor de Serviço") porque não tem acesso. A sua %organisationNoun% limita o acesso a este serviço com uma política de autorização. Entre em contacto com o suporte da sua %organisationNoun% se acha que deve ser-lhe concedido acesso ao serviço.',
175175
'error_authorization_policy_violation_info' => 'Mensagem da %idpName%: ',
176176
'error_authorization_policy_violation_info_no_idp_name' => 'Mensagem da sua %organisationNoun%: ',
177-
'error_no_message' => 'Erro - Não foi recebido nenhuma mensagem',
178-
'error_no_message_desc' => 'Estávamos a aguardar uma mensagem, mas não chegou nenhuma? Alguma coisa correu mal. Tente de novo por favor.',
179177
'error_unable_to_receive_message' => 'Erro - Não foi recebido nenhuma mensagem',
180178
'error_unable_to_receive_message_desc' => 'Estávamos a aguardar uma mensagem, mas não chegou nenhuma? Alguma coisa correu mal. Tente de novo por favor.',
181-
'error_invalid_acs_location' => 'O "Serviço de Consumidor de Asserção" fornecido é desconhecido ou inválido.',
179+
'error_invalid_acs_location' => 'Erro - Localização ACS inválida',
180+
'error_invalid_acs_location_desc' => 'O "Serviço de Consumidor de Asserção" fornecido é desconhecido ou inválido.',
182181
'error_invalid_acs_binding' => 'O ACS "Binding Type" é inválido',
183182
'error_invalid_acs_binding_desc' => 'O "Binding Type" do "Serviço de Consumidor de Asserção" fornecido ou configurado é desconhecido ou inválido.',
184183
'error_unsupported_signature_method' => 'O método de assinatura não é suportado',

src/OpenConext/EngineBlockBundle/Controller/FeedbackController.php

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,15 @@ public function __construct(
139139
],
140140
methods: ['GET']
141141
)]
142+
#[Route(
143+
path: '/authentication/feedback/invalidAcsLocation',
144+
name: 'authentication_feedback_invalid_acs_location',
145+
defaults: [
146+
'pageIdentifier' => 'invalid-acs-location',
147+
'statusCode' => 400
148+
],
149+
methods: ['GET']
150+
)]
142151
public function feedbackAction(string $pageIdentifier, int $statusCode): Response
143152
{
144153
return new Response(
@@ -166,14 +175,6 @@ public function noIdpsAction()
166175
return new Response($this->twig->render('@theme/Authentication/View/Feedback/no-idps.html.twig'));
167176
}
168177

169-
#[Route(path: '/authentication/feedback/invalidAcsLocation', name: 'authentication_feedback_invalid_acs_location', methods: ['GET'])]
170-
public function invalidAcsLocationAction()
171-
{
172-
return new Response(
173-
$this->twig->render('@theme/Authentication/View/Feedback/invalid-acs-location.html.twig'),
174-
400
175-
);
176-
}
177178

178179
#[Route(
179180
path: '/authentication/feedback/unsupportedSignatureMethod',

src/OpenConext/EngineBlockFunctionalTestingBundle/Features/FeedbackFooters.feature

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,10 @@ Feature:
6565
When I go to Engineblock URL "/authentication/feedback/stepup-callout-user-cancelled"
6666
Then I should see "Logging in cancelled"
6767

68+
Scenario: The invalid-acs-location feedback route renders correctly
69+
When I go to Engineblock URL "/authentication/feedback/invalidAcsLocation"
70+
Then I should see "Invalid ACS location"
71+
6872
Scenario: When a IdP specific error page is shown and a translation is not configured the support emailaddress of the IdP should be hidden
6973
Given The clock on the IdP "Dummy Idp" is ahead
7074
And I have configured the following translations:

theme/base/templates/modules/Authentication/View/Feedback/generic-error.html.twig

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44
# Possible translation keys: error_session_lost, error_session_not_started, error_unsolicited_response,
55
# error_invalid_acs_binding, error_received_error_status_code, error_unable_to_receive_message,
66
# error_unknown_requesterid_in_authnrequest, error_authentication_limit_exceeded,
7-
# error_stepup_callout_unknown, error_stepup_callout_user_cancelled
7+
# error_stepup_callout_unknown, error_stepup_callout_user_cancelled,
8+
# error_invalid_acs_location
89
#}
910
{% set _key = 'error_' ~ pageIdentifier|replace({'-': '_'}) %}
1011
{% set pageTitle = (_key)|trans %}

theme/base/templates/modules/Authentication/View/Feedback/invalid-acs-location.html.twig

Lines changed: 0 additions & 8 deletions
This file was deleted.

0 commit comments

Comments
 (0)