@@ -363,7 +363,13 @@ export default class AdminForthRestAPI implements IAdminForthRestAPI {
363363
364364 const announcementBadge : AnnouncementBadgeResponse = this . adminforth . config . customization . announcementBadge ?.( adminUser ) ;
365365
366-
366+ const settingPages = [ ]
367+ for ( const settingPage of this . adminforth . config . auth . userMenuSettingsPages || [ ] ) {
368+ if ( settingPage . isVisible ) {
369+ const isVisible = await settingPage . isVisible ( adminUser ) ;
370+ settingPages . push ( { ...settingPage , isVisible } ) ;
371+ }
372+ }
367373
368374 const publicPart = {
369375 brandName : this . adminforth . config . customization . brandName ,
@@ -378,7 +384,6 @@ export default class AdminForthRestAPI implements IAdminForthRestAPI {
378384 singleTheme : this . adminforth . config . customization . singleTheme ,
379385 customHeadItems : this . adminforth . config . customization . customHeadItems ,
380386 }
381-
382387 const loggedInPart = {
383388 showBrandNameInSidebar : this . adminforth . config . customization . showBrandNameInSidebar ,
384389 showBrandLogoInSidebar : this . adminforth . config . customization . showBrandLogoInSidebar ,
@@ -393,7 +398,7 @@ export default class AdminForthRestAPI implements IAdminForthRestAPI {
393398 announcementBadge,
394399 globalInjections : this . adminforth . config . customization . globalInjections ,
395400 userFullnameField : this . adminforth . config . auth . userFullNameField ,
396- settingPages : this . adminforth . config . auth . userMenuSettingsPages ,
401+ settingPages : settingPages ,
397402 }
398403
399404 // translate menu labels
0 commit comments