Source
pub async fn has_role( &self, principal: String, role: String, ) -> Result<HasRoleResponse, KineticaError>
Check if user has specified role
Checks if the specified user has the specified role.
principal- Name of the user for which role membership is being checked. Must be an existing user. If blank, will use the current user.role- Name of role to check for membership.
Source
pub async fn has_role_with_opts( &self, principal: String, role: String, options: HasRoleRequestOptions, ) -> Result<HasRoleResponse, KineticaError>
Check if user has specified role
Checks if the specified user has the specified role.
principal- Name of the user for which role membership is being checked. Must be an existing user. If blank, will use the current user.role- Name of role to check for membership.options- The optional parameters; any left unset take the server’s defaults.
Source
pub async fn has_role_raw( &self, request: &HasRoleRequest, ) -> Result<HasRoleResponse, KineticaError>
Sends a pre-built HasRoleRequest to the /has/role endpoint.
Source
pub async fn has_role_from_url( &self, url: &str, request: &HasRoleRequest, ) -> Result<HasRoleResponse, KineticaError>
Sends a pre-built HasRoleRequest to a specific worker URL, bypassing HA head-node selection. Used for multi-head access.