Returns the access list for a document or a folder in the specified path.

Syntax

Visual Basic (declaration)
Public Function GetAccessList( _ 
ByVal AuthenticationTicket as String, _ ByVal Path as String) as XmlNode

C# (declaration)
public XmlNode GetAccessList( 
string AuthenticationTicket, string Path)

Parameters

AuthenticationTicket
    string infoRouter ticket
Path
    string A folder or a document path

Return Value

returns xml fragment.
if success = "true", the function returns the access list xml fragment.
if success = "false", the error attribute returns the error description.

<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> 


Remarks

The caller must have full control on the document or folder to get the access list.

minus gif Example

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