All docs
V20.2
20.2
20.1
19.2
19.1
The page you are viewing does not exist in version 19.1. This link will take you to the root page.
18.2
The page you are viewing does not exist in version 18.2. This link will take you to the root page.
18.1
The page you are viewing does not exist in version 18.1. This link will take you to the root page.
17.2
The page you are viewing does not exist in version 17.2. This link will take you to the root page.
.NET Framework 4.5.2+
.NET Framework 4.5.2+
.NET Standard 2.0+
.NET Core 3.0+

XafApplicationExtensions.GetSecurityStrategy(XafApplication) Method

Gets a SecurityStrategy instance of an application's Security System.

Namespace: DevExpress.ExpressApp.Security

Assembly: DevExpress.ExpressApp.Security.v20.2.dll

Declaration

public static SecurityStrategy GetSecurityStrategy(
    this XafApplication xafApplication
)
<ExtensionAttribute>
Public Shared Function GetSecurityStrategy(
    xafApplication As XafApplication
) As SecurityStrategy

Parameters

Name Type Description
xafApplication XafApplication

An XafApplication object that provides methods and properties to manage the current application.

Returns

Type Description
SecurityStrategy

A SecurityStrategy object that specifies an application's Security Strategy.

Remarks

The following example shows how to use this method.

using DevExpress.ExpressApp;
using DevExpress.ExpressApp.Security;
// ...
public class SecurityStrategyController : ViewController {
    protected override void OnActivated() {
        base.OnActivated();
        SecurityStrategy securityStrategy = Application.GetSecurityStrategy();
        // ...
    }
}

Refer to the IsGrantedExtensions class methods and How to: Show a List of Users Allowed to Read an Object topic for more examples.

See Also