Hi,
I’ve just create a database do a test on document locking.
Client 6.5.2 server 7.0.1
In this test database i just have one form with one editable field (no formulas or hide-when…). Just a form and this field.
In ACL two users: userA who is reader (no right to write public documents) and userB author.
I would like to now if it is normal that userA can lock documents by double-clicking in it? when userB try to edit the document, he got a message like “Document is loked by UserA…”
Thank you for your answers.
Subject: Readers can lock documents?
I think you will notice that userA is in edit mode- when UserA attempts to save the document, they will not be able to. (Thus they are “reader”) BUT, they have the document open in edit mode. So, you have to stop them from being able to go in to edit mode- I do this with a formula in the QueryModeChange EventSub Querymodechange(Source As Notesuidocument, Continue As Variant)
Dim s As New NotesSession
Dim NU As String
nu = s.UserName
If source.FieldGetText("Author") = NU Then
Msgbox "You can no longer edit this document."
Continue = False
End If
End Sub
That should solve your problem.
Subject: RE: Readers can lock documents?
Thank you Thomas,
UserA can’t edit documents he can’t even open them in edit mode.And it is normal because UserA has a reader access to the database and “Write public documents” is not selected for him in ACL.
I tried your solution (I already tried it before posting this question but…) and it doesn’t solve the problem.
I even put “Continue = False” in querymodechange, so that userA and userB won’t be able to edit the document.
But it is still the same, UserA lock the document : when userB try to edit : “Doc is already lock…”
Very strange…
Subject: Readers can lock documents?
I just tried this using client version 7.0.3.I set one user (UserA) to have reader access and another (UserB) to have editor access to the same database, and in my case it was not possible for UserA to lock documents.
UserA tried each of the following:
Ctrl-E directly from a view;
Opened doc in read mode than double-click; and
Right-click doc in view and click “Lock document”.
In all cases, UserA could not get a lock on the document, and UserB was able to edit the document.
If you’re seeing a problem with this in client version 6.5.2, maybe it’s bug with that version. Your best option might be upgrading the client to either 6.5.6 or 7.0.
Subject: Readers can lock documents? (document locking is not allowed on db properties)
Thank you for your answer, I think you’ve selected the option “Allow document lock” in your database properties that’s why you could right-click doc in view and click “Lock document”.
And then you can’t reproduce this bug. I think you’ll have the same problem if you don’t select this property in database.
My problem is : if I select “Allow document lock” in the database properties, sometimes documents stay locked while they should not.