diff --git a/modules/dxp/apps/analytics/analytics-reports-web/src/main/java/com/liferay/analytics/reports/web/internal/product/navigation/control/menu/AnalyticsReportsProductNavigationControlMenuEntry.java b/modules/dxp/apps/analytics/analytics-reports-web/src/main/java/com/liferay/analytics/reports/web/internal/product/navigation/control/menu/AnalyticsReportsProductNavigationControlMenuEntry.java index b9ce9f521c7c44..c5120ef9c7a366 100644 --- a/modules/dxp/apps/analytics/analytics-reports-web/src/main/java/com/liferay/analytics/reports/web/internal/product/navigation/control/menu/AnalyticsReportsProductNavigationControlMenuEntry.java +++ b/modules/dxp/apps/analytics/analytics-reports-web/src/main/java/com/liferay/analytics/reports/web/internal/product/navigation/control/menu/AnalyticsReportsProductNavigationControlMenuEntry.java @@ -182,17 +182,6 @@ public boolean includeIcon( public boolean isShow(HttpServletRequest httpServletRequest) throws PortalException { - ThemeDisplay themeDisplay = - (ThemeDisplay)httpServletRequest.getAttribute( - WebKeys.THEME_DISPLAY); - - if (_hasResourcePermission( - ActionKeys.UPDATE, themeDisplay.getScopeGroupId(), - httpServletRequest.getParameter("p_l_id"), _resourceNames)) { - - return true; - } - InfoItemReference infoItemReference = _getInfoItemReference( httpServletRequest); @@ -220,8 +209,15 @@ public boolean isShow(HttpServletRequest httpServletRequest) _analyticsReportsInfoItemRegistry.getAnalyticsReportsInfoItem( infoItemReference.getClassName()); + ThemeDisplay themeDisplay = + (ThemeDisplay)httpServletRequest.getAttribute( + WebKeys.THEME_DISPLAY); + if ((analyticsReportsInfoItem == null) || - !analyticsReportsInfoItem.isShow(analyticsReportsInfoItemObject)) { + (!analyticsReportsInfoItem.isShow(analyticsReportsInfoItemObject) && + !_hasResourcePermission( + ActionKeys.UPDATE, httpServletRequest.getParameter("p_l_id"), + _resourceNames, themeDisplay))) { return false; }