访问项目时禁用权限检查
using (new Sitecore.SecurityModel.SecurityDisabler())
{
var item = Sitecore.Context.Database.GetItem("/sitecore/content/home");
}
using (new Sitecore.SecurityModel.SecurityDisabler())
{
var item = Sitecore.Context.Database.GetItem("/sitecore/content/home");
}