Domino Document Locking Class 1.3
Bookmark :
Here is an update to the Document Locking Class 1.1 and Document Locking Class , this update allows the unlocking overriding for Manager access (coded by Michael Sobczak) or overriding by group or role.
Here is an update to the Document Locking Class 1.1 and Document Locking Class , this update allows the unlocking overriding for Manager access (coded by Michael Sobczak) or overriding by group or role.
Public Sub new ( inDoc As Variant )
Public Sub SetCurrentUser ( user As String )
Public Function hasDocument ()
Public Sub setDocument ( inDoc As NotesDocument )
Public Sub setUIDocument ( inUIDoc As NotesUIDocument )
Public Property Get CurrentUser As String
Public Property Get toString As String
Public Property Get ShowPrompts As Boolean
Public Property Set ShowPrompts As Boolean
Public Function LockingEnabled () As Boolean
Public Function IsLockedByCurrentUser () As Boolean
Public Function IsDocumentLockedByCurrentUser (doc As NotesDocument ) As Boolean
Public Function IsUIDocumentLockedByCurrentUser ( uiDoc As NotesUIDocument ) As Boolean
Public Function LockedBy ( ) As String
Public Function IsLocked ( ) As Boolean
Public Function IsDocumentLocked ( doc As NotesDocument ) As Boolean
Public Function IsUIDocumentLocked ( uiDoc As NotesUIDocument ) As Boolean
Public Function Lock ( ) As Boolean
Public Function LockUIDocument (uiDoc As NotesUIDocument ) As Boolean
Public Function LockDocument ( doc As NotesDocument ) As Boolean
Public Function UnLock ( ) As Boolean
Public Function UnLockUIDocument ( uiDoc As NotesUIDocument ) As Boolean
Public Function UnLockDocument ( doc As NotesDocument ) As Boolean
Public Sub RoleGroupOverRide ( RoleGroup As String )
Public Sub SetCurrentUser ( user As String )
Public Function hasDocument ()
Public Sub setDocument ( inDoc As NotesDocument )
Public Sub setUIDocument ( inUIDoc As NotesUIDocument )
Public Property Get CurrentUser As String
Public Property Get toString As String
Public Property Get ShowPrompts As Boolean
Public Property Set ShowPrompts As Boolean
Public Function LockingEnabled () As Boolean
Public Function IsLockedByCurrentUser () As Boolean
Public Function IsDocumentLockedByCurrentUser (doc As NotesDocument ) As Boolean
Public Function IsUIDocumentLockedByCurrentUser ( uiDoc As NotesUIDocument ) As Boolean
Public Function LockedBy ( ) As String
Public Function IsLocked ( ) As Boolean
Public Function IsDocumentLocked ( doc As NotesDocument ) As Boolean
Public Function IsUIDocumentLocked ( uiDoc As NotesUIDocument ) As Boolean
Public Function Lock ( ) As Boolean
Public Function LockUIDocument (uiDoc As NotesUIDocument ) As Boolean
Public Function LockDocument ( doc As NotesDocument ) As Boolean
Public Function UnLock ( ) As Boolean
Public Function UnLockUIDocument ( uiDoc As NotesUIDocument ) As Boolean
Public Function UnLockDocument ( doc As NotesDocument ) As Boolean
Public Sub RoleGroupOverRide ( RoleGroup As String )







Comments
just want to emphasize the requirement for overiding the manager access:
Unlocking without manager rights does only work if you are explicitly listed in an author item of the document - by Name, Role or Groupmembership.
Editor or designer access does not suffice.
Otherwise you recieve an error that the document is already locked by another user. :-
Thanks for sharing.
VM
Posted by Volker Mannherz At 08:24:16 AM On 10/17/2006 | - Website - |
Is that work on the web?
And with a load balancing cluster...
Thanks
Posted by gregory At 01:27:30 AM On 02/29/2008 | - Website - |
Posted by Chad Schelfhout At 10:06:39 AM On 02/29/2008 | - Website - |
Posted by Chad Schelfhout At 10:06:41 AM On 02/29/2008 | - Website - |
pUser = Session.UserName
because Session.UsersName returns the server name where the agent is executed rather than the user name, so when you check if user can unlock a doc the comparison always fails.
I avoid that issue using this code
pUser = Session.EffectiveUserName
I don't check if with this change the code still work on client.
Posted by Denis Cappellin At 04:09:16 AM On 10/01/2008 | - Website - |
Posted by At 05:16:28 AM On 10/01/2008 | - Website - |
Posted by Chad Schelfhout At 05:49:28 AM On 10/01/2008 | - Website - |
Posted by Gail Sims At 02:36:31 PM On 11/11/2008 | - Website - |
Posted by Chad Schelfhout At 06:53:27 AM On 11/14/2008 | - Website - |
I paste code 'Domino Document Locking' in script library.
Where and how I can call function from this class.
Thank's Bojana
Posted by Bojana At 07:19:32 AM On 06/01/2009 | - Website - |
Posted by Chad Schelfhout At 12:47:42 PM On 06/09/2009 | - Website - |
Thanks for your response, i have few question for you.
I don't have experience with custom class.
This is scenario which i would like to have in application for web clients.
USER 1 open document in edit mode, and for other users that document is read only. If they try to put that document in edit mode ... show message
"Document is locked by USER XX" and they have visible button = unlock.
Function of that button is to change mod for USER 1 (from Edit to Read mode) and USER XX change mode for read to edit. Is that possible??
Any help will be appreciated very much.
Posted by Bojana At 06:40:13 AM On 06/11/2009 | - Website - |
Use "Domino Document Locking"
Dim session As New NotesSession
Dim doc As NotesDocument
Dim uidoc As NotesDocument
Dim ddl As New DominoDocumentLocking( doc )
Print "True: " + Cstr( True )
Print "No Document: False"
Print ddl.hasDocument()
Print ddl.toString()
Print "Document Context: True"
Call ddl.setDocument( session.DocumentContext )
Print ddl.hasDocument()
Print ddl.toString()
ddl.ShowPrompts = True
Print ddl.LockingEnabled()
Print ddl.toString()
ddl.ShowPrompts = True
Print ddl.LockingEnabled()
Print "Locking 2"
Print ddl.toString()
Print ddl.LockedBy()
ddl.RoleGroupOverRide( "Admin" )
ddl.UnLock
Print ddl.toString()
Posted by Chad Schelfhout At 11:15:56 PM On 06/11/2009 | - Website - |
Posted by Golden Sparrow At 12:45:54 AM On 07/03/2009 | - Website - |
Do you have a NSF sample link or maybe a code snippet? It will be very helpfull.
Thanks and great work!
Posted by Alexander At 01:21:21 PM On 08/31/2009 | - Website - |