publishrolespublishingrightssitecore9

Sitecore 9: Non Admin members are unable to publish items when Publishing.CheckSecurity is set to True


Current Scenario(Sitecore 9) User is not able to publish any item to any publishing target, not even on the web database. We face this issue when we set Publishing.CheckSecurity to true in Sitecore.config.

There is no workflow on the item, User has all (Read, write, delete, create) access on the item.

I dug into Sitecore.Kernel Dll and found the difference

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);
}

Earlier (Sitecore 8.1) “CanPublishLanguage” was not there. I have given all the access on language but still, my items are getting skipped while publishing. The function is returning false.

If I make this setting as false then it is working fine.

Please suggest if I am missing some more config change for this.


Solution

  • This issue is with Sitecore 9 and got fixed in Sitecore 9.0 Update 2. Raised this issue with Sitecore and got the resolution for this.

    The reported issue looks like one that has been fixed in the Sitecore 9.0 Update-2: https://dev.sitecore.net/Downloads/Sitecore%20Experience%20Platform/90/Sitecore%20Experience%20Platform%2090%20Update2/Release%20Notes

    When the Publishing.CheckSecurity setting is set to true, non-admin users are not able to publish content items even when they have all the appropriate security permissions 206940

    To fix the issue we suggest you upgrade your Sitecore solution to the Sitecore XP 9.0 Update 2 (rev. 180604).

    In case it is not possible, you can try the following patch: https://sitecore.box.com/s/swae96e2hhgrbid3keccmvzr4e8kbvr7 To install the patch follow the instructions from the readme file inside the archive.