From f2bfee449e8d5592c3a708b7b37c11cbef11e2b7 Mon Sep 17 00:00:00 2001 From: raviks789 Date: Thu, 24 Oct 2024 13:40:12 +0200 Subject: [PATCH] Set empty state message for affected object list --- library/Icingadb/Widget/Detail/ObjectDetail.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/library/Icingadb/Widget/Detail/ObjectDetail.php b/library/Icingadb/Widget/Detail/ObjectDetail.php index 124b05d84..75d248000 100644 --- a/library/Icingadb/Widget/Detail/ObjectDetail.php +++ b/library/Icingadb/Widget/Detail/ObjectDetail.php @@ -704,7 +704,9 @@ protected function createAffectedObjects(): ?array return [ HtmlElement::create('h2', null, Text::create(t('Affected Objects'))), - new DependencyNodeList($affectedObjects) + (new DependencyNodeList($affectedObjects))->setEmptyStateMessage( + t('You are not authorized to view these objects.') + ) ]; } }