Fetchtrustees – Kofax DM API User Manual

Page 192

Advertising
background image

172 C

HAPTER

4

FetchTrustees

'Does the document have security?

' 0 = no; 1 = yes

LDefaultRights = _

objPropList.

GetPropertyValue

("SECURITY")

'Determine the effective rights of the user

'who is currently logged on.

LEffectiveRights = _

objPropList.

GetPropertyValue

( _

"%EFFECTIVE_RIGHTS")

'Determine whether the user who is currently

'logged on has rights to edit the security

'settings of this document: 0 = no; 1 = yes

LAccessControl = objDOC.

HasRight

( _

"%PR_ACCESS_CONTROL", LEffectiveRights)

If (LAccessControl) Then

'Show user the list of trustees.

objDOC.

FetchTrustees

'Update the trustees.

Dim sTrustee As String

sTrustee = InputBox("Enter user or group " _

& "to add as a trustee to document " _

& txtDocNum.Text, "Add Trustee", strUser)

objDOC.

SetTrustee

sTrustee, 0, 128

objDOC.

UpdateTrustees

If (objDOC.

ErrNumber

<> 0) Then

lstResultSet.AddItem _

"Unable to update trustees."

GoTo bye

End If

objDOC.

Update

Else

lstResultSet.AddItem "You do not have " _

Advertising