@univerjs/core v0.5.0-beta.1 • Docs
Class: UserManagerService
Constructors
new UserManagerService()
new UserManagerService(): UserManagerService
Returns
Properties
Property | Modifier | Type | Description | Defined in |
---|---|---|---|---|
currentUser$ | public | Observable <IUser > | When the current user undergoes a switch or change Memberof UserManagerService | packages/api/tmp/univer-pro/submodules/univer/packages/core/src/services/user-manager/user-manager.service.ts:33 |
userChange$ | public | Observable <{ 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
Parameter | Type |
---|---|
user | T |
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
Parameter | Type |
---|---|
userId | string |
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
Parameter | Type |
---|---|
userId | string |
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
Parameter | Type |
---|---|
user | T |
Returns
void
Defined in
packages/api/tmp/univer-pro/submodules/univer/packages/core/src/services/user-manager/user-manager.service.ts:38