Interface SharingPermissionChecker
public interface SharingPermissionChecker
Defines whether the user has permission to share a resource with another user
via
SharingEntryAction
s.
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 TypeMethodDescriptionboolean
hasPermission
(com.liferay.portal.kernel.security.permission.PermissionChecker permissionChecker, long classPK, long groupId, Collection<SharingEntryAction> sharingEntryActions) Returnstrue
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 Returnstrue
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 resourceclassPK
- the class primary key of the shared resourcegroupId
- the primary key of the shared resource's groupsharingEntryActions
- 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
-