0

How to enable\disable button "Share" documeny library?

enter image description here

1

If you only want disable and hide “Share” Menu Item in SharePoint Document Library, you should do the following:

enter image description here

1.Open your SharePoint Site.

2.Navigate to your document library that you would like to disable and hide the “Share” menu item.

3.Click on the Right Setting Gear icon >> Edit the Page.

4.Click “Add Web Part” >> “Media and Content” >> Add “Script Editor Web Part” >> “Edit Snippet”.

enter image description here

5.Copy the below CSS, and paste it to your script editor.

<style>
.ms-contextmenu-link[title="Shared With"] {
    pointer-events: none;
        display:none !important;
    opacity: 0.6;
}
</style>

enter image description here

If you want display and hide all “Share” buttons in Document Library, you should copy the below CSS, and paste it to the script editor web part.

<style>

#Ribbon\.Library\.Settings\.LibraryPermissions-Large,
#Ribbon\.Library\.Settings\.LibraryPermissions-Medium,
#Ribbon\.Library\.Settings\.LibraryPermissions-Small,
#Ribbon\.Documents\.Manage\.ManagePermissions-Medium,
#Ribbon\.Documents\.Share\.ShareItem-Large,
.js-listview-qcbShareButton,
.ms-calloutLink[title="Share file or folder with other person or group"],
.ms-contextmenu-link[title="Shared With"] {
    pointer-events: none;
        display:none !important;
    opacity: 0.6;
}

</style>

Reference:

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.