ISecurityTrimmerPost.CheckAccess method
This is the main method for checking user access. The query processing component will submit batches of documentInformation; the implementation must return which ones are displayable for the current authenticated user via an array of bitmask.
In addition to the URL, the query processing component will pass in query session properties that are valid only for the duration of the current call into the query processing component. Implementations may write to these query session properties to store information that's needed across multiple executions of CheckAccess within the scope of a single client call to the query processing component. No synchronization is required before writing to the query session properties.
Query session properties are shared across trimmer implementations, so it must not be cleared. Only properties set by a particular trimmer implementation may be altered. New properties may be created at any time.
Namespace: Microsoft.Office.Server.Search.Query
Assembly: Microsoft.Office.Server.Search (in Microsoft.Office.Server.Search.dll)
Syntax
'Declaration
Function CheckAccess ( _
documentUrls As IList(Of String), _
documentAcls As IList(Of String), _
sessionProperties As IDictionary(Of String, Object), _
userIdentity As IIdentity _
) As BitArray
'Usage
Dim instance As ISecurityTrimmerPost
Dim documentUrls As IList(Of String)
Dim documentAcls As IList(Of String)
Dim sessionProperties As IDictionary(Of String, Object)
Dim userIdentity As IIdentity
Dim returnValue As BitArray
returnValue = instance.CheckAccess(documentUrls, _
documentAcls, sessionProperties, _
userIdentity)
BitArray CheckAccess(
IList<string> documentUrls,
IList<string> documentAcls,
IDictionary<string, Object> sessionProperties,
IIdentity userIdentity
)
Parameters
documentUrls
Type: System.Collections.Generic.IList<String>List of the URLs for each document whose access is to be determined by the security trimmer implementation.
documentAcls
Type: System.Collections.Generic.IList<String>List of the document ACLs for each document whose access is to be determined by the security trimmer implementation. This list may be null or may contain String.Empty strings.
sessionProperties
Type: System.Collections.Generic.IDictionary<String, Object>Transient property bag valid within the scope of a single query processing component execution.
userIdentity
Type: System.Security.Principal.IIdentityIdentity of the user.
Return value
Type: System.Collections.BitArray
A System.Collection.BitArray with values 1 if the respective document identifier from documentUrls has been granted access or 0 if the respective document identifier has not been granted access.