Skip to content

fix in issue: delete an account belonging to a deleted project#13456

Open
Tonitzpp wants to merge 1 commit into
apache:4.20from
scclouds:delete-account-from-deleted-project
Open

fix in issue: delete an account belonging to a deleted project#13456
Tonitzpp wants to merge 1 commit into
apache:4.20from
scclouds:delete-account-from-deleted-project

Conversation

@Tonitzpp

Copy link
Copy Markdown
Contributor

Description

When a user is added to a project, and this project is then deleted, the user-project mapping is never removed from the database. Thus, when attempting to delete the user's account, an error is returned stating that the account is still linked to a project.

Therefore, this PR deletes the invalid user-project mappings and fixes the project deletion process in CloudStack.

Types of changes

  • Breaking change (fix or feature that would cause existing functionality to change)
  • New feature (non-breaking change which adds functionality)
  • Bug fix (non-breaking change which fixes an issue)
  • Enhancement (improves an existing feature and functionality)
  • Cleanup (Code refactoring and cleanup, that may add test cases)
  • Build/CI
  • Test (unit or integration test code)

Feature/Enhancement Scale or Bug Severity

Bug Severity

  • BLOCKER
  • Critical
  • Major
  • Minor
  • Trivial

Screenshots (if appropriate):

How Has This Been Tested?

  1. A new project belonging to a domain admin account was created and a user was added to it.
  2. In the database, I observed that select * from project_account had the entries for 1 account and 1 user belonging to the project.
  3. I deleted the project.
  4. I the database, using the same command, I observed that the mappings were removed after project deletion.
  5. I deleted the user's account without receiving any errors.

@codecov

codecov Bot commented Jun 19, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 3.53%. Comparing base (ce2d890) to head (ac25417).

❗ There is a different number of reports uploaded between BASE (ce2d890) and HEAD (ac25417). Click for more details.

HEAD has 1 upload less than BASE
Flag BASE (ce2d890) HEAD (ac25417)
unittests 1 0
Additional details and impacted files
@@              Coverage Diff              @@
##               main   #13456       +/-   ##
=============================================
- Coverage     18.89%    3.53%   -15.36%     
=============================================
  Files          6174      464     -5710     
  Lines        555226    40210   -515016     
  Branches      67774     7565    -60209     
=============================================
- Hits         104885     1421   -103464     
+ Misses       438820    38599   -400221     
+ Partials      11521      190    -11331     
Flag Coverage Δ
uitests 3.53% <ø> (ø)
unittests ?

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@Tonitzpp Tonitzpp force-pushed the delete-account-from-deleted-project branch from ac25417 to 4244c2c Compare June 19, 2026 13:38
@Tonitzpp Tonitzpp force-pushed the delete-account-from-deleted-project branch from 4244c2c to 2106a39 Compare June 19, 2026 13:43
@Tonitzpp Tonitzpp changed the base branch from main to 4.20 June 19, 2026 13:43
@winterhazel

Copy link
Copy Markdown
Member

@blueorangutan package

@blueorangutan

Copy link
Copy Markdown

@winterhazel a [SL] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress.

@blueorangutan

Copy link
Copy Markdown

Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ el10 ✔️ debian ✔️ suse15. SL-JID 18316

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

Successfully merging this pull request may close these issues.

3 participants