Back to Devexpress

IPermissionPolicyRole.CanEditModel Property

expressappframework-devexpress-dot-persistent-dot-base-dot-ipermissionpolicyrole-03dfef67.md

latest2.6 KB
Original Source

IPermissionPolicyRole.CanEditModel Property

Specifies whether users associated with the current role can use the Model Editor.

Namespace : DevExpress.Persistent.Base

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

NuGet Package : DevExpress.Persistent.Base

Declaration

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

Property Value

TypeDescription
Boolean

true , if users associated with the current role can use the Model Editor; otherwise - false.

|

Remarks

The EditModel action is available in the Tools ribbon page of the Windows Forms application’s root window when this property is set to true in one of the current user’s roles.

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

csharp
}
if(role.CanEditModel) {
    codeLines.Add($"role.CanEditModel = true;");

See Also

IPermissionPolicyRole Interface

IPermissionPolicyRole Members

DevExpress.Persistent.Base Namespace