Forums

Home » Liferay Portal » English » 3. Development

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Gurumurthy Godlaveeti
How to test permissions of a role
February 11, 2013 3:27 AM
Answer

Gurumurthy Godlaveeti

Rank: Regular Member

Posts: 209

Join Date: August 11, 2011

Recent Posts

Hello All,
I want to test whether role is having the permission to manage users of a particular organization or not? As per this , is there any code?
Rahul Pande
RE: How to test permissions of a role
February 11, 2013 3:51 AM
Answer

Rahul Pande

Rank: Expert

Posts: 308

Join Date: July 6, 2010

Recent Posts

Hi Gurumurthy,

You can use either of the following methods from UserGroupRoleLocalServiceUtil class for this

hasUserGroupRole( { userId } , { groupId of the organization } , { Role name });

hasUserGroupRole({ userId } , { groupId of the organization } , { Role id })

Thanks
Rahul