Redigera

Dela via


CommonAcl Class

Definition

Represents an access control list (ACL) and is the base class for the DiscretionaryAcl and SystemAcl classes.

public ref class CommonAcl abstract : System::Security::AccessControl::GenericAcl
public abstract class CommonAcl : System.Security.AccessControl.GenericAcl
type CommonAcl = class
    inherit GenericAcl
Public MustInherit Class CommonAcl
Inherits GenericAcl
Inheritance
CommonAcl
Derived

Remarks

Canonical order is maintained according to the following algorithm:

  • Explicit ACEs take precedence over inherited ACEs; this rule applies to both DACLs and SACLs.

  • In DACLs, among the explicit ACEs, ACEs that deny access take precedence over ACEs that allow access. For directory object ACLs, the nonobject ACEs come before object ACEs.

  • All common ACEs take precedence over noncommon ACEs.

  • Inherited ACEs maintain their relative order after canonicity.

  • Unrecognized and custom ACEs are disallowed in both DACLs and SACLs.

  • Within contiguous ranges (explicit AccessDenied and AccessAllowed ACEs on DACLs, all explicit ACEs on SACLs), the ACEs are sorted by using the CompareTo methods of the SecurityIdentifier objects associated with the ACEs.

Adjacent ACEs are combined, if appropriate. This reduces the size of the ACL without affecting the access control semantics it grants.

Properties

BinaryLength

Gets the length, in bytes, of the binary representation of the current CommonAcl object. This length should be used before marshaling the access control list (ACL) into a binary array by using the GetBinaryForm(Byte[], Int32) method.

Count

Gets the number of access control entries (ACEs) in the current CommonAcl object.

IsCanonical

Gets a Boolean value that specifies whether the access control entries (ACEs) in the current CommonAcl object are in canonical order.

IsContainer

Sets whether the CommonAcl object is a container.

IsDS

Sets whether the current CommonAcl object is a directory object access control list (ACL).

IsSynchronized

This property is always set to false. It is implemented only because it is required for the implementation of the ICollection interface.

(Inherited from GenericAcl)
Item[Int32]

Gets or sets the CommonAce at the specified index.

Revision

Gets the revision level of the CommonAcl.

SyncRoot

This property always returns null. It is implemented only because it is required for the implementation of the ICollection interface.

(Inherited from GenericAcl)

Methods

CopyTo(GenericAce[], Int32)

Copies each GenericAce of the current GenericAcl into the specified array.

(Inherited from GenericAcl)
Equals(Object)

Determines whether the specified object is equal to the current object.

(Inherited from Object)
GetBinaryForm(Byte[], Int32)

Marshals the contents of the CommonAcl object into the specified byte array beginning at the specified offset.

GetEnumerator()

Retrieves an object that you can use to iterate through the access control entries (ACEs) in an access control list (ACL).

(Inherited from GenericAcl)
GetHashCode()

Serves as the default hash function.

(Inherited from Object)
GetType()

Gets the Type of the current instance.

(Inherited from Object)
MemberwiseClone()

Creates a shallow copy of the current Object.

(Inherited from Object)
Purge(SecurityIdentifier)

Removes all access control entries (ACEs) contained by this CommonAcl object that are associated with the specified SecurityIdentifier object.

RemoveInheritedAces()

Removes all inherited access control entries (ACEs) from this CommonAcl object.

ToString()

Returns a string that represents the current object.

(Inherited from Object)

Explicit Interface Implementations

ICollection.CopyTo(Array, Int32)

Copies each GenericAce of the current GenericAcl into the specified array.

(Inherited from GenericAcl)
IEnumerable.GetEnumerator()

Returns a new instance of the AceEnumerator class cast as an instance of the IEnumerator interface.

(Inherited from GenericAcl)

Extension Methods

Cast<TResult>(IEnumerable)

Casts the elements of an IEnumerable to the specified type.

OfType<TResult>(IEnumerable)

Filters the elements of an IEnumerable based on a specified type.

AsParallel(IEnumerable)

Enables parallelization of a query.

AsQueryable(IEnumerable)

Converts an IEnumerable to an IQueryable.

Applies to