A newer version of this page is available. Switch to the current version.

CustomAccessRule Class

A rule that uses a custom logic to determine whether to allow or deny access to a URL/file directory.

Namespace: DevExpress.Security.Resources

Assembly: DevExpress.Data.v19.1.dll

Declaration

public sealed class CustomAccessRule :
    UriAccessRule

Remarks

Create an instance of the CustomAccessRule and handle its CheckUri event to specify whether to allow or deny access to requested URLs or file directories. Use the SetRules(IAccessRule[]) method to register your custom rule.

CustomAccessRule customRule = new CustomAccessRule(AccessPermission.Allow);
customRule.CheckUri += uri => {
    // implement your logic here
    return true;
};

AccessSettings.StaticResources.SetRules(customRule);

Inheritance

Object
UriAccessRule
CustomAccessRule
See Also