Back to Devexpress

SecurityStrategy.AdditionalSecuredTypes Field

expressappframework-devexpress-dot-expressapp-dot-security-dot-securitystrategy-119764e4.md

latest2.8 KB
Original Source

SecurityStrategy.AdditionalSecuredTypes Field

Specifies the list of additional types to be secured (for example, non-persistent object types).

Namespace : DevExpress.ExpressApp.Security

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

NuGet Package : DevExpress.ExpressApp.Security

Declaration

csharp
public static readonly IList<Type> AdditionalSecuredTypes
vb
Public Shared ReadOnly AdditionalSecuredTypes As IList(Of Type)

Field Value

TypeDescription
IList<Type>

A list of additional types to be secured (for example, non-persistent object types).

|

Remarks

The Security System allows you to configure Type Permissions for persistent types only. Non-persistent objects are not secured and users can access them. If you want to protect a non-persistent object type, add this type to the static SecurityStrategy.AdditionalSecuredTypes collection and configure a Type permission for this type.

The following examples show how to add the non-persistent MyClass type to the AdditionalSecuredTypes collection.

WinForms

csharp
using DevExpress.ExpressApp.Security;
// ...
public partial class MainDemoWinApplication : WinApplication {
    static MainDemoWinApplication() {
        SecurityStrategy.AdditionalSecuredTypes.Add(typeof(MyClass));
    }
    // ...
}

ASP.NET Core Blazor

csharp
using DevExpress.ExpressApp.Security;
// ...
public partial class MainDemoBlazorApplication : BlazorApplication {
    static MainDemoBlazorApplication() {
        SecurityStrategy.AdditionalSecuredTypes.Add(typeof(MyClass));
    }
    // ...
}

See Also

SecurityStrategy Class

SecurityStrategy Members

DevExpress.ExpressApp.Security Namespace