From 33577b3120945949c6cc1660621c1a5e72eb9bc5 Mon Sep 17 00:00:00 2001 From: "Misha M.-Kupriyanov" Date: Wed, 1 Oct 2025 11:52:00 +0200 Subject: [PATCH 1/2] feat(admin-delegation-show): add priority to json output in order to be able to better understand priority sorting. php occ admin-delegation:show --output=json_pretty Signed-off-by: Misha M.-Kupriyanov --- apps/settings/lib/Command/AdminDelegation/Show.php | 1 + 1 file changed, 1 insertion(+) diff --git a/apps/settings/lib/Command/AdminDelegation/Show.php b/apps/settings/lib/Command/AdminDelegation/Show.php index 352c2ab7fe9b5..5e59308521d9f 100644 --- a/apps/settings/lib/Command/AdminDelegation/Show.php +++ b/apps/settings/lib/Command/AdminDelegation/Show.php @@ -112,6 +112,7 @@ private function formatSettingsData(array $settings): array { return [ 'name' => $setting->getName() ?: 'Global', 'className' => $className, + 'priority' => $setting->getPriority(), 'delegatedGroups' => $groups, ]; }, $settings); From b0ed8b145581e1b245d7deedf03dfde437e1fd21 Mon Sep 17 00:00:00 2001 From: "Misha M.-Kupriyanov" Date: Wed, 1 Oct 2025 11:57:09 +0200 Subject: [PATCH 2/2] fix(admin-delegation-show): show delegations for all priorities otherwise delegation only from the first priority array ara shown Signed-off-by: Misha M.-Kupriyanov --- apps/settings/lib/Command/AdminDelegation/Show.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/settings/lib/Command/AdminDelegation/Show.php b/apps/settings/lib/Command/AdminDelegation/Show.php index 5e59308521d9f..6095964c5eee3 100644 --- a/apps/settings/lib/Command/AdminDelegation/Show.php +++ b/apps/settings/lib/Command/AdminDelegation/Show.php @@ -156,6 +156,6 @@ private function validateOutputFormat(string $format): bool { * @param array $innerSection */ private function getDelegatedSettings(array $settings, array $innerSection): array { - return $settings + array_filter($innerSection, fn (ISettings $setting) => $setting instanceof IDelegatedSettings); + return array_merge($settings, array_filter($innerSection, fn (ISettings $setting) => $setting instanceof IDelegatedSettings)); } }