Question

On our 2013 SharePoint we have set access limitations on specific webparts in the web part gallery so our users weren't presented with this and that webpart, which they did not know how to use.

I've tried Googling and testing whether this same access restrictions are possible in SharePoint Online on Modern Sites, but I can't seem to find it.

I suppose that is because it is not possible and all webparts will always be presented to all users?

Was it helpful?

Solution

It is impossible to restrict access to web parts in modern page:

Here is an article about Supported and unsupported customizations for "modern" pages for your reference:

https://docs.microsoft.com/en-us/sharepoint/dev/solution-guidance/modern-experience-customizations-customize-pages

OTHER TIPS

It may be possible to hide web parts from certain users by adding a security trimmed stylesheet (or js file) that targets the ones you don't want to give access to. For example this would hide a specific web part from my site's web part adder:

.flexBox_d002ed86.flexBox_45a79255 {display:none;}

You would need to add the SPFX extension that allows you to inject sitewide stylesheets that you can find here: https://tahoeninjas.blog/2018/05/08/inject-custom-css-on-sharepoint-modern-pages-using-spfx-extensions/

And then lock down your custom stylesheet to a specific group. Big miss from Msft - seems like a no brainer this should be a ui option.

Licensed under: CC-BY-SA with attribution
Not affiliated with sharepoint.stackexchange
scroll top