Closed ydescortes closed 9 months ago
Hi. We'll discuss internally. Not quite sure if it would make it into v3 as we're actively working on and close to releasing v4. We would welcome a PR if you wanted to do one
I will say that your approach works, but could be simplified. You could technically achieve the same behavior doing this...
await Item(sp.web.getFolderByServerRelativePath(`ITEM PATH`).listItemAllFields).breakRoleInheritance();
.
Closing this issue as answered. If you have additional questions or we did not answer your question, please open a new issue, ref this issue, and provide any additional details available. Thank you!
We discussed internally, and decided the recommended approach was a fine approach.
This issue is locked for inactivity or age. If you have a related issue please open a new issue and reference this one. Closed issues are not tracked.
Target environment
All
Additional environment details
I'm using pnp/js in sharepoint framework and nodejs environment (webpart context or certificate azure AD authentication)
Enhancement Idea
When i use breakroleinheritance on folder item or file item, i need to write :
which need 2 requests
the SharePoint rest api url knows that endpoint : _api/web/getFolderByServerRelativePath(
ITEM PATH
)/listitemallfields/breakroleinheritance(copyRoleAssignments=true,clearSubscopes=true) which require only one requestCan you add it natively to pnp ? now i have to use the following code :
thx