Is there a way to check to see if a user has author/editor access to a document using Lotuscript?
What I want to do is create a workflow process that allows a user to select a document from a list and then initiate a process (all from Lotuscript) if they have author access to the document.
They may have access via a group so we can’t match names. Something like…
If userName.IsEditor( doc ) then
etc etc etc
End If
Subject: Checking Author Access
I think it’s much more efficient to put your group names in the ACL and assign roles to them and use the roles in your Authors fields rather than group names. This way you could check to see if your user has the role and if so then they have author access to the document.
Also, you can use @UserNamesList and compare it to the group(s) in the Authors field to see if there is a match. That should indicate if the user is an Author or not.
Subject: RE: Checking Author Access
The example I’ve given is a scenario and the requirement is nothing like that one. It is a scenario only.
I’m actually needing to processed 12,000,000 documents across, 7,000 databases, but in effect the scenario is easier to explain.
Subject: Checking Author Access
Well no direct way. vot you will have to do is to loop through all the fields of that document to check for author fileds, once u get the author field check if users name is listed in that or not. somthing like
Dim doc As NotesDocument
Forall item In doc.Items
If ( item.IsAuthors ) Then
If item.Contains(current user name) then
Msgbox “Yes”
End if
End If
End Forall
the method could be slow if number of fields r high in the doc.