> ## Documentation Index
> Fetch the complete documentation index at: https://docs.kinetica.com/llms.txt
> Use this file to discover all available pages before exploring further.

# has_role

### has\_role

<ul>
  <li>
    has\_role(\
    &#x20;principal: string | undefined,\
    &#x20;role: string,\
    &#x20;options?: Record\<string, string>,\
    &#x20;callback?: [GPUdbCallback](https://docs.kinetica.com/content/api/javascript/types/GPUdbCallback.md),\
    ): Promise\<[HasRoleResponse](https://docs.kinetica.com/content/api/javascript/interfaces/HasRoleResponse.md)>

    Checks if the specified user has the specified role.

    #### Parameters

    <ul>
      <li>
        principal: string | undefined

        Name of the user for which role membership is being checked. Must be an existing user. If blank, will use the current user.
      </li>

      <li>
        role: string

        Name of role to check for membership.
      </li>

      <li>
        `Optional`options: Record\<string, string>

        Optional parameters.
      </li>

      <li>
        `Optional`callback: [GPUdbCallback](https://docs.kinetica.com/content/api/javascript/types/GPUdbCallback.md)

        Optional callback function
      </li>
    </ul>

    #### Returns Promise\<[HasRoleResponse](https://docs.kinetica.com/content/api/javascript/interfaces/HasRoleResponse.md)>

    Promise\<Types.HasRoleResponse> - Promise resolving to the response

    <ul>
      <li>Defined in [src/GPUdb.ts:11327](https://github.com/kineticadb/kinetica-api-typescript/blob/master/src/GPUdb.ts#L11327)</li>
    </ul>
  </li>
</ul>

### has\_role\_request

<ul>
  <li>
    has\_role\_request(\
    &#x20;request: [HasRoleRequest](https://docs.kinetica.com/content/api/javascript/interfaces/HasRoleRequest.md),\
    &#x20;callback?: [GPUdbCallback](https://docs.kinetica.com/content/api/javascript/types/GPUdbCallback.md),\
    ): Promise\<[HasRoleResponse](https://docs.kinetica.com/content/api/javascript/interfaces/HasRoleResponse.md)>

    Checks if the specified user has the specified role.

    #### Parameters

    <ul>
      <li>
        request: [HasRoleRequest](https://docs.kinetica.com/content/api/javascript/interfaces/HasRoleRequest.md)

        Request object containing the parameters for the operation
      </li>

      <li>
        `Optional`callback: [GPUdbCallback](https://docs.kinetica.com/content/api/javascript/types/GPUdbCallback.md)

        Optional callback function
      </li>
    </ul>

    #### Returns Promise\<[HasRoleResponse](https://docs.kinetica.com/content/api/javascript/interfaces/HasRoleResponse.md)>

    Promise\<Types.HasRoleResponse> - Promise resolving to the response

    <ul>
      <li>Defined in [src/GPUdb.ts:11302](https://github.com/kineticadb/kinetica-api-typescript/blob/master/src/GPUdb.ts#L11302)</li>
    </ul>
  </li>
</ul>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.