Access Control List (list of access permissions) of the type AccessControlList.

Namespace:  EPiServer.Core
Assembly:  EPiServer (in EPiServer.dll) Version: 5.2.375.236

Syntax

C#
public AccessControlList ACL { get; set; }

Remarks

ACL holds the Access Control List for a PageData object. Since PageData has the attribute Property which is a PropertyDataCollection, ACL effectively controls access to the Web page. Keep in mind that the Access Control List applies to all of the PageData object and its attributes. It is not possible to have different access permissions for different properties.

The Acccess Control List is comprised of an Access Control Entry, ACE, array and is accessed by calling the method ACL.ToRawACEArray.

Examples

The following code example demonstrates the usage of ToRawACEArray to enumerate the Access Control Entries. The example enumerates the RawACE objects, which together form the Access Control List and check if one of them is the Create permission.

CopyC#
foreach ( EPiServer.Security.RawACE Ace in CurrentPage.ACL.ToRawACEArray() ) 
{
    if ( ( Ace.Access & EPiServer.Security.AccessLevel.Create ) == EPiServer.Security.AccessLevel.Create ) 
    {
        // Do something
    }
}

The following code example demonstrates the usage of QueryDistinctAccess to check specific access for the current user.

CopyC#
if ( CurrentPage.ACL.QueryDistinctAccess( EPiServer.Security.AccessLevel.Create ) ) 
{
    // Checks whether the currently logged-on user has
    // create permission for the current page.
}

See Also