IAclHierarchyItemGetInheritedAclSet Method
IT Hit WebDAV Classes Reference
Contains a set of items that also control the access to this item.
To have a privilege on an item, not only must the ACL on that item (specified in the
ITHit.WebDAV.Server.Acl
property of that item) grant the privilege, but so must the ACL of each items identified in the
GetInheritedAclSet property of that item. Effectively, the privileges granted by the current
ACL are ANDed with the privileges granted by each inherited ACL.
Namespace: ITHit.WebDAV.Server.AclAssembly: ITHit.WebDAV.Server (in ITHit.WebDAV.Server.dll) Version: 4.5.3121.0
Syntax IEnumerable<IHierarchyItem> GetInheritedAclSet()
Function GetInheritedAclSet As IEnumerable(Of IHierarchyItem)
IEnumerable<IHierarchyItem^>^ GetInheritedAclSet()
abstract GetInheritedAclSet : unit -> IEnumerable<IHierarchyItem>
Return Value
Type:
IEnumerableIHierarchyItem
List of
IHierarchyItem items.
Exceptions Examples The code below is part of 'WebDAVServer.NtfsNtlmAcl' sample provided with the SDK.
public IEnumerable<IHierarchyItem> GetInheritedAclSet()
{
var current = this;
var parent = current.GetParent();
List<IHierarchyItem> parents = new List<IHierarchyItem>();
while (parent != null)
{
var accessControl = File.GetAccessControl(parent.fileSystemInfo.FullName);
var acl = accessControl.GetAccessRules(true, false, typeof(SecurityIdentifier));
if (acl.Count > 0)
{
parents.Add(parent);
}
current = parent;
parent = current.GetParent();
}
return parents;
}
See Also