DevelopingSpace / starchart

A self-serve tool for managing custom domains and certificates
MIT License
21 stars 13 forks source link

Remove deactivated field from User table + associated code in backend/frontend #584

Closed humphd closed 1 year ago

humphd commented 1 year ago

We need to remove https://github.com/DevelopingSpace/starchart/blob/main/prisma/schema.prisma#L17, and we'll test doing a migration at the same time.

We'll also need to remove all the code that is checking if a user is deactivated.

Let's do this after 1.0a, when we get the db baseline in place.

humphd commented 1 year ago

We think that it's fine to let the certificate flow (or other flows) that are in-flight when a user is deleted continue, since they will fail. However, we should probably throw an error if we request a user from the user model and this user no longer exists:

https://github.com/DevelopingSpace/starchart/blob/main/app/models/user.server.ts#L14-L26

@cychu42 suggests using findUniqueOrThrow(). Need to confirm that this won't cause issues with @sfrunza13's effective user logic.

humphd commented 1 year ago

@cychu42 is suggesting doing this today.