In the real life development of Sitecore sites, the usage of the Publish Site command ends with a site going live in most cases. It is frequently used during the development phase but after a site is ready for end users, only in some rare situations do Sitecore administrators publish an entire site again.
This is why it's a good idea to consider hiding the Publish Site buttons for all users except the administrator. It's very easy with Sitecore access rights. In a typical Sitecore installation, there are 2 Publish Site buttons:
- in the ribbon within the 'Publish' chunk in the 'Publish' menu,
- in the Sitecore start menu.
In order to hide them, you need to switch the database to Core, run the Security Editor application, select the role sitecore\Sitecore Client Publishing and:
- remove the Read permission from the
sitecore > content > document and settings > all users > start menu > left > publish siteitem,
- deny the Read permission from the
sitecore > content > applications > content editor > menues > publish siteitem.
The image below shows how the access rights should be set in order to hide the Publish Site buttons for all the users except for the admin.
Sitecore Security Editor - setting user access permissionIt will take you no longer than five minutes. Setting the access rights is very easy with Sitecore Security Editor and worth the effort for the peace of mind that comes from knowing that your users can't publish content which is not approved yet, or threaten the stability of your live site.