List of usage examples for com.liferay.portal.kernel.security.permission PermissionChecker isGroupOwner
public boolean isGroupOwner(long groupId);
true if the user is the owner of the group. From source file:com.liferay.users.admin.web.internal.portlet.configuration.icon.AssignOrganizationRolesPortletConfigurationIcon.java
License:Open Source License
@Override public boolean isShow(PortletRequest portletRequest) { ThemeDisplay themeDisplay = (ThemeDisplay) portletRequest.getAttribute(WebKeys.THEME_DISPLAY); try {/*from w w w . j a v a 2 s .c om*/ PermissionChecker permissionChecker = themeDisplay.getPermissionChecker(); Organization organization = ActionUtil.getOrganization(portletRequest); long organizationGroupId = organization.getGroupId(); if (permissionChecker.isGroupOwner(organizationGroupId) || OrganizationPermissionUtil .contains(permissionChecker, organization, ActionKeys.ASSIGN_USER_ROLES)) { return true; } } catch (Exception e) { } return false; }