Module org.elasticsearch.xcore
Interface ClusterPermission.PermissionCheck
- All Known Implementing Classes:
ClusterPermission.ActionBasedPermissionCheck
- Enclosing class:
ClusterPermission
public static interface ClusterPermission.PermissionCheck
Evaluates whether the cluster actions (optionally for a given request)
is permitted by this permission.
-
Method Summary
Modifier and TypeMethodDescriptionbooleancheck(String action, TransportRequest request, Authentication authentication) Checks permission to a cluster action for a given request in the context of given authentication.booleanimplies(ClusterPermission.PermissionCheck otherPermissionCheck) Checks whether specifiedClusterPermission.PermissionCheckis implied by thisClusterPermission.PermissionCheck.
This is important method to be considered during implementation as it comparesClusterPermission.PermissionChecks.
-
Method Details
-
check
Checks permission to a cluster action for a given request in the context of given authentication.- Parameters:
action- action namerequest-TransportRequestauthentication-Authentication- Returns:
trueif the specified action for given request is allowed else returnsfalse
-
implies
Checks whether specifiedClusterPermission.PermissionCheckis implied by thisClusterPermission.PermissionCheck.
This is important method to be considered during implementation as it comparesClusterPermission.PermissionChecks. IfpermissionCheck.implies(otherPermissionCheck), that means all the actions allowed byotherPermissionCheckare also allowed bypermissionCheck, irrespective of the request structure.- Parameters:
otherPermissionCheck-ClusterPermission.PermissionCheck- Returns:
trueif the specified permission is implied by thisClusterPermission.PermissionCheckelse returnsfalse
-