Link to home
Start Free TrialLog in
Avatar of jforget1
jforget1

asked on

Setting access to form

Have a database which contains a number of docs, one of the docs in the DB is a self assessment that the user fills out, I have reader fields on this form which allow the user to see only their own and the manager to see all that have them as the manager. I want the default access to the overall DB to be reader but have the form be open to all to complete and be able to edit their own, bascially editor.

What is my best option to get this setup properly.
Avatar of mbonaci
mbonaci
Flag of Croatia image

Hi jforget1,
the best option is to set default access as Author and add the Authors field on that assessment form with the Author name in it.

Hope this helps,
Marko
jforget1,
the formula for Author field:
@Name( [Canonicalize]; @Author )

User with Author access can (from designer help):

Create documents if the user or server also has the Create documents access level privilege. When you assign Author access to a user or server, you must also specify the Create documents access level privilege.
Edit the documents where there is an Authors field in the document and the user is specified in the Authors field.
Read all documents unless there is a Readers field in the form. If there is a Readers field, the Author must be listed to be able to read documents.

Hope this helps,
Marko
Avatar of jforget1
jforget1

ASKER

If I do that will this allow anyone who has been directed to the form to complete an entry, the person I am doing this for has asked that it just be available to anyone to complete once they are directed to the DB. My default to the db is already Author but people are getting not authorized. For the author field, do you mean to create author field with Author as the value? These get me a bit confused sometimes.
I created a hidden computred Author type field called author and put the command you suggested above, I also confirmed the default access to author, but I had a user close note and try to put in an assessment and they still getting the You are not authorized to perform that operation error.
SOLUTION
Avatar of mbonaci
mbonaci
Flag of Croatia image

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
When they click the link in the nav to create an assessment they are getting you are not authorized before even getting the chance to complete the form.
jforget1,
what is the code in that navigator entry?
If it just composes the new doc, what is the code in QueryOpen and PostOpen event of the composing form?


Marko
I double checked when the user gets the error and it it is when they go to save the form, they can open it and enter the values but can't save.
I have no QueryClose etc code on this form. The code for the Save and Close button is below.

@Command([EditDocument];"1");
@Command([FileSave]);
@PostedCommand([FileSave]);
@PostedCommand([FileCloseWindow])
jforget1,
then that person must be the Reader in the ACL
or
he is in fact Author in the ACL (not listed in ACL in your case) and the doc is already saved (IsNewDoc = False) before that save attempt and the person is not in the Authors field.

Hope this helps,
Marko
jforget1,
That answers my question - the second case - user is not in the Authors field.
why saving it twice?

Hope this helps,
Marko
jforget1,
change the formula of save and close button to this:
@Command([EditDocument];"1");
@Command([FileSave]);
@PostedCommand([FileCloseWindow])

Have you understood? If the user is Author in the ACL then he can edit document only if he's listed in the Authors field.
Right click on document on view and check Properties, second tab, find your Authors field and check whether your user is inside (it's field flags have to be SUMMARY READ/WRITE-ACCESS NAMES)
 

Hope this helps,
Marko
ASKER CERTIFIED SOLUTION
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
I think I am really close here, a user who is not specifically listed in the ACL, just the default Author access, can create a doc and save it, but when they go back into the doc it will not let them put it into edit mode.
Never mind, she was not clicking in a spot to put into edit mode. She can now eidt and save just like needed.

I really appreciate all the help.
jforget1,
The Authors field apply only to users that are Authors in the ACL.
Editors and above can edit documents even if they aren't in Authors field.

The Readers field on the other hand applies to all users.

And to answer your question, there isn't any difference between users listed in the ACL as Author and users who isn't listed in the ACL if default ACL access is Author.
Both of them can create docs (if you check that option in the ACL) but can edit docs (enter edit mode) only if he's listed in Authors field.

Hope this helps,
Marko