Example usage for com.liferay.portal.kernel.security.permission ActionKeys EXPORT_IMPORT_PORTLET_INFO

List of usage examples for com.liferay.portal.kernel.security.permission ActionKeys EXPORT_IMPORT_PORTLET_INFO

Introduction

In this page you can find the example usage for com.liferay.portal.kernel.security.permission ActionKeys EXPORT_IMPORT_PORTLET_INFO.

Prototype

String EXPORT_IMPORT_PORTLET_INFO

To view the source code for com.liferay.portal.kernel.security.permission ActionKeys EXPORT_IMPORT_PORTLET_INFO.

Click Source Link

Usage

From source file:com.liferay.exportimport.web.internal.portlet.configuration.icon.ExportImportPortletConfigurationIcon.java

License:Open Source License

@Override
public boolean isShow(PortletRequest portletRequest) {
    ThemeDisplay themeDisplay = (ThemeDisplay) portletRequest.getAttribute(WebKeys.THEME_DISPLAY);

    PortletDisplay portletDisplay = themeDisplay.getPortletDisplay();

    if (!portletDisplay.isShowExportImportIcon()) {
        return false;
    }/*www  . j  av a 2s. c  om*/

    try {
        return GroupPermissionUtil.contains(themeDisplay.getPermissionChecker(), themeDisplay.getScopeGroup(),
                ActionKeys.EXPORT_IMPORT_PORTLET_INFO);
    } catch (PortalException pe) {

        // LPS-52675

        if (_log.isDebugEnabled()) {
            _log.debug(pe, pe);
        }

        return false;
    }
}