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

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

Introduction

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

Prototype

String MANAGE_TEAMS

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

Click Source Link

Usage

From source file:com.liferay.site.teams.web.internal.display.context.SiteTeamsDisplayContext.java

License:Open Source License

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

    if (GroupPermissionUtil.contains(themeDisplay.getPermissionChecker(), themeDisplay.getScopeGroup(),
            ActionKeys.MANAGE_TEAMS)) {

        return true;
    }/*w ww  . j av  a2  s. c  om*/

    return false;
}

From source file:com.liferay.site.teams.web.internal.portlet.SiteTeamsControlPanelEntry.java

License:Open Source License

@Override
protected boolean hasPermissionImplicitlyGranted(PermissionChecker permissionChecker, Group group,
        Portlet portlet) throws Exception {

    if (GroupPermissionUtil.contains(permissionChecker, group, ActionKeys.MANAGE_TEAMS)) {

        return true;
    }/*  ww w . jav a 2 s  .  co  m*/

    return super.hasPermissionImplicitlyGranted(permissionChecker, group, portlet);
}