I have added one extra publish target for some reason. I want only admins to see this.This has to be hidden in both the places (publish window and DB switcher) for non admins.
You can achieve this by removing Read
access to the Publish Target
for the users.
- Open the
Security Editor
fromSitecore menu > Security Tools
. - Select the
Everyone
role from theRoles and users
selector - Expand
/sitecore/System/Publishing targets
node - Select the option to remove
Inheritance
from the targets you wish to restrict access to.
The target will now be removed from database switcher and as a Publishing target for your regular users. Any user which is an Administrator will still have these targets available, since admin role ignores all security settings.
If certain roles need to have these targets available, you can grant access to those specific roles by granting "Read" access to them.
-
Does this also hides the publishing target from the Publishing Dialog? – Hishaam Namooya Jul 10 '17 at 13:11
-
1Yes. The publishing targets are just "regular items" in the content tree. If the user does not have read access, the Item Provider will not return them and so they will not be displayed. Make sure you remove inheritance from the Everyone role. – jammykam♦ Jul 10 '17 at 13:13
-