List of usage examples for com.liferay.portal.kernel.security.permission ActionKeys MANAGE_ARCHIVED_SETUPS
String MANAGE_ARCHIVED_SETUPS
To view the source code for com.liferay.portal.kernel.security.permission ActionKeys MANAGE_ARCHIVED_SETUPS.
Click Source Link
From source file:com.liferay.portlet.configuration.web.internal.portlet.configuration.icon.ConfigurationTemplatesPortletConfigurationIcon.java
License:Open Source License
@Override public boolean isShow(PortletRequest portletRequest) { ThemeDisplay themeDisplay = (ThemeDisplay) portletRequest.getAttribute(WebKeys.THEME_DISPLAY); PermissionChecker permissionChecker = themeDisplay.getPermissionChecker(); try {//from ww w.j a va2s.c om if (!GroupPermissionUtil.contains(permissionChecker, themeDisplay.getScopeGroupId(), ActionKeys.MANAGE_ARCHIVED_SETUPS)) { return false; } } catch (PortalException pe) { // LPS-52675 if (_log.isDebugEnabled()) { _log.debug(pe, pe); } return false; } WindowState windowState = portletRequest.getWindowState(); if (windowState.equals(LiferayWindowState.EXCLUSIVE)) { return false; } Layout layout = themeDisplay.getLayout(); if (layout.isTypeControlPanel()) { return false; } PortletDisplay portletDisplay = themeDisplay.getPortletDisplay(); return portletDisplay.isShowConfigurationIcon(); }