public interface ShareManager
SharePermission
objects.Modifier and Type | Method and Description |
---|---|
void |
deletePermissions(SharedEntity entity)
Delete all permissions associated with an entity
|
void |
deleteSharePermissionsLike(SharePermission permission)
Deletes
SharePermission 's that have the same "shape" as the provided share permission. |
SharedEntity.SharePermissions |
getSharePermissions(SharedEntity entity)
Retrieve all
SharePermission instances associated with a passed in
SharedEntity |
boolean |
hasPermission(ApplicationUser user,
SharedEntity entity)
Deprecated.
since 5.0 please use
#isSharedWith(com.atlassian.crowd.embedded.api.User, SharedEntity)
to get the same logic. Permission checks should be done in the service layer according to this information. |
boolean |
isSharedWith(ApplicationUser user,
SharedEntity sharedEntity)
Whether this entity has been shared with the specified user.
|
SharedEntity.SharePermissions |
updateSharePermissions(SharedEntity entity)
Updates the
SharePermission associated with an entity. |
SharedEntity.SharePermissions getSharePermissions(SharedEntity entity)
SharePermission
instances associated with a passed in
SharedEntity
entity
- The entity that has permissions associated with itSharePermission
instances associated with the entity.void deletePermissions(SharedEntity entity)
entity
- The entity that will have all its permissions deletedSharedEntity.SharePermissions updateSharePermissions(SharedEntity entity)
SharePermission
associated with an entity. Looks after creation and updating of permissions.entity
- The entity that has permissions associated with itboolean isSharedWith(ApplicationUser user, SharedEntity sharedEntity)
user
- The user to check.sharedEntity
- The entity to check.@Deprecated boolean hasPermission(ApplicationUser user, SharedEntity entity)
#isSharedWith(com.atlassian.crowd.embedded.api.User, SharedEntity)
to get the same logic. Permission checks should be done in the service layer according to this information.SharedEntity
user
- The user to check permissions forentity
- The entity that has permissions associated with itvoid deleteSharePermissionsLike(SharePermission permission)
SharePermission
's that have the same "shape" as the provided share permission. It uses the type,
param1, and param2 to as the basis for deleting SharePermission's.permission
- a 'template' of the type of SharePermission you want to deleteIllegalArgumentException
- if you provide a null SharePermission or one that does not have a type and (param1 or param2).Copyright © 2002-2017 Atlassian. All Rights Reserved.