Back to Devexpress

SecuritySystem.Instance Property

expressappframework-devexpress-dot-expressapp-dot-securitysystem-502bd933.md

latest4.5 KB
Original Source

SecuritySystem.Instance Property

Gets the instance of the Security Strategy.

Namespace : DevExpress.ExpressApp

Assembly : DevExpress.ExpressApp.v25.2.dll

NuGet Package : DevExpress.ExpressApp

Declaration

csharp
public static ISecurityStrategyBase Instance { get; }
vb
Public Shared ReadOnly Property Instance As ISecurityStrategyBase

Property Value

TypeDescription
ISecurityStrategyBase

An ISecurityStrategyBase object which is the Security Strategy used by the Security System.

|

The following code snippets (auto-collected from DevExpress Examples) contain references to the Instance property.

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.

xaf-how-to-use-data-from-security-in-criterion/CS/EF/CustomOperatorEF/CustomOperatorEF.Module/CurrentCompanyOidOperator.cs#L28

csharp
public object Evaluate(params object[] operands) {
    return CurrentOrgIdFunctionCore(SecuritySystem.Instance);
}

xaf-how-to-implement-a-custom-security-operation-that-can-be-permitted-at-the-type-level/CS/CustomSecurityOperation.Module/Controllers/SecuredExportController.cs#L16

csharp
exportController.ExportAction.Executing += ExportAction_Executing;
if(SecuritySystem.Instance is IRequestSecurity) {
    exportController.Active.SetItemValue("Security",

XAF-implement-custom-permission-role-and-user-objects/CS/SecuredExportExample.Module/Controllers/SecuredExportController.cs#L16

csharp
controller.ExportAction.Executing += ExportAction_Executing;
if(SecuritySystem.Instance is IRequestSecurity) {
    controller.Active.SetItemValue("Security",

xaf-how-to-implement-a-custom-security-operation-that-can-be-permitted-at-the-type-level/VB/CustomSecurityOperation.Module/Controllers/SecuredExportController.vb#L17

vb
AddHandler exportController.ExportAction.Executing, AddressOf ExportAction_Executing
If TypeOf SecuritySystem.Instance Is IRequestSecurity Then
    exportController.Active.SetItemValue("Security", SecuritySystem.IsGranted(New ExportPermissionRequest(View.ObjectTypeInfo.Type)))

XAF-implement-custom-permission-role-and-user-objects/VB/SecuredExportExample.Module/Controllers/SecuredExportController.vb#L18

vb
AddHandler controller.ExportAction.Executing, AddressOf ExportAction_Executing
If TypeOf SecuritySystem.Instance Is IRequestSecurity Then
    controller.Active.SetItemValue("Security", SecuritySystem.IsGranted(New ExportPermissionRequest()))

See Also

SecuritySystem Class

SecuritySystem Members

DevExpress.ExpressApp Namespace