@weaviate
    Preparing search index...

    Interface UsersBase

    Operations supported for 'db', 'oidc', and legacy (non-namespaced) users. Use respective implementations in users.db and users.oidc, and users.

    interface UsersBase {
        assignRoles: (
            roleNames: string | string[],
            userId: string,
        ) => Promise<void>;
        revokeRoles: (
            roleNames: string | string[],
            userId: string,
        ) => Promise<void>;
    }

    Hierarchy (View Summary)

    Index
    assignRoles: (roleNames: string | string[], userId: string) => Promise<void>

    Assign roles to a user.

    Type Declaration

      • (roleNames: string | string[], userId: string): Promise<void>
      • Parameters

        • roleNames: string | string[]

          The name or names of the roles to assign.

        • userId: string

          The ID of the user to assign the roles to.

        Returns Promise<void>

        A promise that resolves when the roles are assigned.

    revokeRoles: (roleNames: string | string[], userId: string) => Promise<void>

    Revoke roles from a user.

    Type Declaration

      • (roleNames: string | string[], userId: string): Promise<void>
      • Parameters

        • roleNames: string | string[]

          The name or names of the roles to revoke.

        • userId: string

          The ID of the user to revoke the roles from.

        Returns Promise<void>

        A promise that resolves when the roles are revoked.