Click or drag to resize
TreeSecurityProviderFilterDataRecordsByPermissions Method
Filters an enumeration of data records are returns only those records for which the user was granted required permission.

Namespace: CMS.DocumentEngine
Assembly: CMS.DocumentEngine (in CMS.DocumentEngine.dll) Version: 13.0.131
Syntax
C#
public static IEnumerable<IDataRecord> FilterDataRecordsByPermissions(
	IEnumerable<IDataRecord> sourceDataRecords,
	NodePermissionsEnum permission,
	UserInfo userInfo,
	bool allowOwner = false,
	int topN = 0
)

Parameters

sourceDataRecords
Type: System.Collections.GenericIEnumerableIDataRecord
Enumeration of data records to filter.
permission
Type: CMS.DocumentEngineNodePermissionsEnum
Required permission.
userInfo
Type: CMS.MembershipUserInfo
User for which to evaluate the permissions.
allowOwner (Optional)
Type: SystemBoolean
If true, documents the owner of which is the given user are not filtered out even if the user has not the permission.
topN (Optional)
Type: SystemInt32
Expected maximum of records to return.

Return Value

Type: IEnumerableIDataRecord
Returns the filtered enumeration.
See Also