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 7, 2024
1 parent fa7b8d0 commit a248fc2
Showing 1 changed file with 8 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down Expand Up @@ -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;
}
Expand Down

0 comments on commit a248fc2

Please sign in to comment.