Solved

Not Authorized with Author rights

Posted on 2008-06-11
7
376 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
Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 
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

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

This is an old article, please see an updated version of this article, located here: http://www.experts-exchange.com/articles/23619/Notes-8-5x-Windows-7-Notes-info-and-tips.html
You’ve got a lotus Domino web server, and you have been told that “leverage browser caching” is a must do. This means that we have to tell the browser everywhere in the web to use cache. In other words, we set (and send) an expiration date in the HT…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…

757 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

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now