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.v19.2.dll
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.