Back to Devexpress

AccessSettings.DataResources Property

corelibraries-devexpress-dot-security-dot-resources-dot-accesssettings.md

latest3.1 KB
Original Source

AccessSettings.DataResources Property

Provides access to the AccessSettings class’s instance that allows you to specify data resource access settings.

Namespace : DevExpress.Security.Resources

Assembly : DevExpress.Data.v25.2.dll

NuGet Package : DevExpress.Data

Declaration

csharp
public static AccessSettings DataResources { get; }
vb
Public Shared ReadOnly Property DataResources As AccessSettings

Property Value

TypeDescription
AccessSettings

The object that allows you to set access rules to data resources.

|

Property Paths

You can access this nested property as listed below:

Object TypePath to DataResources
AccessSettings

.DataResources .DataResources

| | AccessSettings |

.ReportingSpecificResources .DataResources

| | AccessSettings |

.StaticResources .DataResources

|

Remarks

Data resources include: JSON, Extract, and Excel data sources.

Use the SetRules(IAccessRule[]) method of the object that this property returns to specify data resource access rules.

csharp
// Allow JSON data load only from the "http://mysite.dev" URL
// Prohibit Excel data load (Excel data load from URLs is not supported)
DevExpress.Security.Resources.AccessSettings.DataResources.SetRules(UrlAccessRule.Allow("http://mysite.dev"), DirectoryAccessRule.Deny());
vb
' Allow JSON data load only from the "http://mysite.dev" URL
' Prohibit Excel data load (Excel data load from URLs is not supported)
DevExpress.Security.Resources.AccessSettings.DataResources.SetRules(UrlAccessRule.Allow("http://mysite.dev"), DirectoryAccessRule.Deny())

See Also

AccessSettings Class

AccessSettings Members

DevExpress.Security.Resources Namespace