7

I need to prevent certain roles from publishing sub-items.

I was able to hide the 'Sub-items' option in the publish dialog by revoking 'Read' from '/sitecore/system/Settings/Security/Policies/Publish/Can Perform Republish' under Core DB.

However, if the last time that user published with the sub-items 'checked' it will still publish with subitems even after revoking the 'Can Perform Republish'.

So the option is hidden but its value is still checked!!! Is this expected or is it a bug in Sitecore?

Sitecore 8.1

  • 1
    I would say that the actual bug in Sitecore is the fact that "Publish subitems" disappears when "Can Perform Republish" is denied. Republishing and publishing subitems are two different things. – Dmytro Shevchenko Oct 18 '16 at 13:36
  • Ahhh.. You're probably right. Any other suggestions? – TamerM Oct 18 '16 at 14:01
4

What you are trying to do here is actually better accomplished through Workflow.

Using Workflow

  • Remove the target users from the Sitecore Client Publishing role(s).

  • Add a Workflow Action to the final Workflow step that automatically publishes the Item version that was just finalized.

An example of this setup is provided in the Workflow included in a new Sitecore installation.

2

The solution I used was the publishing Roles (as in the description) in addition to a workaround for the bug in Sitecore mentioned above. You can find the full solution here

Update:

In short, the workaround to overcome the bug in Sitecore was to override Sitecore's 'PublishForm' and uncheck the publish with sub-items checkbox by default. So every time the publish dialog is opened the 'Publish with sub-items' checkbox is NOT checked.

0

This is not possible "out of the box", in my opinion. Peeking the code that is handling this form wizard Sitecore.Shell.Applications.Dialogs.Publish.PublishForm,Sitecore.Client there is no option to be dynamic somehow with this checkbox option on the form. It means, the only option how to achieve your goal is to make your custom form that will be replacing the original Sitecore's one. Than you can apply your new publish policy for example in the similar manner as Sitecore does.

BTW, I would say this checkbox is showing only in case you have chosen Publish Item option, it's not present in Publish Site by principle.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.