Solved

Not Authorized with Author rights

Posted on 2008-06-11
7
378 Views
Last Modified: 2013-12-18
Have a DB which is used by the help desk at our company. For most users they are only reading the docs. On the docs that they need to read I have placed a Readers field with the role they are in, I made their access level in the ACL Author because they do need to place entries in the DB which are then reviewed and placed as a reference doc if valid.

Problem is I tested with a user yesterday and the visibility based on the reader field with his role worked perfect, only issue I have is When he went to create a new doc, he entered the test record, hit esc and tried to save. He get the You are not authorized to perform that operation, shouldn't the Author level in the ACL allow them to save an entry. I don't want to do an Author field as I do not want the user to be able to edit once the doc is approved. I have a Reader field which is used temporarily while the doc is in a pending status that does allow them access, but I take that away and they only have Reader access once the doc is approved.

What is a good option here.
0
Comment
Question by:jforget1
  • 4
  • 3
7 Comments
 
LVL 7

Expert Comment

by:olaraak
ID: 21760237
Check out, if there is some code that saves document during first editing. Then, unless listed in Authors field, the users have no right to save the document again.
0
 

Author Comment

by:jforget1
ID: 21760334
I get you, see if there is a save that happens right off the bat which is basically the Author users one save opportunity. I will look at this as the issue.
0
 

Author Comment

by:jforget1
ID: 21760382
I have the code below in the QuerySave event, I use this to change visibility rights dynamically for the forms. Wouldn't this happen as the user tries to save for the first time?
Sub Querysave(Source As Notesuidocument, Continue As Variant)
	Dim s As New NotesSession
	Dim db As NotesDatabase
        ' Get document object from Source
	Dim doc As NotesDocument
	Set doc = Source.Document
	
	Set db = s.CurrentDatabase
	
        ' get first item of status field, to avoid type mismatch error
	If doc.status(0) = "Pending" Then 
                ' if there is field "author" with author name
		doc.pending_reader = doc.author(0) 
		doc.admin_reader = "[ADMIN]"
		doc.pending_admin = "[PENDING_ADMIN]"
		doc.core = ""
	Else
		doc.pending_reader  = ""
		doc.admin_reader = ""
		doc.pending_admin = ""
		doc.core = "[CORE]"
		doc.username = ""
	End If
        ' Save document
	Call doc.Save(True,False)
	
End Sub

Open in new window

0
DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

 
LVL 7

Accepted Solution

by:
olaraak earned 500 total points
ID: 21760589
QuerySave event fires before currend document is saved.
So, if you specify Call doc.Save inside QuerySave event, then you get second saving

Try to replace "Call doc.Save(...)"  with "continue = True" and see what's happening.
0
 
LVL 7

Expert Comment

by:olaraak
ID: 21760864
Sorry about typo in current ... :-)

...and Continue=True is not necessary, usually only Continue=False is trapped as stop sign before saving document.
But setting it true won't hurt either.
0
 

Author Comment

by:jforget1
ID: 21760921
Actually it ended up being that I forgot when I changed to the user to Author, the Create Documents does not go on by default. That was the reason for the error. I should have picked this one up. Thanks for the help.
0
 
LVL 7

Expert Comment

by:olaraak
ID: 21761041
With Create Documents privilege switched off, users should'nt be able to create a new document at all.
I even thought about it, but the error description pointed more on double saving.

0

Featured Post

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

I thought it will be a good idea to make a post as it will help in case someone else faces these issues. I trust this gives an idea how each entry in Notes.ini can mean a lot for the Domino Server to be functioning properly. This article discusses t…
Article by: Rob
Notes 8.5 Archiving Steps and Tips This article covers setting up a Notes archive, and helps understand some of the menu choices making setting up and maintaining a Notes archive file easier.
In a recent question (https://www.experts-exchange.com/questions/28997919/Pagination-in-Adobe-Acrobat.html) here at Experts Exchange, a member asked how to add page numbers to a PDF file using Adobe Acrobat XI Pro. This short video Micro Tutorial sh…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…

810 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question