codeforboston / codeforboston/maple
Legislator Profile - Add Legislator Profile Type
- Dominant language
- TypeScript
- Stars
- 56
- Forks
- 175
- Avg merge
- 2d 5h
- Merged PRs (30d)
- 13
Description
## Summary
As part of our effort to roll out Legislator Profiles, we want to enable elected officials to claim MAPLE accounts linked directly to their Legislative Profile (so they can enhance their pages with additional information and submit testimony). To that end, let's add a new "LEGISLATOR" profile type - that will be associated directly with a specific legislator at account creation.
## Success Criteria
- [ ] Add a `LEGISLATOR` profile type (alongside `USER`/`ORG`)
- [ ] `LEGISLATOR` accounts will be associated with a specific `memberCode` from the MA Legislature API (e.g. `KAD0`) and store a few additional fields relevant only to Legislators (e.g. `legislatorBiography`, `keyPriorities`, `memberCode`)
- [ ] Allow users to select `LEGISLATOR` as an account option when creating a new account (like `USER` or `ORG`)
- [ ] Legislator Accounts must also select a legislator (from the current general court) at account creation
- [ ] Can use a Member Search Index-based dropdown like the one on the Edit Profile page
- [ ] The `memberCode` should be stored on the profile
- [ ] Similar to the (disabled) `ORG` request flow, new `LEGISLATOR` accounts should first be put into a `PENDING_LEGISLATOR` state. Just like with orgs, admins on our side will manually review new account requests and approve/deny them as appropriate. That flow is handled in a separate ticket.
- [ ] The `type` and `memberCode` of a `LEGISLATOR` profile should *not* be editable by the user after account creation
- [ ] The new option should be hidden behind the `legislators` feature flag
## Open Questions ( for @mvictor55 )
- Should we mandate a statehouse email (e.g. `@mahouse.gov` or `@masenate.gov`) for this accounts as a validation measure? We'll want staffers to be able to make this profile for their boss - will they have access to these emails for setup?
- Should Legislator-type profiles have access to the regular profile page in addition to the new and enhanced Legislator profile page, or should we just have the current profile page redirect to the new one for LEGISLATOR accounts?
- Legislator statehouse email addresses are available through the MA Legislature API - if someone signs up for an account with one of those emails and completes email verification, can we skip the manual verification step?
## Additional Links
- Mockup for Legislator Profile: https://maple-leg-profiles.netlify.app/
Contributor guide
Assessment
This issue has not been assessed yet.