From cf2fa7a518db264e60efdfecf06f1d8423e46b4a Mon Sep 17 00:00:00 2001 From: Michiel Kodde Date: Wed, 3 Jul 2024 08:34:45 +0200 Subject: [PATCH] Show the Type of service on the entity detail page --- .../Application/ViewObject/EntityDetail.php | 1 + .../DashboardBundle/Controller/EntityDetailController.php | 1 - .../DashboardBundle/Resources/translations/messages.en.yml | 1 + templates/EntityDetail/detail.html.twig | 4 ++++ 4 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/Surfnet/ServiceProviderDashboard/Application/ViewObject/EntityDetail.php b/src/Surfnet/ServiceProviderDashboard/Application/ViewObject/EntityDetail.php index b9eef1104..5ec3eea07 100644 --- a/src/Surfnet/ServiceProviderDashboard/Application/ViewObject/EntityDetail.php +++ b/src/Surfnet/ServiceProviderDashboard/Application/ViewObject/EntityDetail.php @@ -67,6 +67,7 @@ public function __construct( private readonly ?int $accessTokenValidity, private readonly ?bool $isPublicClient, private readonly ?array $resourceServers, + private readonly ?array $typeOfService, ) { } diff --git a/src/Surfnet/ServiceProviderDashboard/Infrastructure/DashboardBundle/Controller/EntityDetailController.php b/src/Surfnet/ServiceProviderDashboard/Infrastructure/DashboardBundle/Controller/EntityDetailController.php index 03fbe82d1..199275e61 100644 --- a/src/Surfnet/ServiceProviderDashboard/Infrastructure/DashboardBundle/Controller/EntityDetailController.php +++ b/src/Surfnet/ServiceProviderDashboard/Infrastructure/DashboardBundle/Controller/EntityDetailController.php @@ -20,7 +20,6 @@ use Surfnet\ServiceProviderDashboard\Application\Service\EntityServiceInterface; use Surfnet\ServiceProviderDashboard\Application\Factory\EntityDetailFactory; -use Surfnet\ServiceProviderDashboard\Domain\Entity\ManageEntity; use Surfnet\ServiceProviderDashboard\Infrastructure\DashboardBundle\Service\AuthorizationService; use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; use Symfony\Component\HttpFoundation\Response; diff --git a/src/Surfnet/ServiceProviderDashboard/Infrastructure/DashboardBundle/Resources/translations/messages.en.yml b/src/Surfnet/ServiceProviderDashboard/Infrastructure/DashboardBundle/Resources/translations/messages.en.yml index e952b5994..69311fa3a 100644 --- a/src/Surfnet/ServiceProviderDashboard/Infrastructure/DashboardBundle/Resources/translations/messages.en.yml +++ b/src/Surfnet/ServiceProviderDashboard/Infrastructure/DashboardBundle/Resources/translations/messages.en.yml @@ -57,6 +57,7 @@ entity: redirect_uris: Redirect URIs playground_enabled: Playground enabled? name_id_format: NameID format + type_of_service: Type of service subject_type: Subject type certificate: Certificate logo_url: Logo URL diff --git a/templates/EntityDetail/detail.html.twig b/templates/EntityDetail/detail.html.twig index 62f80a219..7b05d9c2e 100644 --- a/templates/EntityDetail/detail.html.twig +++ b/templates/EntityDetail/detail.html.twig @@ -23,6 +23,8 @@ {% if entity.protocol == "saml20" %} {% include '@Dashboard/EntityDetail/detailTextField.html.twig' with {label: 'entity.detail.metadata.entity_id'|trans, value: entity.entityId, informationPopup: 'entity.edit.information.entityId'} %} {% include '@Dashboard/EntityDetail/detailTextField.html.twig' with {label: 'entity.detail.metadata.name_id_format'|trans, value: entity.nameIdFormat|replace({'urn:oasis:names:tc:SAML:2.0:nameid-format:': ''}), informationPopup: 'entity.edit.information.nameIdFormat'} %} + {% include '@Dashboard/EntityDetail/detailListField.html.twig' with {label: 'entity.detail.metadata.type_of_service'|trans, value: entity.typeOfService, informationPopup: 'entity.edit.information.typeOfService'} %} + {% endif %} {% if entity.protocol == "oidcng" %} @@ -33,6 +35,8 @@ {% include '@Dashboard/EntityDetail/detailBooleanField.html.twig' with {label: 'entity.detail.metadata.playground_enabled'|trans, value: entity.playgroundEnabled, informationPopup: 'entity.edit.information.enablePlayground'} %} {% include '@Dashboard/EntityDetail/detailBooleanField.html.twig' with {label: 'entity.detail.metadata.is_public_client'|trans, value: entity.publicClient, informationPopup: 'entity.edit.information.isPublicClient'} %} {% include '@Dashboard/EntityDetail/detailTextField.html.twig' with {label: 'entity.detail.metadata.access_token_validity'|trans, value: entity.accessTokenValidity, informationPopup: 'entity.edit.information.accessTokenValidity'} %} + {% include '@Dashboard/EntityDetail/detailListField.html.twig' with {label: 'entity.detail.metadata.type_of_service'|trans, value: entity.typeOfService, informationPopup: 'entity.edit.information.typeOfService'} %} + {% endif %} {% if entity.protocol == "oauth20_rs" %}