Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Domain invitation/ userdomain role consolidate logic #3552

Open
2 tasks
allly-b opened this issue Feb 21, 2025 · 0 comments
Open
2 tasks

Domain invitation/ userdomain role consolidate logic #3552

allly-b opened this issue Feb 21, 2025 · 0 comments
Labels
dev issue is for the dev team

Comments

@allly-b
Copy link
Contributor

allly-b commented Feb 21, 2025

Issue description

The models domain invitations and userdomain roles were made for a less complex system, but now that we have the org model domain invitations and user domain roles are proving to have architectural issues that increase code complexity unnecessarily. Theoretically, we do not need to actually have two different models anymore and we could reduce code complexity by resolving these models into one and getting rid of the concept of a "retrieved" domain invitation.

Some of the problems with these models:

Domain invitations are made when a user is not part of our system yet, and would made to only have 2 states, invited and retrieved, but canceled was added in later. Once and invite is retrieved, keeping it in our system actually makes it harder to reinvite the same user back to a domain again, and we never look at retrieved invites in our code so we really should just remove retrieved invites.

However, we then also have user domain roles which get created with an invite is "retrieved" or when a user is part of the system. User domain roles have a "role" value that is unneeded at this point as it only has the value "manager" and we have no plans to add other roles (nor do we check this value).

In the org model domains views the seperation between these two models also increases the code complexity as you need to check both of them to see how many domains a user (or invited user) is assigned.

Acceptance criteria

Additional context

keep in mind that we have existing data on stable we would not want to lose, this could mean we need to migrate data into a combined table with a script and keep domain invitations and userdomain roles as part of our schema for a little bit in order to validate all data has been migrated appropriately.
Note this means, part of the sub issues should be eventually removing the old tables once all data has been verified (if we determine that combining the tables into one is truly feasible.

Links to other issues

@allly-b allly-b moved this from 👶 New to ⚙ Dev Parking Lot in .gov Product Board Feb 21, 2025
@lizpearl lizpearl moved this from ⚙ Dev Parking Lot to 👶 New in .gov Product Board Feb 25, 2025
@lizpearl lizpearl added the dev issue is for the dev team label Feb 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dev issue is for the dev team
Projects
Status: 👶 New
Development

No branches or pull requests

2 participants