passbolt_api icon indicating copy to clipboard operation
passbolt_api copied to clipboard

User can't be deleted because (s)he is the sole owner of shared content

Open zbrag opened this issue 2 years ago • 3 comments

  • Passbolt Version: 3.6.0
  • Platform and Target: -- Operating system: Alma Linux -- PHP: 7.4 -- Web server: Nginx -- Database server: mariadb 10.3

What you did

I am trying to delete a user

What happened

the screen turns to black (dark theme), in the logfile there is a line 2023-10-04 13:38:05 error: [App\Error\Exception\CustomValidationException] The user cannot be deleted. The user should not be sole owner of shared content, transfer the ownership to other users. in /var/www/vhosts/simba.vzw.io/httpdocs/src/Controller/Users/UsersDeleteController.php on line 194

What you expected to happen

I expected a dialog which tells me which passwords should get a new owner.

I've checked the releasenotes, and I don't see any mention of this issue.

zbrag avatar Oct 04 '23 13:10 zbrag

Hello @zbrag,

Sorry to read you are facing an issue while trying to delete a user.

Prior to mark the ticket as a bug, there are 2 things that could be done:

  1. Check for data integrity issue (and fix)

sudo -u www-data /usr/share/php/passbolt/bin/cake passbolt cleanup --dry-run

If it outputs an error, you can fix it reusing the same command without the --dry-run argument.

  1. Upgrade the API to a recent version

The v3.6.0 is more than a year old (May 25th, 2022) and a lot of changes were made since then. You should be able to upgrade to the latest v3 without any problem.

cedricalfonsi avatar Oct 04 '23 15:10 cedricalfonsi

Checking the data integrity found 8 errors in total: ` Cleanup shell (dry-run)

3 issues found in table Comments (soft deleted users) 5 issues found in table Comments (soft deleted resources)` Unfortunately fixing these errors didn't fix the issue. I will report later if upgrading fixed the problem

zbrag avatar Oct 05 '23 11:10 zbrag

I've upgraded to api version 3.12.2, the error remains the same, although the line is different: 2023-12-07 12:25:43 error: [App\Error\Exception\CustomValidationException] The user cannot be deleted. The user should not be sole owner of shared content, transfer the ownership to other users. in /var/www/vhosts/simba.vzw.io/httpdocs/src/Controller/Users/UsersDeleteController.php on line 217

I'm currently trying to see if I can upgrade to 4.X without problems

zbrag avatar Dec 07 '23 12:12 zbrag

I'm closing this issue as a later version might have fixed the issue. Feel free to reopen the ticket if the problem persist.

cedricalfonsi avatar Apr 25 '24 12:04 cedricalfonsi