Access Levels and Profile Documents

I have created a Lotus Notes Application that uses a profile document which keeps critical look-up values that the entire database uses.

I am using the @Command([EditProfileDocument]; “Field Values”) to create and edit field values that are used throughout the application. I also have created a user role “Admin” which I use to restrict who can edit this profile document.

All users who access this database including the Admin have author rights. This is a requirement. The Lotus Help says that the access required to create or edit a profile document is Author with create document privileges. Well, when we deployed this application - the Admin could not create the profile document using the command above. Whenever the edit profile action was pressed the Admin would see the profile document in “read only” mode. Note: the admin was trying to create the profile document.

So I recreated this problem on my test server. Here are the steps below to recreate this:

1 - Create a new database on an 8.5.1 Domino server.

2 - The ODS is 43.

3 - Create a form with two text fields on it

4 - Save the form (as “Test”)

5 - Create an action on a view

6 - Use the following code to edit the profile document: @Command([EditProfileDocument];“Test”)

7 - Add a user to the ACL of this database and give them Author rights with Create and Delete privileges.

8 - Switch to that user id and then access the database on your Domino Server.

9 - Click the Edit Profile button you created (You will see the profile document in edit mode)

10 - Now without making any changes to the profile document - close it without saving it.

11 - Get out of the database

12 - Reopen the database and click the “Edit Profile” action you created (you will no longer be able to edit the profile document).

Has anyone had a similar problem with Profile documents? I am thinking I have to recode and use a lone document in a hidden view for my profile document.

Any help would be so so awesome!

Thanks!

Subject: add an Authors field

If I understand your post, you do not have an Authors field on the profile document. That would explain why noone having less than Editor access to the database can edit the profle, once it has been saved to disk.

Solution: Add an Authors field to the form whose computed value is “[Admin]”.

P.S.: I vaguely recall someone reporting that there is a bug in some version of Notes 8.x that makes it necessary to add also a Readers field with a value of “*”. (Not required with pre-8 versions of Notes.)

Subject: There is a caveat to Author fields and profile documents

I just wanted to pass this information along as I was having problems with Author Fields working in a profile document.Problem

A new database is setup. The database administrator is only allowed Author access and is responsible for setting up a database profile document which will contain values that will be used for field look-up values.

The profile document has an Authors field on it that computes to a user role in the Access Control List (in this case the use role is “Admin”). The following command is used to edit the profile document:

@Command([EditProfileDocument]; “ProfileDoc”)

The Database Administrator clicks the action button and the Profile document appears in edit mode. The Database Administrator does not enter any values and just closes the document with out saving it. He can do this several times while in the database but if he exits the database and then reopens the database he will no longer be able to edit the profile document. E will only have reader access to the profile document.

Cause

When you edit a profile document for the first time it will save a “stub” even though you don’t save the profile. Unfortunately, this “stub” doesn’t calculate the author field so once you exit the database without saving the profile document you will not be able to edit the profile document again. The profile document will have to be deleted by someone with Editor access.

Solution

I worked with support on this issue and it is reproducible. We created a hidden field on the document which defaults to “0”. On the query close event if that hidden field is “0” we set it to “1” save the document. The support technician told me that we have to it that way cause for some reason the IsNewDoc parameter did not work.