<PackageReference Include="System.Security.AccessControl" Version="4.6.0-preview3.19128.7" />

DiscretionaryAcl

public sealed class DiscretionaryAcl : CommonAcl
Represents a Discretionary Access Control List (DACL).
public DiscretionaryAcl(bool isContainer, bool isDS, byte revision, int capacity)

Initializes a new instance of the DiscretionaryAcl class with the specified values.

public DiscretionaryAcl(bool isContainer, bool isDS, int capacity)

Initializes a new instance of the DiscretionaryAcl class with the specified values.

public DiscretionaryAcl(bool isContainer, bool isDS, RawAcl rawAcl)

Initializes a new instance of the DiscretionaryAcl class with the specified values from the specified RawAcl object.

public void AddAccess(AccessControlType accessType, SecurityIdentifier sid, int accessMask, InheritanceFlags inheritanceFlags, PropagationFlags propagationFlags)

Adds an Access Control Entry (ACE) with the specified settings to the current DiscretionaryAcl object.

public void AddAccess(AccessControlType accessType, SecurityIdentifier sid, int accessMask, InheritanceFlags inheritanceFlags, PropagationFlags propagationFlags, ObjectAceFlags objectFlags, Guid objectType, Guid inheritedObjectType)

Adds an Access Control Entry (ACE) with the specified settings to the current DiscretionaryAcl object. Use this method for directory object Access Control Lists (ACLs) when specifying the object type or the inherited object type for the new ACE.

Adds an Access Control Entry (ACE) with the specified settings to the current DiscretionaryAcl object.

public bool RemoveAccess(AccessControlType accessType, SecurityIdentifier sid, int accessMask, InheritanceFlags inheritanceFlags, PropagationFlags propagationFlags)

Removes the specified access control rule from the current DiscretionaryAcl object.

public bool RemoveAccess(AccessControlType accessType, SecurityIdentifier sid, int accessMask, InheritanceFlags inheritanceFlags, PropagationFlags propagationFlags, ObjectAceFlags objectFlags, Guid objectType, Guid inheritedObjectType)

Removes the specified access control rule from the current DiscretionaryAcl object. Use this method for directory object Access Control Lists (ACLs) when specifying the object type or the inherited object type.

Removes the specified access control rule from the current DiscretionaryAcl object.

public void RemoveAccessSpecific(AccessControlType accessType, SecurityIdentifier sid, int accessMask, InheritanceFlags inheritanceFlags, PropagationFlags propagationFlags)

Removes the specified Access Control Entry (ACE) from the current DiscretionaryAcl object.

public void RemoveAccessSpecific(AccessControlType accessType, SecurityIdentifier sid, int accessMask, InheritanceFlags inheritanceFlags, PropagationFlags propagationFlags, ObjectAceFlags objectFlags, Guid objectType, Guid inheritedObjectType)

Removes the specified Access Control Entry (ACE) from the current DiscretionaryAcl object. Use this method for directory object Access Control Lists (ACLs) when specifying the object type or the inherited object type for the ACE to be removed.

Removes the specified Access Control Entry (ACE) from the current DiscretionaryAcl object.

public void SetAccess(AccessControlType accessType, SecurityIdentifier sid, int accessMask, InheritanceFlags inheritanceFlags, PropagationFlags propagationFlags)

Sets the specified access control for the specified SecurityIdentifier object.

public void SetAccess(AccessControlType accessType, SecurityIdentifier sid, int accessMask, InheritanceFlags inheritanceFlags, PropagationFlags propagationFlags, ObjectAceFlags objectFlags, Guid objectType, Guid inheritedObjectType)

Sets the specified access control for the specified SecurityIdentifier object.

Sets the specified access control for the specified SecurityIdentifier object.