Forums

Home » Liferay Portal » English » Liferay Legacy

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Gary Murray
Obtain the user permissions
October 17, 2007 7:59 AM
Answer

Gary Murray

Rank: New Member

Posts: 18

Join Date: October 17, 2007

Recent Posts

Hi all,
I am using liferay 4.2, and I want to alter users permissions on authentication point in the application.

I have noticed that in PermissionLocalServiceUtil.java there is a method to get them ... getUserPermissions(java.lang.String userId, java.lang.String resourceId).

Thus to get the resource id , what must i do?

Alternatively I noticed another method in UserLocalServiceUtil.java ..

getPermissionUsers(java.lang.String companyId, java.lang.String groupId, java.lang.String name, java.lang.String primKey, java.lang.String actionId, java.lang.String firstName, java.lang.String middleName, java.lang.String lastName, java.lang.String emailAddress, boolean andOperator, int begin, int end)


Would this be a better port of call to get all permission associated with a user?? and if some where can i find more
info on parameters I need to pass.


Regards

Gary
Roman Hoyenko
RE: Obtain the user permissions
October 18, 2007 11:50 AM
Answer

Roman Hoyenko

Rank: Liferay Master

Posts: 868

Join Date: October 8, 2007

Recent Posts

Do you want to administer your permissions based on resources?

I think the better way is to create user groups and roles and when you Authenticate add users to correct groups. That is what we do in our app - we synchronize LDAP groups, but we assign roles in Liferay using their GUI.