@weaviate
    Preparing search index...

    Interface Users

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

    interface Users {
        assignRoles: (
            roleNames: string | string[],
            userId: string,
        ) => Promise<void>;
        db: DBUsers;
        getAssignedRoles: (userId: string) => Promise<Record<string, Role>>;
        getMyUser: () => Promise<User>;
        oidc: OIDCUsers;
        revokeRoles: (
            roleNames: string | string[],
            userId: string,
        ) => Promise<void>;
    }

    Hierarchy (View Summary)

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

    @deprecated: Use users.db.assignRoles or users.oidc.assignRoles instead.

    getAssignedRoles: (userId: string) => Promise<Record<string, Role>>

    Retrieve the roles assigned to a user.

    Type Declaration

      • (userId: string): Promise<Record<string, Role>>
      • Parameters

        • userId: string

          The ID of the user to retrieve the assigned roles for.

        Returns Promise<Record<string, Role>>

        A map of role names to their respective roles.

        @deprecated: Use users.db.getAssignedRoles or users.oidc.getAssignedRoles instead.

    getMyUser: () => Promise<User>

    Retrieve the information relevant to the currently authenticated user.

    Type Declaration

      • (): Promise<User>
      • Returns Promise<User>

        The user information.

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

    @deprecated: Use users.db.revokeRoles or users.oidc.revokeRoles instead.