API Reference
@univerjs
@univerjs/core
classes
Usermanagerservice

@univerjs/core v0.4.2Docs


Class: UserManagerService

Constructors

new UserManagerService()

new UserManagerService(): UserManagerService

Returns

UserManagerService

Properties

PropertyModifierTypeDescriptionDefined in
currentUser$publicObservable<IUser>When the current user undergoes a switch or change Memberof UserManagerServicesubmodules/univer/packages/core/src/services/user-manager/user-manager.service.ts:33 (opens in a new tab)
userChange$publicObservable<{ type: "add" | "delete"; user: IUser; } | { type: "clear"; }>-submodules/univer/packages/core/src/services/user-manager/user-manager.service.ts:27 (opens in a new tab)

Methods

addUser()

addUser<T>(user): void

Type Parameters

Type Parameter
T extends IUser

Parameters

ParameterType
userT

Returns

void

Defined in

submodules/univer/packages/core/src/services/user-manager/user-manager.service.ts:43 (opens in a new tab)


clear()

clear(): void

Returns

void

Defined in

submodules/univer/packages/core/src/services/user-manager/user-manager.service.ts:62 (opens in a new tab)


delete()

delete(userId): void

Parameters

ParameterType
userIdstring

Returns

void

Defined in

submodules/univer/packages/core/src/services/user-manager/user-manager.service.ts:56 (opens in a new tab)


getCurrentUser()

getCurrentUser<T>(): T

Type Parameters

Type Parameter
T extends IUser

Returns

T

Defined in

submodules/univer/packages/core/src/services/user-manager/user-manager.service.ts:34 (opens in a new tab)


getUser()

getUser<T>(userId, callBack?): undefined | T

Type Parameters

Type Parameter
T extends IUser

Parameters

ParameterType
userIdstring
callBack?() => void

Returns

undefined | T

Defined in

submodules/univer/packages/core/src/services/user-manager/user-manager.service.ts:48 (opens in a new tab)


list()

list(): IUser[]

Returns

IUser[]

Defined in

submodules/univer/packages/core/src/services/user-manager/user-manager.service.ts:67 (opens in a new tab)


setCurrentUser()

setCurrentUser<T>(user): void

Type Parameters

Type Parameter
T extends IUser

Parameters

ParameterType
userT

Returns

void

Defined in

submodules/univer/packages/core/src/services/user-manager/user-manager.service.ts:38 (opens in a new tab)


Copyright © 2021-2024 DreamNum Co,Ltd. All Rights Reserved.