Skip to main content
All docs
V25.2
  • SecurityOptions.RoleType Property

    Specifies the permission role type.

    Namespace: DevExpress.ExpressApp.Security

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

    NuGet Package: DevExpress.ExpressApp.Security

    Declaration

    public Type RoleType { get; set; }

    Property Value

    Type Description
    Type

    The type of permission role.

    Remarks

    static IServiceCollection ConfigureSecurity(this IServiceCollection services) {
        services.PostConfigure<SecurityOptions>(options => {
            options.Lockout.Enabled = true;
            options.Lockout.MaxFailedAccessAttempts = 3;
            options.RoleType = typeof(PermissionPolicyRole);
            options.UserType = typeof(ApplicationUser);
            options.UserTokenType = typeof(UserToken);
            options.UserLoginInfoType = typeof(ApplicationUserLoginInfo);
            options.SupportNavigationPermissionsForTypes = false;
            options.Events.OnSecurityStrategyCreated += securityStrategy => {
                ((SecurityStrategy)securityStrategy).PermissionsReloadMode = PermissionsReloadMode.CacheOnFirstAccess;
            };
        });
    

    Refer to the MainDemo.NET.EFCore demo application for the full code example.

    The following code snippet (auto-collected from DevExpress Examples) contains a reference to the RoleType 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.

    See Also