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

Support user deletion #6474

Open
begelundmuller opened this issue Jan 22, 2025 · 4 comments
Open

Support user deletion #6474

begelundmuller opened this issue Jan 22, 2025 · 4 comments
Assignees

Comments

@begelundmuller
Copy link
Contributor

begelundmuller commented Jan 22, 2025

Proposed changes:

  1. Add an RPC on the AdminService for deleting a user
    • Normal users should only be able to delete their own user
    • Superusers should be allowed to delete any user
  2. Handle the case where the user being deleted is the only remaining admin of an org
    • Error if the org has other members
    • If the org has no other members, it should tear down the org and all its projects
  3. Add a command rill sudo user remove <email> that superusers can use to invoke the RPC to delete any user

See this Slack thread for context.

@grahamplata
Copy link
Contributor

grahamplata commented Jan 23, 2025

Proposed changes:

  • Add an RPC on the AdminService for deleting a user
    • Normal users should only be able to delete their own user
    • Superusers should be allowed to delete any user
  • Add a command rill sudo user remove that superusers can use to invoke the RPC to delete any user
  • Handle the case where the user being deleted is the only remaining admin of an org
    • Error if the org has other members
    • If the org has no other members, it should tear down the org and all its projects

@grahamplata
Copy link
Contributor

If the org has no other members, it should tear down the org and all its projects

For the above I think it could be better handled as an error and subsequent flow. ~

cc @begelundmuller

@begelundmuller
Copy link
Contributor Author

begelundmuller commented Jan 27, 2025

For the above I think it could be better handled as an error and subsequent flow. ~

What do you mean by a subsequent flow?

But I'm definitely open to doing it outside the RPC, e.g. by kicking off an async job or having a periodic background job that cleans up orphaned orgs/projects. But I also don't mind if you prefer to do it sync in the RPC as long as the implementation is idempotent/retryable (slowness is okay since user deletion isn't going to happen very often).

@grahamplata
Copy link
Contributor

"slowness is okay since user deletion isn't going to happen very often"

That was where the thought was coming from.

Knowing that I'll do it within the RPC

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants