Hello Friends,
I want to hide Share, Shared with options from SharePoint 2013 web application. I have hidden some share options using CSS but unable to hide from list, library Ribbon and pop out.
Please suggest me if anyone having better options like power shell or any other.
Thanks,
Ashutosh
Finally I achieve the things by using CSS to hide Share, Follow,Sync from web application:
/* Hide Site Share Follow button from page */
#ctl00_site_share_button {
display:none !important;
}
#ctl00_SyncPromotedAction
{
display:none !important;
}
#site_follow_button
{
display:none !important;
}
#lnkShrItem {
display:none !important;
}
#csfd_invitePeopleBtn {
display:none !important;
}
#ctl00_fullscreenmodeBtn
{
display:none !important;
}
/* Hide Share Options From Library */
#Ribbon\.Documents\.Share\.ShareItem-Large
{
display:none;
}
#Ribbon\.Documents\.Manage-LargeMedium-1-1
{
display:none;
}
#Ribbon\.Library\.Settings\.LibraryPermissions-Large
{
display:none;
}
.js-callout-actionsMain span:nth-child(2) {
display:none !important;
}
.ms-core-menu-list li:nth-child(10){
display:none;
}
/* Hide Share Options From Lists */
#Ribbon\.ListForm\.Display\.Manage-LargeMedium-1-1
{
display:none;
}
#Ribbon\.ListItem\.Manage-LargeMedium-1-1
{
display:none;
}
#Ribbon\.List\.Settings\.ListPermissions-Large
{
display:none;
}
.ms-core-menu-list li:nth-child(8)
{
display:none !important;
}
/* Hide Share Options From Style Library */
.ms-core-menu-list li:nth-child(12)
{
display:none;
}
.ms-core-menu-list li:nth-child(7)
{
display:none;
}
Thanks Amir for your respond !!!
Amir my client want to disable Share and Shared with feature from complete web app to every one. However I disabled option from all places except list/library ribbon.
Can you please suggest how can I remove it from list/library ribbon .
Thanks
Hi,
You can hide SHARE Button at page level as well as Site level.
1. For page level Add script editor webpart to your page and paste below code
<style>
#RibbonContainer-TabRowRight a[id$=site_share_button] {
display: none !important;
}
</style>
2. At site level Go to –> Site Setting–> Site Permission–>Access Request Settings–>Unchecked Allow access requests
Note: It will be always visible for Site Administrator Â
This css doesn’t look is hiding the Share button on the office web app itself, when you click on the document and opens up in the word app and there is Share button. The css file is on the Office Server in WordViewer.css class=”cui-ctl-medium” id=”btnFileSharing-Medium20″
Any thoughts how to remove it ?