Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

3.2 - Deleting Users #1895

Open
Yotouille opened this issue Mar 27, 2023 · 2 comments
Open

3.2 - Deleting Users #1895

Yotouille opened this issue Mar 27, 2023 · 2 comments

Comments

@Yotouille
Copy link

Is your feature request related to a problem? Please describe.
To be able to delete a user we need first to clean all ownership on accounts, then we need to do the same in account history. Only then, the user can be delete without integrity constraint.

We are at the point where we need to delete a user with hundreds of entries. On the account side it seems doable quite easily with the search arguments, but not for "accounts history", there seems to be no argumentation possible there and no details about the "user".

Describe the solution you'd like
At user deletion, there could be an option to transfer ownership to another user (history included !), and a warning to inform about ownership and history lose concerning this user. What do you think ?

Describe alternatives you've considered
We don't delete user and live with it.

Additional context
Error thrown at user deletion:

  • When there are accounts owned by the user:
    SQLSTATE[23000]: Integrity constraint violation: 1451 Cannot delete or update a parent row: a foreign key constraint fails (`my_syspass_db`.`Account`, CONSTRAINT `fk_Account_userEditId` FOREIGN KEY (`userEditId`) REFERENCES `User` (`id`))

  • When entries exist in the account history (but not in account):
    SQLSTATE[23000]: Integrity constraint violation: 1451 Cannot delete or update a parent row: a foreign key constraint fails (`my_syspass_db`.`AccountHistory`, CONSTRAINT `fk_AccountHistory_userEditId` FOREIGN KEY (`userEditId`) REFERENCES `User` (`id`))

Bye !

@kalypso007
Copy link

kalypso007 commented Sep 8, 2023

Hi,
I have the same trouble with 3.2.1 when I try to delete users!
Please made it possible to delete user.

Expected behavior on deleting user:

The GUI should ask which user should inherit the ownership of Accounts and History

In the commits between 3.2.1 and 3.2.11 I do not see changes regarding this behavior.

Kindly regards,
Kalypso

@Arash9703
Copy link

Hi,
I also have the same error, and the answer doesn't help.

Kind regards

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

No branches or pull requests

3 participants