« Domino Document Locking Class 1.1 | Main| Domino Environment Part II: Library Templates »

Domino Document Locking Class 1.3

Bookmark : del.icio.us  Technorati  Digg This  Add To Furl  Add To YahooMyWeb  Add To Reddit  Add To NewsVine 

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 )


Domino Document Locking

Select All


Comments

1 - Hi Chad,
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

2 - Hi Chad

Is that work on the web?

And with a load balancing cluster...

Thanks

3 - I have used it on the web, so yes it will. As for the balancing cluster, it should work because this class is using the Domino Document Locking feature and nothing else, this class is just a wrapper to handle the common errors/situations that are not provided by Domino.

4 - I have used it on the web, so yes it will. As for the balancing cluster, it should work because this class is using the Domino Document Locking feature and nothing else, this class is just a wrapper to handle the common errors/situations that are not provided by Domino.

5 - Hi Chad, great work the Domino Document Locking Class, but I've got a problem unlocking a doc using that code from a web agent. The problem is in line

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.

6 -

7 - Thanks Dennis I will take a look at it.

8 - I am new to Domino. Where do I past the document locking logic.

9 - I would place the code into a script library so it can be used by anything.

Post A Comment

:-D:-o:-p:-x:-(:-):-\:angry::cool::cry::emb::grin::huh::laugh::lips::rolleyes:;-)