In R6, if an editable rich text field contains an attachment, while the document is in read mode, the user who has author access rights or higher may right click the attachment and select to "Edit" or "Delete" the attachment. These actions will even turn the document into Edit mode without triggering mode change events. For certain applications, this behavior is not acceptable. There are two workarounds for this:
- Use "Secure Access Section" to include the editable rich text field. The user who does not have Edit rights to the section will see the section as a "Reader" would.Then the "Edit' and "Delete" options for the attachment will be disabled for them.
- Use two sub-forms for a rich text field; one has a computed rich text field and the other an editable rich text field. The computed rich text field should be shown to users who can only read the attachment, because the "Edit" and "Delete" actions will be disabled.
For documents that need to dynamically change access rights or load a different sub-form, put code in events (such as PostModeChange) to make the document close and re-open immediately.
Do you have comments on this tip? Let us know.
This tip was submitted to the SearchDomino.com tip exchange by member Leo Dai. Please let others know how useful it is via the rating scale below. Do you have a useful Notes/Domino tip or code to share? Submit it to our monthly tip contest and you could win a prize and a spot in our Hall of Fame.