Jun 28 2018 02:32 PM
Hi,
Is it possible to set permissions to a web part written i SPFX?
I mean, say I have a webpart that render a calendar, is possible to allow a specific SharePoint group to see the web part and hide it from the users that are not in the group?
Best regards
Americo
Jun 29 2018 01:01 AM
As far as I know there is no way to hide a certain SPFx-based WebPart based on permissions to prevent users adding it to a page. You could check for permissions in your WebParts logic which makes it possible to alter the way your WebPart appears or behaves at runtime.
Jun 29 2018 02:43 PM
Thanks!
Do you have some link where I can see how it can be done?
Regards
Americo
Jul 02 2018 01:38 AM
The Security Trimmed Control from PnP Reusable Controls should be what you are looking for
https://sharepoint.github.io/sp-dev-fx-controls-react/controls/SecurityTrimmedControl/
If you are new to PnP reusable controls, you can find the information to get started here: https://sharepoint.github.io/sp-dev-fx-controls-react/
Hope this helps :)
Jul 02 2018 04:19 AM
Thanks Joel,
Do you have link to PnP in general? I am new to PnP :)
Best regards
Americo
Jul 02 2018 11:23 AM - edited Jul 02 2018 02:46 PM
SolutionSure @Americo Perez
You can start here:
https://docs.microsoft.com/en-us/sharepoint/dev/community/community
I would extremely recommend that you join the community calls (calendar invites on the link) as you learn all the latest updates and have the chance to see some really great demos. Really worth the time of you can make it.
There is also a youtube channel with lots of useful videos and recording from previous calls
On top of that, you also have lots and lots of project samples, reusable projects and frameworks under the GitHub repository!
Links to all of this available from the initial page, but let me know if you need any help to find something.
cheers,
Joel
Jul 02 2018 01:26 PM
Thanks a lot @Joel Rodrigues !
I will check the link and the information there.
I will send you some messages if I feel that something isn't clear enough form me.
Best regards
Americo
Jul 02 2018 11:23 AM - edited Jul 02 2018 02:46 PM
SolutionSure @Americo Perez
You can start here:
https://docs.microsoft.com/en-us/sharepoint/dev/community/community
I would extremely recommend that you join the community calls (calendar invites on the link) as you learn all the latest updates and have the chance to see some really great demos. Really worth the time of you can make it.
There is also a youtube channel with lots of useful videos and recording from previous calls
On top of that, you also have lots and lots of project samples, reusable projects and frameworks under the GitHub repository!
Links to all of this available from the initial page, but let me know if you need any help to find something.
cheers,
Joel