Pregunta

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?

¿Fue útil?

Solución

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

Otros consejos

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

<style>
#Ribbon.Library.Settings.LibraryPermissions-Large,#ID_Share{
pointer-events: none;
}
</style>
Licenciado bajo: CC-BY-SA con atribución
scroll top