SharePoint / sp-dev-training-spfx-extensions

SharePoint Framework training package - Getting Started with SharePoint Framework Extensions
MIT License
25 stars 15 forks source link

Microsoft Stream Page Customization #86

Open ahmadihsan opened 4 months ago

ahmadihsan commented 4 months ago

I have several videos stored in my OneDrive 'My Files' library that I've shared with specific users. Although they can access these videos, I want to restrict their ability to further share them with others inside Microsoft Stream by hiding the share button. I haven't found an out-of-the-box solution to hide the share button on the Stream page. Therefore, I was wondering if it's possible with an SPFx application customizer. However, I've attempted this, but the extension doesn't load within the Stream page. I can see the impact of SPFX extension on SharePoint online modern pages but not on Stream page where users watch videos. Is there any way to prevent users from sharing the video files with others using SPFX?

cardinalpipkin commented 4 months ago

I'm after something similar - I want to hide the Export to Excel in a SharePoint list.

ahmadihsan commented 4 months ago

I'm after something similar - I want to hide the Export to Excel in a SharePoint list.

Well in your case, it's possible. Just follow below steps:

  1. Click on Settings Gear >> Choose the “Site Permissions” link.
  2. Click on “Advanced permissions settings.” >> Click on “Permission Levels” from the ribbon.
  3. Select an existing permission level such as Contribute or Read >> Scroll to the bottom of the page >> Click on the “Copy Permission` Level” button.
  4. Provide a name for your new permission level. E.g., “Read without Client Integration”. Under “Site Permissions”, uncheck “Use Client Integration Features – Use features which launch client applications. Without this permission, users will have to work on documents locally and upload their changes.” and click on “Create” button to create the permission level. create permission level without Client Integration Features.
  5. Assign this custom permission level to users and groups who don’t need the “Export to Excel” option. Make sure the users are not part of any other higher permission groups on the site (Because SharePoint permissions work in a cumulative manner!).

Reference: Disable Export-to-Excel

cardinalpipkin commented 4 months ago

My problem is that I need to disable them by using a site template, which is executed by a powershell script. I looked at the site you showed and have built an spfx extension but the CSS option doesn't work. It's not possible to set permissions using JSON within the PS script either.