Got the logic behind the GL processing figured out. In short it means that the admin screen for Users is not consistent, but not in all cases.
What happens, is that GL updates the group_assignment based on the tick boxes, which is incorrect and leads to confusion. In fact, GL should distinguish between
permanent membership and
inherited membership.
Example.
Bill is a friend and has one row in the group_assignments table. When Bill is added to special friends, he has two rows in that table.
Ann is a very special friend and has one row in group_assigments table. The admin screen however shows me she is a member in friends and special friends with the blue tick boxes.
Now, saving Ann again using the admin screen, she suddenly has three rows in the group_assignments table. The resulting admin screen is the same, though the database is in a different state.
Another example.
Somehow I decided that all very special friends should be able to moderate comments for a short period, so I added that group to my very special friends. That works. After that short period I remove the group again. This works, but not for members of very special friends that went thru an update using the admin screen: they stay in the comment moderation group.
Proposal.
The admin screen should reflect the
state of the membership, either permanent (blue), either inherited (proposal: green). Than, GL only updates the table according to the blue tick boxes and ignores the green ones.
This can be done by a select value, rendered as a tick box. Whereas a mouse hover can reveal the parent group(s). This eliminates the need for a tree view (and the hidden code for shadowed tick boxes).