| infoRouter Document Management System - Web Services API Documentation |
| SetAccessList |
| Sets the access list of a document or folder in the specified path. |
[Visual Basic] Public Shared Function SetAccessList(ByVal AuthenticationTicket As String, _ ByVal Path As String, _ ByVal AccessListXML As String, _ Byval ApplyToTree as Boolean) as xmldocument
|
- AuthenticationTicket
- infoRouter Authentication Ticket
- Path
- The Path of a document or a folder that the accesslist to be applied.
- AccessListXML
- A xml fragment declares the accesslist. See the remarks section.
- ApplyToTree
- If the path refers to a folder the access list can be apply to the sub folders and the documents in it.
|
returns xml fragment. <response success="true" error=""> if success attribute "true", the Access List has been Applied. if success attribute "false", the error attribute returns the error description.
|
The caller must be the system administrator or must have "Full Control" permissions on the Folder or the document.
The AccessList XML fragment should be structured as <AccessList> <DomainMembers Right="2"/> <UserGroup Domain="" GroupName="Authors" Right="4"/> <UserGroup Domain="" GroupName="Developers" Right="5"/> <UserGroup Domain="ProjectX" GroupName="Architect" Right="6"/> <User Domain="ProjectX" UserName="JoeD" Right="4"/> <User Domain="ProjectX" UserName="JaneC" Right="6"/> <User Domain="" UserName="SuzanP" Right="6"/> </AccessList> The Right Value can be 0 (No Access) 1 (List) 2 (Read) 3 (Add) 4 (Add & Read) 5 (Change) 6 (Full Control) The 1 (List) and 3 (Add) right cannot be applied to the documents.
|
Sub SetAccessList()
Const IRAuthenticationTicket As String = "sid-xxxxxxxxxxxxxxx" Const IR_Path As String = "/public" Dim xmlResponse As System.Xml.XmlElement Dim IR_Obj As InfoRouter.srv Dim xmldoc As System.Xml.XmlDocument Try xmldoc = New System.Xml.XmlDocument xmldoc.LoadXml("<AccessList/>") Dim xmlSecElem As System.Xml.XmlElement 'Set DomainMembers Access xmlSecElem = xmldoc.CreateElement("DomainMembers") xmlSecElem.SetAttribute("Right", "4") 'Add and Read xmldoc.DocumentElement.AppendChild(xmlSecElem) 'Set Change right to the usergroup (Authors@public) xmlSecElem = xmldoc.CreateElement("UserGroup") xmlSecElem.SetAttribute("DomainName", "Public") xmlSecElem.SetAttribute("GroupName", "Authors") xmlSecElem.SetAttribute("Right", "5") 'Change xmldoc.DocumentElement.AppendChild(xmlSecElem) 'Set Full Control Right to the User (JaneC) xmlSecElem = xmldoc.CreateElement("User") xmlSecElem.SetAttribute("DomainName", "") xmlSecElem.SetAttribute("UserName", "JaneC") xmlSecElem.SetAttribute("Right", "6") 'Full Control xmldoc.DocumentElement.AppendChild(xmlSecElem) IR_Obj = New InfoRouter.srv xmlResponse = IR_Obj.SetAccessList(IRAuthenticationTicket, _ IR_Path, _ xmldoc.DocumentElement.OuterXml, _ False) If xmlResponse.GetAttribute("success") = "true" Then Console.WriteLine("The AccesList has been applied successfully.") Else Console.WriteLine("The AccesList cannot be applied:" & _ xmlResponse.GetAttribute("error")) End If Catch ex As Exception Console.WriteLine("error:" & ex.Message) Finally xmlResponse = Nothing xmldoc = Nothing IR_Obj = Nothing End Try End Sub
|
GetAccessList | SetFolderRules |
| Syntax based on infoRouter Document Management System Web Services API Version 7.0 |
| Copyright() 1998-2003 Active Innovations, Inc. |
| infoRouter Document Management System |
|