System.Security.AccessControl.DiscretionaryAcl.SetAccess Method

Sets the specified access control for the specified System.Security.Principal.SecurityIdentifier object.

Syntax

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

Parameters

accessType
The type of access control (allow or deny) to set.
sid
The System.Security.Principal.SecurityIdentifier for which to set an ACE.
accessMask
The access rule for the new ACE.
inheritanceFlags
Flags that specify the inheritance properties of the new ACE.
propagationFlags
Flags that specify the inheritance propagation properties for the new ACE.
objectFlags
Flags that specify if the objectType and inheritedObjectType parameters contain non-null values.
objectType
The identity of the class of objects to which the new ACE applies.
inheritedObjectType
The identity of the class of child objects which can inherit the new ACE.

Remarks

This method removes all existing Access Control Entries (ACEs) that match both specified System.Security.Principal.SecurityIdentifier object and the specified access qualifier (allow or deny).

Requirements

Namespace: System.Security.AccessControl
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 2.0.0.0, 4.0.0.0
Since: .NET 2.0