public bool IsVisible(PortalSettings portalSettings, UserInfo user, MenuItem menuItem) { var visible = menuItem.Enabled && !(user.IsSuperUser && !menuItem.AllowHost) && MenuPermissionController.CanView(portalSettings.PortalId, menuItem); if (visible) { var menuController = GetMenuItemController(menuItem); visible = menuController == null || menuController.Visible(menuItem); } return(visible); }
public bool IsVisible(PortalSettings portalSettings, UserInfo user, MenuItem menuItem) { var visible = menuItem.Enabled && !(user.IsSuperUser && !menuItem.AllowHost) && MenuPermissionController.CanView(portalSettings.PortalId, menuItem); if (visible) { try { var menuController = this.GetMenuItemController(menuItem); visible = menuController == null || menuController.Visible(menuItem); } catch (Exception ex) { Logger.Error(ex); visible = false; } } return(visible); }