I have a site which will have a number of Lists and a Document Library deployed as part of an SPFx application. The Document Library will have a folder hierarchy which must be strictly controlled by the application. When a customer creates a new item in one list (via a UI in an SPFx Web Part - they won't access the list directly), the system should create appropriate folders in the folder hierarchy. The user must then be able to add / edit / delete files in the specific folder they have been provided, but must not be able to add / rename / delete the folders themselves. Later in the lifecycle, a user will be able to mark an item in the list as 'destroyed', at which point the folder and its contents need to be deleted.
After lots of looking around, via Stack Overflow, the various SharePoint GitHub repositories, the SharePoint UserVoice page and many (many!) hours of Googling, it appears that what I'm trying to do with SPFx is not possible.
There were several ways to achieve this with SharePoint on-prem, but SPFx seems to be significantly deficient in this area.
What I've considered already
- Workflow with
- Discounted because we cannot deploy workflows with SPFx, and Microsoft seems to consider classic workflow as deprecated in favour of Microsoft Flow.
- Using SharePoint PnP for separate deployment of classic workflow:
- Discounted because it's a separate deployment from the main app, and as noted above, Microsoft consider classic workflow deprecated in favour of Flow. [updated added based on comments for clarity].
- Microsoft Flow:
- Discounted because the Flow cannot be kept under source control, and does not have independent DEV, UAT and Production environments, so is absolutely not an option for enterprise development.
- A small server-side .NET app hosted on Azure:
- Discounted because this incurs unnecessary complexity and additional cost for something which is a common requirement and should simply be part of the modern development framework.
- Simply hiding the Document Library from the user and from search:
- Discounted because the user also needs to be able to use the OneDrive Sync Client to sync specific sub-folders in the hierarchy to their PC's during the item lifecycle.
What options, if any, exist for elevation of permissions in a SharePoint Framework Web Part, to allow for creation / deletion of folders in a document library outwith the context of the currently logged-in user?
If it's not currently possible at all, then:
- Is this anywhere on the roadmap? There are plenty of people asking similar questions, so it's obviously not an uncommon requirement.
- Is there anything on the roadmap which will allow greater Admin control of Microsoft Flow? Particularly source control, and automated deployment alongside SPFx Apps.