Thread:Project:Support desk/Hiding toolbox except for admin and bureaucrat/reply

Maybe you can use this:

$wgUser->getGroups

It will give you an array of all groups in which the current user is member.