This repository has been archived by the owner on Dec 13, 2022. It is now read-only.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Adding user based access
By using the forms api prototype this branch explores what would be required to add user based access to the digital form builder.
This will describe the current state at opening the PR, with comments describing any updates that are done going forward
Persistence layer
The forms API prototype acts as the new persistence layer option alongside the existing options. This gives the ability to do user based access as you can send a user token alongside any request to get/submit for a particular user.
Designer
API Persistence service
Adds a new persistence service that uses the forms API, replicating the endpoints that were previously on the runner. This also adds some additional methods to perform actions "by user"
Selecting a user
As an initial pass - there is a small user picker displayed at the top of the page that lets you "login" to the user you want.
This works by setting a cookie to define which user you are logged in as, which can then be passed to the API persistence service.
Runner
Forms API integration
Pulls data from the Forms API instead of using locally stored forms files. As the API doesn't currently have a concept of "publishing", this can only get the forms saved when no user is created.