expressappframework-402547-data-security-and-safety-security-system-authorization-and-data-protection-prevent-deletion-and-update-of-administrative-users-and-roles.md
This topic explains how to create Validation and Conditional Appearance Rules to prevent users from deleting and updating administrative user and role objects. These rules affect all users including administrative users.
This help topic uses the ApplicationUser class generated by the Template Kit as well as the EF Core-based PermissionPolicyRole class. In applications based on XPO, use the PermissionPolicyRole class from the DevExpress.Persistent.BaseImpl.PermissionPolicy namespace.
The following image shows the result:
Add the Conditional Appearance Module to the platform-agnostic Module (MySolution.Module).
Open the Model Editor and navigate to the Application | BOModel | MySolution.Module.BusinessObjects | ApplicationUser | AppearanceRules node. Right-click this node and add the following rule that disables editors in the Detail View of the “Admin“ User:
Open the Model Editor and navigate to the Application | BOModel | DevExpress.Persistent.BaseImpl.EF.PermissionPolicy | PermissionPolicyRole | AppearanceRules node. Right-click this node and add the following rule that disables editors in the Detail View of the “Administrators“ Role:
The following image shows the result:
Footnotes