Sitecore 5.0 API

Item.Access Property

Determines if a user has sufficent permissions for an item.

[Visual Basic]
Public ReadOnly Property Access As ItemAccess
[C#]
public Sitecore.SecurityModel.ItemAccess Access {get;}

Remarks

A user has access to an item, if the user has sufficient security permissions and the current workflow state of the item permits the user. Access combines the permissions from both security and workflow state.

The Access framework determine user rights from security and workflow settings.

Example

The following example checks if the current user has both Read and Write access to an item.

{{
public bool UpdateItem(Item item) {
  if (item.Access.CanRead() ## item.Access.CanWrite()) {
    using (new EditContext(item)) {
      item["Text"] += " updated";
    }
  }
}
}}

See Also

Item Class | Sitecore.Data.Items Namespace