AccessSettings.SetRules(IAccessRule[]) Method
Sets resource access rules. Raises an exception if this method is called for the second time while the application is running.
Namespace: DevExpress.Security.Resources
Assembly: DevExpress.Data.v24.1.dll
NuGet Package: DevExpress.Data
Declaration
Parameters
Name | Type | Description |
---|---|---|
rules | IAccessRule[] | An array of access rules. |
Remarks
Before you set access rules, specify the resources for which these rules should be checked. To do this, use one of the following static properties:
The SetRules(IAccessRule[]) method can be called only once while the application is running. This allows rules to not be overridden. An attempt to call this method for the second time leads to an exception. So, call this method when your application starts to specify rules before a control (for example, Web End-User ReportDesigner) sets its rules. Alternatively, use the TrySetRules(IAccessRule[]) method. It does not raise an exception, but returns false if a control sets rules earlier.
Related GitHub Examples
The following code snippets (auto-collected from DevExpress Examples) contain references to the SetRules(IAccessRule[]) 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.