I found a solution for this.
here is the modification code at file /WebGUI/lib/WebGUI/Operation/User.pm
at line: 406
my @groupsToAdd = $session->form->group("groupsToAdd"); my @exclude = $session->db->buildArray("select groupId from groupings where userId=".$session->db->quote($u->userId)); @exclude = (@exclude,"1","2","7"); $tabform->getTab("groups")->group( -name=>"groupsToAdd", -label=>$i18n->get("groups to add"), -excludeGroups=>\@exclude, -size=>15, -multiple=>1, -value=>\@groupsToAdd );with my @groupsToAdd = $session->form->group("groupsToAdd"); my @admin = $session->db->buildArray("select 'Admin' from groupings where userId=? and groupId = '3'",[$session->user->userId]); my @secondaryAdmin = $session->db->buildArray("select 'Secondary Admin' from groupings where userId=? and groupId = '11'",[$session->user->userId]); my @exclude = $session->db->buildArray("select groupId from groupings where userId=".$session->db->quote($u->userId)); @exclude = (@exclude,"1","2","7"); my @extraExclude; if ($admin[0] ne "Admin" && $secondaryAdmin[0] eq "Secondary Admin"){ @extraExclude = $session->db->buildArray("select groupId from groups where groupId not in (select groupId from groupings where userId = ?)",[$session->user->userId]); @extraExclude = (@extraExclude,@exclude); } else { @extraExclude = (@exclude); } $tabform->getTab("groups")->group( -name=>"groupsToAdd", -label=>$i18n->get("groups to add"), -excludeGroups=>\@extraExclude, -size=>15, -multiple=>1, -value=>\@groupsToAdd );
Fixed in 7.4.18.
Since you provided a patch, we'd like to credit you for your work. If you'll reply to this bug with your real name (and/or company), we'll add it to the changelog.