Automattic / Automattic/wp-calypso
Users that own upgrades can be removed from sites
- Dominant language
- TypeScript
- Stars
- 12.6k
- Forks
- 2k
- Avg merge
- 1d 17h
- Merged PRs (30d)
- 552
Description
#### Steps to reproduce
1. Create a free [WordPress.com]() site
2. Add a new administrator to the site
3. As the new administrator, purchase a site upgrade
4. As the new administrator, attempt to remove the site owner
5. As the site owner, remove the new administrator who owns the upgrade
6. As the new administrator, attempt to renew or manage the upgraded purchase
#### What I expected
When removing the site owner, an error is returned:

This would be the preferred behavior when an attempt is made to remove a user that owns an upgrade, as well.
#### What happened instead
Instead, the upgrade owner is removed:

And that user can't access the site to manage the plan that they own:

The site owner can't access it as well.

This leaves the site in a state where the plan can't be renewed without several steps involving coordinating with support to resolve the issue.
The better solution would be to prevent the user from being removed and giving the user the reason why they can't be removed (they own the upgrade(s) to the account) and what can be done if they need to be removed (transfer ownership of the upgrade(s) first).
#### Browser / OS version
Browser-independent
#### Screenshot / Video
Above
#### Context / Source
This has come up at different times, especially in the Account Recovery queue.
Two recent examples are 1443076-zen and 1392450-zen
Contributor guide
Research direction
No files, tests, or entry points are named. Start by tracing the site-user removal flow and the upgrade ownership checks from the reproduction steps. Done means a user who owns upgrades cannot be removed, receives the reason, and is told to transfer upgrade ownership first.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- authorization, payments
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100