@univerjscoreclassesUsermanagerservice

@univerjs/core v0.5.0-beta.1Docs


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 UserManagerServicepackages/api/tmp/univer-pro/submodules/univer/packages/core/src/services/user-manager/user-manager.service.ts:33
userChange$publicObservable<{ type: "add" | "delete"; user: IUser; } | { type: "clear"; }>-packages/api/tmp/univer-pro/submodules/univer/packages/core/src/services/user-manager/user-manager.service.ts:27

Methods

addUser()

addUser<T>(user): void

Type Parameters

Type Parameter
T extends IUser

Parameters

ParameterType
userT

Returns

void

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/core/src/services/user-manager/user-manager.service.ts:43


clear()

clear(): void

Returns

void

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/core/src/services/user-manager/user-manager.service.ts:62


delete()

delete(userId): void

Parameters

ParameterType
userIdstring

Returns

void

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/core/src/services/user-manager/user-manager.service.ts:56


getCurrentUser()

getCurrentUser<T>(): T

Type Parameters

Type Parameter
T extends IUser

Returns

T

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/core/src/services/user-manager/user-manager.service.ts:34


getUser()

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

Type Parameters

Type Parameter
T extends IUser

Parameters

ParameterType
userIdstring
callBack?() => void

Returns

undefined | T

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/core/src/services/user-manager/user-manager.service.ts:48


list()

list(): IUser[]

Returns

IUser[]

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/core/src/services/user-manager/user-manager.service.ts:67


setCurrentUser()

setCurrentUser<T>(user): void

Type Parameters

Type Parameter
T extends IUser

Parameters

ParameterType
userT

Returns

void

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/core/src/services/user-manager/user-manager.service.ts:38