pnp / sp-dev-fx-extensions

Code samples and developer content targeted towards SharePoint Framework client-side extensions. https://aka.ms/spfx-extensions
MIT License
638 stars 830 forks source link

Fix broken references and user permission check in "react-company-templates" #1378

Closed tmaestrini closed 5 months ago

tmaestrini commented 5 months ago
Q A
Bug fix? yes
New feature? no
New sample? no

What's in this Pull Request?

This PR fixes three incorrect references due to copy-paste errors in the solution template used by the author. Moreover, it addresses an erroneous user permission check to set the correct visibility of the command and "prettifies" some declarations. That said, it changes

  1. the solution id to ensure sure it won't clash with any solution id that is used in another sample extension
  2. the location of the action button of the command set
  3. the component reference of the action button to match the correct extension id used in the manifest
  4. the permission check for the user's permissions on the actual document library There was no security issue in this extension before – the current permission fix implements better user experience: it now hides the command button for any user that has no permission to add documents to the library.

Nevertheless, this update is necessary, otherwise the solution can cause side effects due to incorrect references when using it in production.

tmaestrini commented 5 months ago

Hey @hugoabernier 👋 As I will present this sample in the Viva Connections and SPFx community call on 18 April, I would be very happy if this PR was merged before this deadline. Do you think this would be possible?

tmaestrini commented 5 months ago

Anyone down on this? Please let me know if I have to do anything else...

hugoabernier commented 5 months ago

Anyone down on this? Please let me know if I have to do anything else...

No, you don't need to do anything else but be patient. We usually process the PRs every other weekend.

tmaestrini commented 5 months ago

Thanks for your support, @hugoabernier! 🙌

hugoabernier commented 5 months ago

Thank you @tmaestrini for your update (and your patience)! Awesome!.

Thank you for sharing your sample with others - you rock! 👏🥇👩‍💻

tmaestrini commented 5 months ago

Many thanks to you, @hugoabernier! 🚀