Click or drag to resize
TreeSecurityProviderFilterDataSetByPermissions Method (DataSet, NodePermissionsEnum, UserInfo, Boolean, Boolean, Int32)
Filters all tables of the given DataSet and returns only those records for which the user was granted with required permission.

Namespace: CMS.DocumentEngine
Assembly: CMS.DocumentEngine (in CMS.DocumentEngine.dll) Version: 8.2.23
Syntax
C#
public static DataSet FilterDataSetByPermissions(
	DataSet sourceDataSet,
	NodePermissionsEnum permission,
	UserInfo userInfo,
	bool allowOwner = false,
	bool deleteRecords = true,
	int topN = 0
)

Parameters

sourceDataSet
Type: System.DataDataSet
Source DataSet
permission
Type: CMS.DocumentEngineNodePermissionsEnum
Required permission
userInfo
Type: CMS.MembershipUserInfo
Current user info object
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
deleteRecords (Optional)
Type: SystemBoolean
If true, the filtered records are deleted from the DataSet. If false, records with flag columns to identify if user was granted with required permission are returned
topN (Optional)
Type: SystemInt32
Expected maximum of records to return

Return Value

Type: DataSet
See Also