Link to home
Start Free TrialLog in
Avatar of AliciaVee
AliciaVee

asked on

Access Controlled Section - Issues with Edit Rights

Experts,

I have a database in production and have just found out some of the forms can be edited, even though I have access controlled sections, and some documents cannot be edited (so the access control section is working in this case).

What have I done wrong?

This is the basic scructure of the document:

DocumentAuthors - Type Author, computed, allow multiple values, with the following formula:
"[EditRights]"

Access Control Section 1 (I have two of them):
This section should be filled in by the user, when it is a new doccument, afterwards, they cannot edit this section, but can edit other areas of the document:
@If(@IsNewDoc;"[EditRights]";"[Admin]")

All users are given Author access to this database,with userrole "EditRights".

What I am finding out is the older documents cannot be edited, and the newer documents can.  In all documents, the DocumentAuthors field does display "[EditRights]"  so I don't think refreshing all the documents will do any good -- or will it?  I added the new section and new code for access controlled sections recently, but then why do the older documents seem to work okay, and newer documents don'g?

I'm a mess over this one!

AliciaVee
Avatar of Sjef Bosman
Sjef Bosman
Flag of France image

AFAIK, "a section access formula must evaluate to a name or a list of names". I think this means that roles cannot be used.
But I may be terribly wrong...
Probably it will work, don't poay too much attention to my previous posts. What you should know is that the allowed editors of a section are stored in the document. So changing the form won't matter much on older documents.
Avatar of AliciaVee
AliciaVee

ASKER

sjef,

okay -- maybe I should check whether it is because using a role is not good?  I can add my name though...to test.  How would I do that?  Do I add it with the full CN path?
NO.. Roles will work.

Is controlled section formula is of type computed when composed ? Change it to computed or computed for display !

What are the changes that you made to new documents ?

~Hemanth
Hemanth,

The section is set for computed.  Bascially, once the form is filled out, there are 3 sections, and one of them should be locked -- not to be edited after submission of the project.  The other two sections can be edited, and here I do not have any control.  I have given all users the "[EditRights]" role, and only the "[Admin]" role to the controlled section, using this formula:

@If(@IsNewDoc;"[EditRights]";"[Admin]")

I have tested it as well, and it looks like any 'new' project that is added does not seem to provide the section security, but the projects that were in the database before I changed the form, looks like it works.  So, by adding the access controled section after projects were entered -- how does that affect those documents correctly, where as new projects do not work right?  Do I have to do a refresh of some sort?  Do you think that might help?  I'm really confused on this.
The old documents should pickup this change..

What do you mean by
>where as new projects do not work right?

Your formula should give access to the newdocs and once it is saved user loses rights on that section and admin gets it in turn
ASKER CERTIFIED SOLUTION
Avatar of qwaletee
qwaletee

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
So I was terribly wrong about the roles. Thanks for the subtle confirmation ;) Learning all the time.

So, now, what happens when there are older documents, that still have the section field in the document, and a form with a CfD-section formula is used? What is used by the Notes client for section access, the stored value or the form's formula? If I had to bet, I'd say 99% probability to the stored value...
Well, in the original version, it was an actual field an you ha dto delete it from the old docs before the new setup coudl apply to them.  Not sure if that's still so -- I think not.
qwaletee -- yep!  you were right  -- I noticed some of the older documents and some new had different values in the "field" in document properties for the access controled section.  So, what I did was exactly that -- first I used an agent that refreshed all the documents -- then the values were what they should be.  Then I changed it to computed for display.

Whew!  That was a scary one.  Thanks all!

AliciaVee