Skip to main content
.NET 6.0+

SecurityStrategy.IsGranted(IPermissionRequest, IPermissionPolicyUser) Method

Checks whether the specified operation is allowed for the target user.

Namespace: DevExpress.ExpressApp.Security

Assembly: DevExpress.ExpressApp.Security.v24.1.dll

Declaration

public virtual bool IsGranted(
    IPermissionRequest permissionRequest,
    IPermissionPolicyUser targetUser
)

Parameters

Name Type Description
permissionRequest IPermissionRequest

An IPermissionRequest object that specifies the secured operation.

targetUser IPermissionPolicyUser

The IPermissionPolicyUser object specifying the target user.

Returns

Type Description
Boolean

true, when the operation is allowed; otherwise, false.

Remarks

Tip

You can also use the IsGrantedExtensions class methods to check a user’s permissions. These methods do not require an IPermissionRequest object.

The passed Permission Request should have an appropriate Permission Request Processor registered within the Security Strategy. To register a Permission Request, handle the SecurityStrategy.CustomizeRequestProcessors event. Refer to the How to: Implement Custom Security Objects (Users, Roles, Operation Permissions) topic to see an example.

See Also