Skip to content

Commit

Permalink
LPD-2612 decrease the priority of checking resource permission
Browse files Browse the repository at this point in the history
  • Loading branch information
marcosapmf committed Jun 6, 2024
1 parent 3de30be commit 5a83b62
Showing 1 changed file with 8 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -181,17 +181,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);

Expand Down Expand Up @@ -219,8 +208,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;
}
Expand Down

0 comments on commit 5a83b62

Please sign in to comment.