Module org.elasticsearch.xcore
Class HasPrivilegesRequest
java.lang.Object
org.elasticsearch.transport.TransportMessage
org.elasticsearch.transport.TransportRequest
org.elasticsearch.action.ActionRequest
org.elasticsearch.xpack.core.security.action.user.HasPrivilegesRequest
- All Implemented Interfaces:
Writeable,org.elasticsearch.core.RefCounted,TaskAwareRequest,UserRequest
A request for checking a user's privileges
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable
Writeable.Reader<V>, Writeable.Writer<V> -
Field Summary
Fields inherited from interface org.elasticsearch.core.RefCounted
ALWAYS_REFERENCED -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidapplicationPrivileges(RoleDescriptor.ApplicationResourcePrivileges... appPrivileges) String[]voidclusterPrivileges(String... privileges) voidindexPrivileges(RoleDescriptor.IndicesPrivileges... privileges) voidprivilegesToCheck(AuthorizationEngine.PrivilegesToCheck privilegesToCheck) username()voidSet the username that the request applies to.String[]Accessor for the usernames that this request pertains to.validate()voidwriteTo(StreamOutput out) Methods inherited from class org.elasticsearch.action.ActionRequest
getShouldStoreResultMethods inherited from class org.elasticsearch.transport.TransportRequest
getParentTask, getRequestId, setParentTask, setRequestId, toStringMethods inherited from class org.elasticsearch.transport.TransportMessage
decRef, hasReferences, incRef, remoteAddress, remoteAddress, tryIncRefMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.elasticsearch.core.RefCounted
mustIncRefMethods inherited from interface org.elasticsearch.tasks.TaskAwareRequest
createTask, getDescription, setParentTask
-
Constructor Details
-
HasPrivilegesRequest
public HasPrivilegesRequest() -
HasPrivilegesRequest
- Throws:
IOException
-
-
Method Details
-
getPrivilegesToCheck
-
validate
- Specified by:
validatein classActionRequest
-
username
- Returns:
- the username that this request applies to.
-
username
Set the username that the request applies to. Must not benull -
usernames
Description copied from interface:UserRequestAccessor for the usernames that this request pertains to.nullshould never be returned!- Specified by:
usernamesin interfaceUserRequest
-
indexPrivileges
-
clusterPrivileges
-
applicationPrivileges
-
indexPrivileges
-
clusterPrivileges
-
applicationPrivileges
-
privilegesToCheck
-
writeTo
- Specified by:
writeToin interfaceWriteable- Overrides:
writeToin classActionRequest- Throws:
IOException
-