Class AccessAttribute
Defines the ACL list for a typed ContentType.
Inheritance
Implements
Inherited Members
Namespace: EPiServer.DataAnnotations
Assembly: EPiServer.dll
Version: 8.11.0Syntax
[AttributeUsage(AttributeTargets.Class, AllowMultiple = false)]
public class AccessAttribute : Attribute, _Attribute
Remarks
This attribute only has effect if it is paired with the ContentTypeAttribute. The values from this attribute are used to create the ACL list on the ContentType object. Access rights can be set for Users, Roles and Visitor groups.
Refer to "Attributes" and "Pages, Page Types and Page Templates" under "Content" in the Developer Guide for more information and examples.
Examples
Here is an example on how you can set access on your page type using the Access attribute.
Constructors
AccessAttribute()
Initializes a new instance of the AccessAttribute class.
Declaration
public AccessAttribute()
Properties
Access
Gets the access level.
Declaration
public AccessLevel Access { get; set; }
Property Value
Type | Description |
---|---|
AccessLevel |
NameSeparator
Gets or sets the characters used to separate the names for the users, roles, and visitor groups. Default value is ",".
Declaration
public string NameSeparator { get; set; }
Property Value
Type | Description |
---|---|
System.String |
Roles
Gets the names of the roles that has the access level
Declaration
public string Roles { get; set; }
Property Value
Type | Description |
---|---|
System.String |
Users
Gets the names of the users that has the access level
Declaration
public string Users { get; set; }
Property Value
Type | Description |
---|---|
System.String |
VisitorGroups
Gets the names of the visitor groups that has the access level
Declaration
public string VisitorGroups { get; set; }
Property Value
Type | Description |
---|---|
System.String |