We help IT Professionals succeed at work.

We've partnered with Certified Experts, Carl Webster and Richard Faulkner, to bring you two Citrix podcasts. Learn about 2020 trends and get answers to your biggest Citrix questions!Listen Now

x

Setting access to form

jforget1
jforget1 asked
on
Medium Priority
219 Views
Last Modified: 2013-12-18
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.
Comment
Watch Question

Commented:
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

Commented:
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

Author

Commented:
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.

Author

Commented:
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.
Commented:
jforget1,
did that user created the document?

Not the solution you were looking for? Getting a personalized solution is easy.

Ask the Experts

Author

Commented:
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.

Commented:
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

Author

Commented:
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.

Author

Commented:
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])

Commented:
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

Commented:
jforget1,
That answers my question - the second case - user is not in the Authors field.
why saving it twice?

Hope this helps,
Marko

Commented:
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
Commented:
jforget1,

Adjust the ACL of your Database so that all users are authors with permission to create documents.  They can edit only documents they create.

Now, if you make Managers editors, then manager can edit any document.

The authors field at the top of the document should be something like: docauthors, authors, computed when composed, formula=@userName.

The form itself has the ability to restrict who can create documents, so check the form properties, the SECURITY tab, and make sure that the form enables everyone to create documents.

So, they need ability to create documents in the DATABASE acl, they need permission to CREATE the FORM in the FORM properties, and then the FORM needs an AUTHOR's field, computed when composed at the top of the form.

Everyone (Managers) else can be EDITOR, including server, admin, so they can edit all forms.

Also, you need to have a default view, and default form set in your database that is available to all readers.  

Does this help to explain?

Author

Commented:
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.

Author

Commented:
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.

Commented:
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
Access more of Experts Exchange with a free account
Thanks for using Experts Exchange.

Create a free account to continue.

Limited access with a free account allows you to:

  • View three pieces of content (articles, solutions, posts, and videos)
  • Ask the experts questions (counted toward content limit)
  • Customize your dashboard and profile

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.