Managing Access to Forms and Documents

There are numerous techniques to control access to a form. Access can be managed through the security settings located on the Form properties dialog. This approach restricts who can create new documents using the form. Access is granted based on the person, group, or role at the overall form level. (Refer to "Managing Access to Views" earlier in this chapter for additional information.)

Alternatively, access can be managed through the document. Using this approach, access is granted based on the content of the document, as opposed to the overall form design. Here, access is managed through fields on the form, which arbitrarily may be called Readers, DocReaders, Authors, or DocAuthors.

Using these fields, you can manage access to the database at the individual document level. One or both fields can be included in the form design. The Readers field determines who can see the document in the view, whereas the Authors field determines who is authorized to make changes to the view.

Note

The Readers and Authors fields refine the ACL permissions associated with the person. For instance, if a person has been granted "Author" authority in the database ACL but is not included in the Authors field, they will not be able to modify the document.


Tip

If the Readers field has been implemented and the user makes a new copy or replica of the database, only those documents that the user has authority to access will be migrated to the database replica or copy.


Warning

If the document includes one or more Readers fields and these fields are blank, then no one will be able to see the documents, which can present a significant challenge to resolve.


Restrict Visibility of a Document

Perform the following steps to restrict the ability to view a document.

Step 1.

Open the database using the Domino Designer client. Next, create or edit an existing form in the database.

Step 2.

To restrict document visibility, select the Create > Field menu options. By default, the field properties dialog will display. Name the field Readers and change the file type to Readers. Keep the field as Editable to allow users to modify who can view the document or, optionally, change the value to Computed to prevent the changes to the document visibility.

Step 3.

Set the default value for the field. This could be set to the author or users with a particular role. To allow only the author to view the document, add the following formula to the Programmers pane.

@UserName


To allow only the users with a particular role to view the document, add the following formula to the Programmers pane. Be sure to replace ROLENAME with a valid role specified in the database ACL.

@IsMember("[ROLENAME]"; @UserRoles)


Restrict the Ability to Edit a Document

Perform the following steps to restrict who has the ability to modify a document.

Step 1.

Create or edit an existing form in the database.

Step 2.

To restrict the ability to edit the document, select the Create > Field menu options. By default, the field properties dialog will display. Name the field Authors and change the field type to Authors. Keep the field as Editable to allow users to modify who can edit the document or, optionally, change the value to Computed to rely on the field formula regarding who can edit the document.

Step 3.

Set the default value for the field. This could be set to the author or users with a particular role. To allow only the author to edit the document, add the following formula to the Programmers pane.

@UserName


To allow only the users with a particular role to view the document, add the following formula to the Programmers pane. Be sure to replace ROLENAME with a valid role specified in the database ACL.

@IsMember("[ROLENAME]"; @UserRoles)


To permit the author and users with a particular role to modify the document, insert the following formula. Be sure to replace ROLENAME with a valid role specified in the database ACL.

@UserName : "[ROLENAME]"




An Introduction to the Lotus Domino Tool Suite

Getting Started with Designer

Navigating the Domino Designer Workspace

Domino Design Elements

An Introduction to Formula Language

An Introduction to LotusScript

Fundamentals of a Notes Application

Calendar Applications

Collaborative Applications

Reference Library Applications

Workflow Applications

Web Applications

Design Enhancements Using LotusScript

Design Enhancements Using Formula Language

View Enhancements

Sample Agents

Miscellaneous Enhancements and Tips for Domino Databases

Data Management

Security

Application Deployment and Maintenance

Troubleshooting

Appendix A. Online Project Files and Sample Applications

Appendix B. IBM® Lotus® Notes® and Domino®Whats Next?



Lotus Notes Developer's Toolbox(c) Tips for Rapid and Successful Deployment
Lotus Notes Developers Toolbox: Tips for Rapid and Successful Deployment
ISBN: 0132214482
EAN: 2147483647
Year: N/A
Pages: 293
Authors: Mark Elliott

Flylib.com © 2008-2020.
If you may any questions please contact us: flylib@qtcs.net