留言板

Issue With Liferay API Permission

Manoj GT,修改在10 年前。

Issue With Liferay API Permission

Junior Member 帖子: 26 加入日期: 12-4-6 最近的帖子
Hi,

Basically I want to create user or role or user group using liferay API methods even though the user is not having actual right for the same. I have create the portlet and its working for admin user since he already have all the rights to do the same. But when i try the same portlet using normal user I am getting the below exception, since the user don't have right for doing the operation.

com.liferay.portal.security.auth.PrincipalException
at com.liferay.portal.service.permission.UserGroupPermissionImpl.check(UserGroupPermissionImpl.java:32)
at com.liferay.portal.service.permission.UserGroupPermissionUtil.check(UserGroupPermissionUtil.java:30)
at com.liferay.portal.service.impl.UserServiceImpl.unsetUserGroupUsers(UserServiceImpl.java:1028)

I am using RoleLocalServiceUtil, UserLocalServiceUtil,UserGroupLocalServiceUtil, ResourcePermissionLocalServiceUtil.

Can someone suggest me what can be done to overcome this issue ?

Regards,
Manoj-GT
Manoj GT,修改在10 年前。

RE: Issue With Liferay API Permission (答复)

Junior Member 帖子: 26 加入日期: 12-4-6 最近的帖子
Hi the issue is resolved. My bad. In one of the place I have used UserServiceUtil instead if using UserLocalServiceUtil.

Regards,
Manoj-GT