apache / cloudstack

Apache CloudStack is an opensource Infrastructure as a Service (IaaS) cloud computing platform
https://cloudstack.apache.org/
Apache License 2.0
2.11k stars 1.11k forks source link

Projects listing breaks after deleting a user added to a project. #9974

Open rajujith opened 13 hours ago

rajujith commented 13 hours ago
ISSUE TYPE
COMPONENT NAME
UI,API
CLOUDSTACK VERSION
4.19.1.2
CONFIGURATION

Projects

SUMMARY

Once you deleted a user in 'ROOT admin' role account, the projects can't be listed using UI/API. The deleted user was added to one of the projects.

STEPS TO REPRODUCE
1. Add a user to the 'ROOT admin' Account.
2. Create a project as another account/user in the same domain.
3. Add the user from step 1 to this project as Project Admin.
4. As an 'admin' user delete the above user. 
EXPECTED RESULTS
Deleting a user shouldn't break project access. 
ACTUAL RESULTS
Deleting a user breaks projects access.

Undo the user deletion. ( May not be safe for production) Workaround example: update user set state='disabled',removed=NULL where id=<id>;