The editing restrictions can be used with a set of users or groups. When document protection is enforced, each user will be able to edit only the parts of the document he/she has rights for and the parts that are editable by the group he/she belongs to.

The PermissionInfo class allows you to create permission objects, which later can be assigned to instances of the UserInfo class through the Group property. The permission type could be declared as Everyone, Group or Individual using the values of the PermissionType enumeration.

The users that will be able to edit the document and the groups they are in can be declared like this:

The current user of the document is set using the CurrentUser property of the editor. It is of type UserInfo - here in addition to the name, e-mail and user name of the user, the group that the user belongs to can also be passed.

When document protection is enforced, the current user can modify the rights for editing the part of the document that he/she is entitled to editing. When the protection is disabled, the editing rights for the document can be freely modified by all users.

The protection of the document can be turned on and off using the ToggleDocumentProtectionCommand command of RadRichTextBox.

The command opens a dialog that allows you to enter a password. By clicking OK, the document protection starts to be enforced. You can use the command by binding a button to it:

DocumentProtection regions can be most easily created and modified through the ChangeEditingPermissionsDialog which can be invoked through the ShowChangeEditingPermissionsDialogCommand of RadRichTextBox. They can also be edited in code-behind, using the API of RadRichTextBox and RadDocument.