Skip to main content
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.

Sends a pre-built HasRoleRequest to the /has/role endpoint.

Sends a pre-built HasRoleRequest to a specific worker URL, bypassing HA head-node selection. Used for multi-head access.