expressappframework-devexpress-dot-expressapp-dot-securitysystem-dot-isgranted-x28-devexpress-dot-expressapp-dot-security-dot-ipermissionrequest-x29.md
Checks whether or not the current user is allowed to execute the specified secured operation.
Namespace : DevExpress.ExpressApp
Assembly : DevExpress.ExpressApp.v25.2.dll
NuGet Package : DevExpress.ExpressApp
public static bool IsGranted(
IPermissionRequest permissionRequest
)
Public Shared Function IsGranted(
permissionRequest As IPermissionRequest
) As Boolean
| Name | Type | Description |
|---|---|---|
| permissionRequest | IPermissionRequest |
An IPermissionRequest object that specifies the secured operation.
|
| Type | Description |
|---|---|
| Boolean |
true , if the user can execute the secured operation; otherwise - false.
|
You can also use the IsGrantedExtensions class methods to check if the current user is allowed to execute the specified secured operation. These methods do not require an IPermissionRequest object.
The following code snippets (auto-collected from DevExpress Examples) contain references to the IsGranted(IPermissionRequest) method.
Note
The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.
exportController.Active.SetItemValue("Security",
SecuritySystem.IsGranted(new ExportPermissionRequest(View.ObjectTypeInfo.Type)));
}
controller.Active.SetItemValue("Security",
SecuritySystem.IsGranted(new ExportPermissionRequest()));
}
If TypeOf SecuritySystem.Instance Is IRequestSecurity Then
exportController.Active.SetItemValue("Security", SecuritySystem.IsGranted(New ExportPermissionRequest(View.ObjectTypeInfo.Type)))
End If
If TypeOf SecuritySystem.Instance Is IRequestSecurity Then
controller.Active.SetItemValue("Security", SecuritySystem.IsGranted(New ExportPermissionRequest()))
End If
See Also