掲示板

Roles for an user group

14年前 に Geetha Raj によって更新されました。

Roles for an user group

Junior Member 投稿: 28 参加年月日: 08/05/22 最新の投稿
Is there any way to determine the roles for a user group? Any help is appreciated.

Thanks
thumbnail
14年前 に Jonas Yuan によって更新されました。

RE: Roles for an user group

Liferay Master 投稿: 993 参加年月日: 07/04/27 最新の投稿
HI Geetha,

You can do it simply in Control Panel (UI):

assign a user group as a member of a role.

or check members, the user group should be a member of the role.

Hope that is helps,

Thanks

Jonas Yuan
Liferay Portal 5.2 Systems Development
Liferay Portal Enterprise Intranets
14年前 に Geetha Raj によって更新されました。

RE: Roles for an user group

Junior Member 投稿: 28 参加年月日: 08/05/22 最新の投稿
Thanks for your help, Jonas. I think I should have clarified that I need to determine it programmactically.
thumbnail
14年前 に Jonas Yuan によって更新されました。

RE: Roles for an user group

Liferay Master 投稿: 993 参加年月日: 07/04/27 最新の投稿
Hi Geetha,

No problem. You can use UserGroupRoleLocalServiceUtil, like


        public static boolean hasUserGroupRole(long userId, long groupId,
		java.lang.String roleName)
		throws com.liferay.portal.PortalException,
			com.liferay.portal.SystemException {
		return getService().hasUserGroupRole(userId, groupId, roleName);
	}


or

	public static java.util.List<com.liferay.portal.model.usergrouprole> getUserGroupRoles(
		int start, int end) throws com.liferay.portal.SystemException {
		return getService().getUserGroupRoles(start, end);
	}
</com.liferay.portal.model.usergrouprole>


Hope that it helps.

Jonas Yuan
Liferay Portal 5.2 Systems Development
Liferay Portal Enterprise Intranets
14年前 に Geetha Raj によって更新されました。

RE: Roles for an user group

Junior Member 投稿: 28 参加年月日: 08/05/22 最新の投稿
When I assign a user group as a member of a role, it puts an entry in the table group_roles. Using UserGroupLocalServiceUtil, I am unable to programmactically get back the role. I tried the method getGroupRole from GroupLocalServiceUtil but that doesn't work either. Please let me know if you have any other suggestions or thoughts.
thumbnail
14年前 に Auditya manikanta Vadrevu によって更新されました。

RE: Roles for an user group

Liferay Master 投稿: 621 参加年月日: 08/05/06 最新の投稿
hi geetha,


static Role getGroupRole(java.lang.String companyId, java.lang.String groupId)
, it is in RoleLocalServiceUtil , not in GroupLocalService.


With Regards,
V.Auditya