Back to Devexpress

IPermissionPolicyRole.IsAdministrative Property

expressappframework-devexpress-dot-persistent-dot-base-dot-ipermissionpolicyrole-90bbb861.md

latest2.8 KB
Original Source

IPermissionPolicyRole.IsAdministrative Property

Specifies whether users associated with the current role are administrators.

Namespace : DevExpress.Persistent.Base

Assembly : DevExpress.Persistent.Base.v25.2.dll

NuGet Package : DevExpress.Persistent.Base

Declaration

csharp
bool IsAdministrative { get; set; }
vb
Property IsAdministrative As Boolean

Property Value

TypeDescription
Boolean

true, if users associated with the current role are administrators; otherwise - false.

|

Remarks

When the IsAdministrative option is set to true, it overrides all other permissions (both built-in and custom) and grants full access to all operations.

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the IsAdministrative 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-get-role-code-from-the-UI/CS/EFCore/GenerateRoleEF/RoleGenerator/RoleGenerator.cs#L107

csharp
codeLines.Add($"role.PermissionPolicy = SecurityPermissionPolicy.{role.PermissionPolicy.ToString()};");
if(role.IsAdministrative) {
    codeLines.Add($"role.IsAdministrative = true;");

See Also

2-Tier Security (Integrated Mode and UI Level)

Implement Custom Security Objects (Users, Roles, Operation Permissions)

IPermissionPolicyRole Interface

IPermissionPolicyRole Members

DevExpress.Persistent.Base Namespace