Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Not Authorized with Author rights

Posted on 2008-06-11
7
Medium Priority
?
387 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 7

Accepted Solution

by:
olaraak earned 2000 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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

For users on the Lotus Notes 8 Standard client, this article provides information on checking the Java Heap size and adjusting it to half of your system RAM in attempt to get the Lotus Notes 8.x Standard client to run faster.  I've had to exercise t…
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
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…

610 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