Returns the access list for a document or a folder in the specified path.
Visual Basic (declaration) |
---|
Public Function GetAccessList( _ |
C# (declaration) |
---|
public XmlNode GetAccessList( |
<response success="true" error="">
<AccessList InheritedSecurity="false">
<DomainMembers Right="4" Description="(Add & Read)" />
<UserGroup DomainName="Accounting" GroupName="Accountants" Right="3" Description="(Add)" />
<User DomainName="" UserName="JoeK" Right="2" Description="(Read)" />
<User DomainName="" UserName="JaneL" Right="4" Description="(Add & Read)" />
</AccessList>
</response>
Visual Basic Example |
---|
Public Sub GetAccessList() Const IRAuthenticationTicket As String = "sid-xxxxxxxxxxxxxx" Const IR_DocPath As String = "/public" Dim xmlResponse As System.Xml.XmlElement Dim IR_Obj As InfoRouter.srv Try 'Create InfoRouter Object IR_Obj = New InfoRouter.srv xmlResponse = IR_Obj.GetAccessList(IRAuthenticationTicket, IR_DocPath) If xmlResponse.GetAttribute("success") = "true" Then 'get accesslist element Dim xmlaccesslist As System.Xml.XmlElement = xmlResponse.FirstChild 'check inheritance If xmlaccesslist.GetAttribute("InheritedSecurity") = "true" Then Console.WriteLine("Parent folder permissions are inherited.") Else Console.WriteLine("Local permissions are in effect.") End If 'loop through access list item Dim xmlSecElem As System.Xml.XmlElement For Each xmlSecElem In xmlaccesslist If xmlSecElem.Name = "Anonymous" Then Console.WriteLine("Anonymous Access : " & _ xmlSecElem.GetAttribute("Description")) End If If xmlSecElem.Name = "DomainMembers" Then Console.WriteLine("Domain Members : " & _ xmlSecElem.GetAttribute("Description")) End If If xmlSecElem.Name = "UserGroup" Then Console.WriteLine("User Group : " & _ xmlSecElem.GetAttribute("DomainName") & "," & _ xmlSecElem.GetAttribute("GroupName") & "-" & _ xmlSecElem.GetAttribute("Description")) End If If xmlSecElem.Name = "User" Then Console.WriteLine("User : " & _ xmlSecElem.GetAttribute("DomainName") & "," & _ xmlSecElem.GetAttribute("UserName") & "-" & _ xmlSecElem.GetAttribute("Description")) End If Next Else Console.WriteLine(xmlResponse.GetAttribute("error")) End If xmlResponse = Nothing Catch ex As Exception Finally IR_Obj = Nothing End Try End Sub |