SPFx web part similar to the Quick Links web part which check if the user have permission on the rel

Steel Contributor

I am working on a project to build a portal inside SharePoint online. Now i got this requirement:-

  • To build a quick links web part in React SPFx (similar to the built-in modern Quick Links)
  • But this quick links can contain links to internal applications that can only be accessed using VPN.
  • So if the user access the SharePoint online home page without VPN >> the quick links should hide all the links which the user does not have access to.
  • Also if the user access the SharePoint using VPN and the user does not have permission to the internal system (the user will get http 401 or will be prompted with a dialog to enter username and password) to hide the links as well.

So in other words, the SPFx web part need to send a request to the link url, and if it get http code other than "2xx success" to hide the link.

Can anyone advice how to build such a web part please?

Thanks

0 Replies