CurrentUser
Function Description
Current user information entity.
Parameter
| Parameter | Type |
|---|---|
| UseInfo | CurrentUserInfo |
| UserInfo | Dictionary<string,object> |
| UserExtensions | Dictionary<string,object> |
| AttributesFromApp | List<ExtendAttribute> |
| Roles | List<string> |
| Groups | List<string> |
Method
- GetInfo
Description
Obtain user attributes. Obtain from
UseInfofirst, and ifUseInfois null, obtain fromUserInfo.
Parameter
| Parameter | Type | Remarks |
|---|---|---|
| propertyName | string | Property name |
Return Value
object, system returnsnullif nothing obtained.
- HasRole
Description
Determine whether or not the current user has a certain role.
Parameter
| Parameter | Type | Remarks |
|---|---|---|
| role | string | Role name |
Return Value
bool
- InGroup
Description
Determine whether or not the current user belongs to a certain group.
Parameter
| Parameter | Type | Remarks |
|---|---|---|
| groupName | string | Group name |
Return Value
bool