List of usage examples for com.liferay.portal.kernel.service GroupLocalServiceUtil hasUserGroup
public static boolean hasUserGroup(long userId, long groupId)
From source file:com.liferay.site.admin.web.internal.display.context.SiteAdminDisplayContext.java
License:Open Source License
public boolean hasEditAssignmentsPermission(Group group, boolean organizationUser, boolean userGroupUser) throws PortalException { ThemeDisplay themeDisplay = (ThemeDisplay) _request.getAttribute(WebKeys.THEME_DISPLAY); User user = themeDisplay.getUser();// w w w . ja v a2 s . co m if (!group.isCompany() && !(organizationUser || userGroupUser) && ((group.getType() == GroupConstants.TYPE_SITE_OPEN) || (group.getType() == GroupConstants.TYPE_SITE_RESTRICTED)) && GroupLocalServiceUtil.hasUserGroup(user.getUserId(), group.getGroupId()) && !SiteMembershipPolicyUtil.isMembershipRequired(user.getUserId(), group.getGroupId())) { return true; } return false; }