Destroying a user leaves the user's ledger account, and refuses a user with an omegaquote or a dot with Prisma's own message

Open
#1,216 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
45/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
typescript
Domain
backend

Research direction

Start with src/services/users/operations.ts and read the destroy operation, then trace the related user references and ledger account behavior described in the issue. Decide how deletion should handle those records and account balances; done when the behavior is defined and implemented, including a useful explanation when related rows prevent deletion.

Written by the indexing model from the issue text.

Description

destroy of a user deletes the user, the bio paragraph and the veven mail address, but the user's ledger account stays, with its balance. A user that other rows still point to, for example through an omegaquote, a dot, an application, a locker reservation or a bulshit post, is refused with the generic "Det du viser til finnes ikke, eller noe annet avhenger av det." and nothing is deleted, so the admin is not told what stands in the way.

The question is what destroying a user should do with the account and with those rows: remove them, keep them with no owner, or say which ones stop it.

Found when archive, unarchive and destroy were moved to the users' contract (#1195), which kept the behaviour.

Where: src/services/users/operations.ts (destroy).

Dominant language
TypeScript
Stars
11
Forks
2
PR merge metrics
No merged PRs in 30d

Getting set up

Open in Codespaces

Starts the project's dev container in your browser, under your own GitHub account.

  • Ships a Dockerfile or Docker Compose file
  • No pull request template
  • No contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from vevcom/project-next

All issues in vevcom/project-next

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.