Example usage for com.liferay.portal.kernel.service ResourcePermissionServiceUtil setIndividualResourcePermissions

List of usage examples for com.liferay.portal.kernel.service ResourcePermissionServiceUtil setIndividualResourcePermissions

Introduction

In this page you can find the example usage for com.liferay.portal.kernel.service ResourcePermissionServiceUtil setIndividualResourcePermissions.

Prototype

public static void setIndividualResourcePermissions(long groupId, long companyId, String name, String primKey,
        java.util.Map<Long, String[]> roleIdsToActionIds)
        throws com.liferay.portal.kernel.exception.PortalException 

Source Link

Document

Updates the role's permissions at the scope, setting the actions that can be performed on resources of the type.

Usage

From source file:com.liferay.exportimport.test.PermissionExportImportTest.java

License:Open Source License

protected void addPortletPermissions(Group exportGroup, Role role, String exportResourcePrimKey)
        throws Exception {

    Map<Long, String[]> roleIdsToActionIds = new HashMap<>();

    roleIdsToActionIds.put(role.getRoleId(), _ACTION_IDS);

    ResourcePermissionServiceUtil.setIndividualResourcePermissions(exportGroup.getGroupId(),
            TestPropsValues.getCompanyId(), _PORTLET_ID, exportResourcePrimKey, roleIdsToActionIds);
}