Вопрос

I need to disable Shared With option from the ribbon and the sharing of an item for all users:

enter image description here

enter image description here

I used these two PowerShell commands but that doesn't work:

Disable-SPFeature -Identity "FollowingContent" -URL $web

and

$web.RequestAccessEmail = ""

I checked the $web.RequestAccessEnabled = false

Any idea?

Это было полезно?

Решение

Disabling Access Request Settings would help you to

  • Disallow members to share and invite others to this site,
  • Disallow access requests to unauthorized members.
  • Limit some SharePoint sharing functionality for specific members.

But, it's not considered a solution to hide or disable the “Shared With” or the “Share” Menu Item for all users. Instead, you should use CSS!

enter image description here

Другие советы

Try to use css to prohibit these two buttons from being clickable:

<style>
#Ribbon.Library.Settings.LibraryPermissions-Large,#ID_Share{
pointer-events: none;
}
</style>
Лицензировано под: CC-BY-SA с атрибуция
Не связан с sharepoint.stackexchange
scroll top