Solved

Not Authorized with Author rights

Posted on 2008-06-11
7
383 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
Industry Leaders: 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 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

Independent Software Vendors: 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!

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…
  In today’s Arena we can’t imagine our lives without Internet as we are highly used to of it. If we consider our life style just for only 2 min we found that face to face communication is swapped by e-communication.  Every Where from Works place to…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…

718 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