Ghost icon indicating copy to clipboard operation
Ghost copied to clipboard

When you delete a user, the roles ain't cleaned

Open whoshallsucceed opened this issue 9 years ago • 8 comments

Issue Summary

When you delete a user, the roles ain't cleaned

Steps to Reproduce

  1. Delete a user;
  2. And observe:
mysql> select users.id, users.name, roles.name from roles join roles_users on roles_users.role_id=roles.id left join users on users.id = roles_users.user_id;
+--------------------------+----------------+---------------+
| id                       | name           | name          |
+--------------------------+----------------+---------------+
| 1                        | Adrien Giboire | Owner         |
| 5984be102f295b5ab0bef447 | Adrien Giboire | Administrator |
| NULL                     | NULL           | Author        |
+--------------------------+----------------+---------------+

Technical details:

  • Ghost Version: 1.5.0
  • Node Version: 6.11.1
  • Database: mysql Ver 14.14 Distrib 5.7.19

whoshallsucceed avatar Aug 04 '17 18:08 whoshallsucceed

Hey @AdrienGiboire, thanks for your report.

I can confirm, the roles_users entry is not getting removed when a user is deleted. PR is welcome 🙃

kirrg001 avatar Aug 08 '17 07:08 kirrg001

Trying to but having local issues.

whoshallsucceed avatar Aug 08 '17 10:08 whoshallsucceed

@AdrienGiboire Thank you! If you need any help, swing by our slack channel and ask in the #contributing channel.

kirrg001 avatar Aug 08 '17 10:08 kirrg001

@kirrg001 Can you assign this issue to me? I want to fix it as my first commit.

uname-yang avatar Sep 01 '17 08:09 uname-yang

@uname-yang I am not able to assign you, because you are not part of the Ghost Contributors group. But a fix for this is very welcome 👍

kirrg001 avatar Sep 08 '17 13:09 kirrg001

@uname-yang Any news? 🙃

kirrg001 avatar Jan 11 '18 20:01 kirrg001

I would like to work on this!

dexterleng avatar Dec 05 '18 11:12 dexterleng

@dexterleng Thanks 🤩 If you need any help, let us know here!

kirrg001 avatar Dec 05 '18 11:12 kirrg001