Open snyde664 opened 6 months ago
PR link: https://github.com/usdigitalresponse/cpf-reporter/pull/64 The PR for this ticket has been merged and is currently in staging.
USDR_ADMIN
role.USDR_ADMIN
role, navigating to /organizations
will show a newly added Forbidden page. Forbidden page renders when the current user doesn't have permissions to view that page but is logged in.ORGANIZATION_ADMIN
role assigned to that organization and agency.Role
model to an enumMade a few changes after talking to Aditya
Role
model and replaced it with an enum
. Enums are commonly written in uppercase letters (e.g. USDR_ADMIN
), which is the convention I've followed.roles
array in getCurrentUser()
but changed the string that we're passing to match the enum formatting.Role
field, replacing the previous text field for Role ID
.formatEnum()
function to change how we display user.role
on the frontend (eg. ORGANIZATION_ADMIN
to Organization admin
)New Organization form has its own component, separate from Edit Organization form. By default, Redwood uses the same form for adding and editing but since those 2 forms are quite different, separating the two makes the code more clear.
Why is this issue important?
We need rto be able to create organizations to onboard our partners.
Current State
none
Expected State
The flow should be similar to the "Add Organization" flow in the existing Finder tool as seen here: https://staging.grants.usdr.dev/organizations
The flow should accept the same fields:
Need:
concept of a USDR super-admin in code
Update the “create organization” action to be scoped for the user-super-admin user
Implementation Plan
Follow this
createTenant
function in theusdr-gost
repository: https://github.com/usdigitalresponse/usdr-gost/blob/main/packages/server/src/routes/tenants.js#L24super-admin
Relevant Code Snippets
No response