AccessSettings.TrySetRules(IAccessRule[]) Method
Sets resource access rules.
Namespace: DevExpress.Security.Resources
Assembly: DevExpress.Data.v19.1.dll
Declaration
Parameters
Name | Type | Description |
---|---|---|
rules | IAccessRule[] | An array of access rules. |
Returns
Type | Description |
---|---|
Boolean | true, if the specified rule collection is registered successfully. Otherwise, false. |
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 TrySetRules(IAccessRules[]) method can be called only once during the application run. This allows rules not to be overridden. So, call this method when the application starts to specify rules before a control (for example, Web End-User ReportDesigner) sets its rules. Otherwise, the TrySetRules(IAccessRules[]) method does not register the specified rule collection and returns false.
You can use the SetRules(IAccessRule[]) method to set access rules. This method raises an exception if a control sets its rules earlier.