Solved

Not Authorized with Author rights

Posted on 2008-06-11
7
382 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 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

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!

Question has a verified solution.

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

Lack of Storage capacity is a common problem that exists in every field of life. Here we are taking the case of Lotus Notes Emails, as we all know that we are totally depend on e-communication i.e. Emails. This article is fully dedicated to resolvin…
This article covers general Notes 8.5 troubleshooting information including recreating the Notes\Data folder.
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

734 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