@univerjscoreclassesUsermanagerservice

@univerjs/core v0.5.4


Class: UserManagerService

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

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

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

Type Parameters

Type Parameter
T extends IUser

Parameters

ParameterType
userT

Returns

void


clear()

clear(): void

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

Returns

void


delete()

delete(userId): void

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

Parameters

ParameterType
userIdstring

Returns

void


getCurrentUser()

getCurrentUser<T>(): T

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

Type Parameters

Type Parameter
T extends IUser

Returns

T


getUser()

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

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

Type Parameters

Type Parameter
T extends IUser

Parameters

ParameterType
userIdstring
callBack?() => void

Returns

undefined | T


list()

list(): IUser[]

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

Returns

IUser[]


setCurrentUser()

setCurrentUser<T>(user): void

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

Type Parameters

Type Parameter
T extends IUser

Parameters

ParameterType
userT

Returns

void