@@ -267,25 +267,38 @@ private function init(bool $resolveClosures = true): void {
267267 'name ' => $ l ->t ('Apps ' ),
268268 ]);
269269
270- // Personal settings
271- $ this ->add ([
272- 'type ' => 'settings ' ,
273- 'id ' => 'settings ' ,
274- 'order ' => 3 ,
275- 'href ' => $ this ->urlGenerator ->linkToRoute ('settings.PersonalSettings.index ' ),
276- 'name ' => $ l ->t ('Personal settings ' ),
277- 'icon ' => $ this ->urlGenerator ->imagePath ('settings ' , 'personal.svg ' ),
278- ]);
279-
280- // Admin settings
281- $ this ->add ([
282- 'type ' => 'settings ' ,
283- 'id ' => 'admin_settings ' ,
284- 'order ' => 4 ,
285- 'href ' => $ this ->urlGenerator ->linkToRoute ('settings.AdminSettings.index ' , ['section ' => 'overview ' ]),
286- 'name ' => $ l ->t ('Administration settings ' ),
287- 'icon ' => $ this ->urlGenerator ->imagePath ('settings ' , 'admin.svg ' ),
288- ]);
270+ $ hasDelegatedSettings = $ this ->config ->getSystemValueBool ('settings.only-delegated-settings ' );
271+
272+ if ($ hasDelegatedSettings ) {
273+ $ this ->add ([
274+ 'type ' => 'settings ' ,
275+ 'id ' => 'settings ' ,
276+ 'order ' => 3 ,
277+ 'href ' => $ this ->urlGenerator ->linkToRoute ('settings.PersonalSettings.index ' ),
278+ 'name ' => $ l ->t ('Settings ' ),
279+ 'icon ' => $ this ->urlGenerator ->imagePath ('settings ' , 'admin.svg ' ),
280+ ]);
281+ } else {
282+ // Personal settings
283+ $ this ->add ([
284+ 'type ' => 'settings ' ,
285+ 'id ' => 'settings ' ,
286+ 'order ' => 3 ,
287+ 'href ' => $ this ->urlGenerator ->linkToRoute ('settings.PersonalSettings.index ' ),
288+ 'name ' => $ l ->t ('Personal settings ' ),
289+ 'icon ' => $ this ->urlGenerator ->imagePath ('settings ' , 'personal.svg ' ),
290+ ]);
291+
292+ // Admin settings
293+ $ this ->add ([
294+ 'type ' => 'settings ' ,
295+ 'id ' => 'admin_settings ' ,
296+ 'order ' => 4 ,
297+ 'href ' => $ this ->urlGenerator ->linkToRoute ('settings.AdminSettings.index ' , ['section ' => 'overview ' ]),
298+ 'name ' => $ l ->t ('Administration settings ' ),
299+ 'icon ' => $ this ->urlGenerator ->imagePath ('settings ' , 'admin.svg ' ),
300+ ]);
301+ }
289302 } else {
290303 // Personal settings
291304 $ this ->add ([
0 commit comments