Options
All
  • Public
  • Public/Protected
  • All
Menu

Class UserService

Hierarchy

  • UserService

Index

Constructors

Methods

Constructors

constructor

Methods

add

  • add(username: string, password: password, admin: boolean, callback?: (error: Error | null, success?: boolean) => void): Promise<boolean>
  • Create a new user for Dicoogle.

    Parameters

    • username: string

      the new identifier of the user

    • password: password

      the new password

    • admin: boolean

      whether the account is an administrator

    • Optional callback: (error: Error | null, success?: boolean) => void
        • (error: Error | null, success?: boolean): void
        • Parameters

          • error: Error | null
          • Optional success: boolean

          Returns void

    Returns Promise<boolean>

list

  • list(callback?: (error: Error | null, users?: User[]) => void): Promise<User[]>
  • List all registered users.

    Parameters

    • Optional callback: (error: Error | null, users?: User[]) => void
        • (error: Error | null, users?: User[]): void
        • Parameters

          • error: Error | null
          • Optional users: User[]

          Returns void

    Returns Promise<User[]>

remove

  • remove(username: string, callback?: (error: Error | null, removed?: boolean) => void): Promise<boolean>
  • Remove an existing user from the platorm.

    Parameters

    • username: string

      the identifier of the user to remove

    • Optional callback: (error: Error | null, removed?: boolean) => void
        • (error: Error | null, removed?: boolean): void
        • Parameters

          • error: Error | null
          • Optional removed: boolean

          Returns void

    Returns Promise<boolean>

Generated using TypeDoc