Open Document as specific User

Part of: Howto: Use Document Permissions

This step shows how the protected document is opened as a specific user with limited document access. Click on Open Document and choose the user from the drop-down box in the opened dialog:

Type in the user password and confirm with OK.

In this case, an editor form is opened with limited document permissions. In order to enable this user mode, the usernames can be passed to TextControl using the TextControl.UserNames property. When a document is set to read-only, all editable regions that are related to these users can be edited.

textControl1.UserNames = new string[] { m_username };
textControl1.EditMode = TXTextControl.EditMode.ReadAndSelect;
[Visual Basic]
textControl1.UserNames = New String() {m_username}
textControl1.EditMode = TXTextControl.EditMode.ReadAndSelect

The editor has been opened in a user mode for a specific user. The document itself is protected and editable regions are highlighted. The logged in user is able to navigate through associated editable regions. The content of those regions are editable while the rest of the document is read only.

When toggling the Enforce Protection toggle button, the user needs to type in the document master password. This master password can be used to unlock the document.