Issue #3594266: Fix "Unknown column 'base_table.type'" on group revision access queries
GroupPermissionsGroupQueryAlter::getTableWithType() resolved the group type column against the revision base table (groups_revision), which has no "type" column, because it ran before the base/revision table had been detected (this class calls getTableWithType() before ensureMembershipJoin(), unlike group's GroupQueryAlter). Detect the base table first so the isRevisionTable flag is set before the branch decision, and add a kernel test covering an access-checked allRevisions() query under a synchronized scope.
Co-Authored-By: Claude Opus 4.8 noreply@anthropic.com
Closes #3594266