GTBitsOfGood / GTBitsOfGood/VolunTrack

Updating User Creation to Account for Potential Approval Flow

Open
#520 0 comments 0 reactions 1 assignee Claimed by @jxchen21 View on GitHub
Dominant language
JavaScript
Stars
12
Forks
8
PR merge metrics
No merged PRs in 30d

Description

## Context

- We need to update the POST to `/api/users` that creates users:
1. Get organization by orgCode
2. Check if organization.requiresUserApproval
3. If requiresUserApproval === true:
- Set user.approvalStatus = "pending"
- Validate registrationFormResponses against org.userRegistrationForm
- Create UserRegistrationResponse document
4. If requiresUserApproval === false:
- Set user.approvalStatus = "approved" (default)
5. Create user
6. Return success with approvalStatus

## Requirements

- Complete the above flow
- You are dependent on https://github.com/GTBitsOfGood/VolunTrack/issues/518 so work with that dev appropriately and as needed. Reference that ticket for namings in the meantime to get the bulk of the work done.

## Acceptance Criteria

- [ ] Completed update to `/api/users`

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.