Determines if a user has sufficent permissions for an item.
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.
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";
}
}
}
}}
Item Class | Sitecore.Data.Items Namespace