DiscretionaryAcl.SetAccess DiscretionaryAcl.SetAccess DiscretionaryAcl.SetAccess DiscretionaryAcl.SetAccess Method

Definition

Sets the specified access control for the specified SecurityIdentifier object.

Overloads

SetAccess(AccessControlType, SecurityIdentifier, ObjectAccessRule) SetAccess(AccessControlType, SecurityIdentifier, ObjectAccessRule) SetAccess(AccessControlType, SecurityIdentifier, ObjectAccessRule) SetAccess(AccessControlType, SecurityIdentifier, ObjectAccessRule)

Sets the specified access control for the specified SecurityIdentifier object.

SetAccess(AccessControlType, SecurityIdentifier, Int32, InheritanceFlags, PropagationFlags) SetAccess(AccessControlType, SecurityIdentifier, Int32, InheritanceFlags, PropagationFlags) SetAccess(AccessControlType, SecurityIdentifier, Int32, InheritanceFlags, PropagationFlags)

Sets the specified access control for the specified SecurityIdentifier object.

SetAccess(AccessControlType, SecurityIdentifier, Int32, InheritanceFlags, PropagationFlags, ObjectAceFlags, Guid, Guid) SetAccess(AccessControlType, SecurityIdentifier, Int32, InheritanceFlags, PropagationFlags, ObjectAceFlags, Guid, Guid) SetAccess(AccessControlType, SecurityIdentifier, Int32, InheritanceFlags, PropagationFlags, ObjectAceFlags, Guid, Guid)

Sets the specified access control for the specified SecurityIdentifier object.

Remarks

These methods remove all existing Access Control Entries (ACEs) that match both specified SecurityIdentifier object and the specified access qualifier (allow or deny).

SetAccess(AccessControlType, SecurityIdentifier, ObjectAccessRule) SetAccess(AccessControlType, SecurityIdentifier, ObjectAccessRule) SetAccess(AccessControlType, SecurityIdentifier, ObjectAccessRule) SetAccess(AccessControlType, SecurityIdentifier, ObjectAccessRule)

Sets the specified access control for the specified SecurityIdentifier object.

public:
 void SetAccess(System::Security::AccessControl::AccessControlType accessType, System::Security::Principal::SecurityIdentifier ^ sid, System::Security::AccessControl::ObjectAccessRule ^ rule);
public void SetAccess (System.Security.AccessControl.AccessControlType accessType, System.Security.Principal.SecurityIdentifier sid, System.Security.AccessControl.ObjectAccessRule rule);
member this.SetAccess : System.Security.AccessControl.AccessControlType * System.Security.Principal.SecurityIdentifier * System.Security.AccessControl.ObjectAccessRule -> unit
Public Sub SetAccess (accessType As AccessControlType, sid As SecurityIdentifier, rule As ObjectAccessRule)

Parameters

accessType
AccessControlType AccessControlType AccessControlType AccessControlType

The type of access control (allow or deny) to set.

SetAccess(AccessControlType, SecurityIdentifier, Int32, InheritanceFlags, PropagationFlags) SetAccess(AccessControlType, SecurityIdentifier, Int32, InheritanceFlags, PropagationFlags) SetAccess(AccessControlType, SecurityIdentifier, Int32, InheritanceFlags, PropagationFlags)

Sets the specified access control for the specified SecurityIdentifier object.

public:
 void SetAccess(System::Security::AccessControl::AccessControlType accessType, System::Security::Principal::SecurityIdentifier ^ sid, int accessMask, System::Security::AccessControl::InheritanceFlags inheritanceFlags, System::Security::AccessControl::PropagationFlags propagationFlags);
public void SetAccess (System.Security.AccessControl.AccessControlType accessType, System.Security.Principal.SecurityIdentifier sid, int accessMask, System.Security.AccessControl.InheritanceFlags inheritanceFlags, System.Security.AccessControl.PropagationFlags propagationFlags);
member this.SetAccess : System.Security.AccessControl.AccessControlType * System.Security.Principal.SecurityIdentifier * int * System.Security.AccessControl.InheritanceFlags * System.Security.AccessControl.PropagationFlags -> unit

Parameters

accessType
AccessControlType AccessControlType AccessControlType AccessControlType

The type of access control (allow or deny) to set.

accessMask
Int32 Int32 Int32 Int32

The access rule for the new ACE.

inheritanceFlags
InheritanceFlags InheritanceFlags InheritanceFlags InheritanceFlags

Flags that specify the inheritance properties of the new ACE.

propagationFlags
PropagationFlags PropagationFlags PropagationFlags PropagationFlags

Flags that specify the inheritance propagation properties for the new ACE.

Remarks

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

SetAccess(AccessControlType, SecurityIdentifier, Int32, InheritanceFlags, PropagationFlags, ObjectAceFlags, Guid, Guid) SetAccess(AccessControlType, SecurityIdentifier, Int32, InheritanceFlags, PropagationFlags, ObjectAceFlags, Guid, Guid) SetAccess(AccessControlType, SecurityIdentifier, Int32, InheritanceFlags, PropagationFlags, ObjectAceFlags, Guid, Guid)

Sets the specified access control for the specified SecurityIdentifier object.

public:
 void SetAccess(System::Security::AccessControl::AccessControlType accessType, System::Security::Principal::SecurityIdentifier ^ sid, int accessMask, System::Security::AccessControl::InheritanceFlags inheritanceFlags, System::Security::AccessControl::PropagationFlags propagationFlags, System::Security::AccessControl::ObjectAceFlags objectFlags, Guid objectType, Guid inheritedObjectType);
public void SetAccess (System.Security.AccessControl.AccessControlType accessType, System.Security.Principal.SecurityIdentifier sid, int accessMask, System.Security.AccessControl.InheritanceFlags inheritanceFlags, System.Security.AccessControl.PropagationFlags propagationFlags, System.Security.AccessControl.ObjectAceFlags objectFlags, Guid objectType, Guid inheritedObjectType);
member this.SetAccess : System.Security.AccessControl.AccessControlType * System.Security.Principal.SecurityIdentifier * int * System.Security.AccessControl.InheritanceFlags * System.Security.AccessControl.PropagationFlags * System.Security.AccessControl.ObjectAceFlags * Guid * Guid -> unit

Parameters

accessType
AccessControlType AccessControlType AccessControlType AccessControlType

The type of access control (allow or deny) to set.

accessMask
Int32 Int32 Int32 Int32

The access rule for the new ACE.

inheritanceFlags
InheritanceFlags InheritanceFlags InheritanceFlags InheritanceFlags

Flags that specify the inheritance properties of the new ACE.

propagationFlags
PropagationFlags PropagationFlags PropagationFlags PropagationFlags

Flags that specify the inheritance propagation properties for the new ACE.

objectFlags
ObjectAceFlags ObjectAceFlags ObjectAceFlags ObjectAceFlags

Flags that specify if the objectType and inheritedObjectType parameters contain non-null values.

objectType
Guid Guid Guid Guid

The identity of the class of objects to which the new ACE applies.

inheritedObjectType
Guid Guid Guid Guid

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 SecurityIdentifier object and the specified access qualifier (allow or deny).

Applies to