How to clone/copy permission system of role to another role?
java.util.List<com.liferay.portal.model.ResourcePermission> resourcePermissionList= ResourcePermissionLocalServiceUtil. getRoleResourcePermissions( long roleId); Use above method and pass role and get all ResourcePermission objects. for(int i=0;i< resourcePermissionList.size();i++){ ResourcePermissionLocalServiceUtil. addResourcePermission ( resourcePermissionList.get(i).setRoleId(newRoleId)); } |
0 comments:
Post a Comment