当前场景(Sitecore 9) 用户无法将任何项目发布到任何发布目标,甚至在 Web 数据库上也是如此。当我们在 Sitecore.config 中将 Publishing.CheckSecurity 设置为 true 时,我们会遇到这个问题。
该项目没有工作流,用户拥有该项目的所有(读取、写入、删除、创建)访问权限。
我挖掘了 Sitecore.Kernel Dll 并发现了不同之处
public bool CanPublish(ID itemId, User user, ref string explanation)
{
Assert.ArgumentNotNull(itemId, “itemId”);
Assert.ArgumentNotNull(user, “user”);
Assert.ArgumentNotNull(explanation, “explanation”);
if (!Settings.Publishing.CheckSecurity)
{
return true;
}
if (!this.CanPublishLanguage(itemId, user, ref explanation))
{
return false;
}
Item sourceItem = this.GetSourceItem(itemId);
if (sourceItem == null)
{
return this.CanPublishDeletion(itemId, user, ref explanation);
}
return this.CanPublishUpdate(sourceItem, user, ref explanation);
}
较早的(Sitecore 8.1)“CanPublishLanguage”不存在。我已经提供了语言的所有访问权限,但我的项目在发布时仍然被跳过。该函数返回false。
如果我将此设置设为假,那么它工作正常。
请建议我是否为此遗漏了更多配置更改。