Page MenuHomePhabricator

Remove member from non-existent global group
Closed, ResolvedPublic

Description

Remove member from non-existent global group

When creating same group name in future, previous member become a new same group name member.

for avoid this, I will remove member from non-existent global group.

MariaDB [centralauth_p]> SELECT * FROM global_user_groups WHERE gug_group NOT IN (SELECT distinct(ggp_group) FROM global_group_permissions GROUP BY ggp_group);
+----------+----------------------+
| gug_user | gug_group            |
+----------+----------------------+
|       99 | Cabal                |
|      575 | URL-upload_(testing) |
+----------+----------------------+
2 rows in set (0.01 sec)

Event Timeline

Rxy triaged this task as Low priority.Oct 26 2018, 1:06 PM
Rxy updated the task description. (Show Details)
Rxy updated the task description. (Show Details)

Caban group member gug_user 99 is not exist.

MariaDB [centralauth_p]> SELECT * FROM globaluser WHERE gu_id = 99;
Empty set (0.01 sec)

for this, I can't remove the entry. Also I found some non-existent user held global permission.

MariaDB [centralauth_p]> SELECT gug_user, gug_group, gu_name FROM global_user_groups LEFT OUTER JOIN globaluser ON gu_id = gug_user WHERE gu_name IS NULL;
+----------+-------------------------+---------+
| gug_user | gug_group               | gu_name |
+----------+-------------------------+---------+
|       99 | Cabal                   | NULL    |
|       99 | steward                 | NULL    |
|      456 | steward                 | NULL    |
|     6888 | global-sysop            | NULL    |
|    25914 | global-rollbacker       | NULL    |
|  1498691 | steward                 | NULL    |
|  1936335 | global-interface-editor | NULL    |
|  3159104 | global-rollbacker       | NULL    |
|  3159104 | global-sysop            | NULL    |
|  3179225 | global-rollbacker       | NULL    |
+----------+-------------------------+---------+
10 rows in set (0.33 sec)
Rxy removed Rxy as the assignee of this task.Oct 26 2018, 1:30 PM

I removed URL-upload_(testing) group by removing membership from Bastique

MariaDB [centralauth_p]> SELECT * FROM global_user_groups WHERE gug_group NOT IN (SELECT distinct(ggp_group) FROM global_group_permissions GROUP BY ggp_group);
+----------+-----------+
| gug_user | gug_group |
+----------+-----------+
|       99 | Cabal     |
+----------+-----------+
1 row in set (0.00 sec)
Rxy moved this task from Backlog to ToDo on the User-Rxy board.

Wondering how to do this.... I can delete the row by running a query at live database, but I'd like to avoid that if possible. Before doing so, I'd like to ask..how this row was introduced?

Change 755719 had a related patch set uploaded (by Majavah; author: Majavah):

[mediawiki/extensions/CentralAuth@master] GlobalGroupPermissions: Do not allow deleting groups with memebers

https://gerrit.wikimedia.org/r/755719

Change 755719 merged by jenkins-bot:

[mediawiki/extensions/CentralAuth@master] GlobalGroupPermissions: Do not allow deleting groups with members

https://gerrit.wikimedia.org/r/755719

taavi claimed this task.