VB.NET Check Access
Listing 1. You call the AccessCheck function on the client context to request permissions from Authorization Manager on a list of operations. The operations parameter contains the list of operation IDs for which the code requests permission. Private Function DoCheck() As Boolean Dim objectname_foraudit_purpose_only As String = "acheck" Dim scopes() As Object = {""} Dim op_1 As Integer = 1 Dim op_2 As Integer = 2 Dim operations As Object() = New Object() {op_1, op_2} Dim results() As Object = _ CType(m_IAzClientContext.AccessCheck( _ objectname_foraudit_purpose_only, _ scopes, operations), Object()) For Each l_res As Object In results If Not CType(l_res, Integer) = 0 Then Return False End If Next Return True End Function |