Interface SharingPermissionChecker


public interface SharingPermissionChecker
Defines whether the user has permission to share a resource with another user via SharingEntryActions.

Implementations of this interface typically map the sharing entry actions with the resource actions, and delegate the permission check to the corresponding com.liferay.portal.kernel.security.permission.resource.ModelResourcePermission.

Implementations of this interface must be registered as OSGi components using the service SharingPermissionChecker. The model.class.name property defines the class name that the permission checker can handle.

  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    hasPermission(com.liferay.portal.kernel.security.permission.PermissionChecker permissionChecker, long classPK, long groupId, Collection<SharingEntryAction> sharingEntryActions)
    Returns true if the user has permission to share the resource with another user via sharing entry actions.
  • Method Details

    • hasPermission

      boolean hasPermission(com.liferay.portal.kernel.security.permission.PermissionChecker permissionChecker, long classPK, long groupId, Collection<SharingEntryAction> sharingEntryActions) throws com.liferay.portal.kernel.exception.PortalException
      Returns true if the user has permission to share the resource with another user via sharing entry actions.
      Parameters:
      permissionChecker - the permission checker of the user sharing the resource
      classPK - the class primary key of the shared resource
      groupId - the primary key of the shared resource's group
      sharingEntryActions - the collection of sharing entry actions to check for permission
      Returns:
      true if the user has permission to share the resource via sharing entry actions; false otherwise
      Throws:
      com.liferay.portal.kernel.exception.PortalException