HomePhabricator

Use correct hooks for bastion project membership

Authored by scfc.

Description

Use correct hooks for bastion project membership

Currently the membership in the bastion project is managed by
manageShellAccess() when the loginviashell right is granted or
removed. However, due to the use of the hook UserRights, this only
happens when the user rights are changed interactively on
Special:UserRights. Thus, for example automatic additions via
$user->addGroup() do not update the bastion project membership.

This change splits the hook function in two and splices them into the
hooks UserAddGroup and UserRemoveGroup which are triggered by
$user->addGroup() as well.

Bug: T97334
Change-Id: I2dddb006981f555e0717fcbb05e30a17df910f10