DevelopingSpace / starchart

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

De-active User button in Admin table does nothing #580

Closed humphd closed 1 year ago

humphd commented 1 year ago

We have a button to de-active a user in app/components/admin/users-table.tsx, but it does nothing. This needs to get fixed before 1.0a.

humphd commented 1 year ago

Steps:

  1. Delete the user record, which will delete all associated records in other tables (via cascade in prisma schema)
  2. Trigger the reconciler to run again next time: await this https://github.com/DevelopingSpace/starchart/blob/4aa771f03ee52d3750077f2356c09ec4127f9898/app/models/system-state.server.ts#L37 and pass true
sfrunza13 commented 1 year ago

Lines 62 onwards in user.server.ts delete user by username

https://github.com/DevelopingSpace/starchart/blob/4aa771f03ee52d3750077f2356c09ec4127f9898/app/models/user.server.ts#L62-L64

export async function deleteUserByUsername(username: PrismaUser['username']) { return prisma.user.delete({ where: { username } }); }

humphd commented 1 year ago

Did this not get closed by #607? @Myrfion why is this issue still open?

Myrfion commented 1 year ago

My bad, I attached some older issue to that PR, closing this one, was resolved in #607