@univerjs/core v0.4.2 • 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 | submodules/univer/packages/core/src/services/user-manager/user-manager.service.ts:33 (opens in a new tab) |
userChange$ | public | Observable <{ 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
Parameter | Type |
---|---|
user | T |
Returns
void
Defined in
clear()
clear(): void
Returns
void
Defined in
delete()
delete(userId): void
Parameters
Parameter | Type |
---|---|
userId | string |
Returns
void
Defined in
getCurrentUser()
getCurrentUser<T>(): T
Type Parameters
Type Parameter |
---|
T extends IUser |
Returns
T
Defined in
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
list()
list(): IUser[]
Returns
IUser
[]
Defined in
setCurrentUser()
setCurrentUser<T>(user): void
Type Parameters
Type Parameter |
---|
T extends IUser |
Parameters
Parameter | Type |
---|---|
user | T |
Returns
void