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

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

Introduction

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

Prototype

String ADD_LAYOUT_SET_PROTOTYPE

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

Click Source Link

Usage

From source file:com.liferay.layout.set.prototype.web.internal.display.context.LayoutSetPrototypeDisplayContext.java

License:Open Source License

public boolean isShowAddButton() {
    ThemeDisplay themeDisplay = (ThemeDisplay) _request.getAttribute(WebKeys.THEME_DISPLAY);

    if (PortalPermissionUtil.contains(themeDisplay.getPermissionChecker(),
            ActionKeys.ADD_LAYOUT_SET_PROTOTYPE)) {

        return true;
    }/*from ww w.  j  a  v a2  s . co  m*/

    return false;
}

From source file:com.liferay.site.admin.web.internal.portlet.configuration.icon.ManageSiteTemplatesConfigurationIcon.java

License:Open Source License

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

    if (PortalPermissionUtil.contains(themeDisplay.getPermissionChecker(),
            ActionKeys.ADD_LAYOUT_SET_PROTOTYPE)) {

        return true;
    }/*from   w  w  w.ja va2s . co  m*/

    return false;
}