hasEntityPrivilege
Returns if the user has privilege for specific table.
Available for
Model-driven apps
Syntax
context.utils.hasEntityPrivilege(entityTypeName, privilegeType, privilegeDepth)
Parameters
Parameter Name | Type | Required | Description |
---|---|---|---|
entityTypeName | string |
Yes | Table type name |
privilegeType | enum |
No | Table privilege types. It has the following elements: - None = 0 - Create = 1 - Read = 2 - Write = 3 - Delete = 4 - Assign =5 - Share =6 - Append =7 - AppendTo =8 |
privilegeDepth | enum |
No | Table privilege depth. It has the following elements: - None = -1 - Basic = 0 - Local = 1 - Deep = 2 - Global = 3 |
Return Value
Type: boolean
Remarks
This function might return false if the table metadata isn't locally cached. To ensure the table metadata is available in the local cache, call and await on getEntityMetadata before calling hasEntityPrivilege
.
await context.utils.getEntityMetadata(entityTypeName);
context.utils.hasEntityPrivilege(entityTypeName, privilegeType, privilegeDepth);
Related articles
Utility
Power Apps component framework API reference
Power Apps component framework overview