Let Google Workspace groups grant admin access

Site settings → Access names a group for each of admin, editor and
viewer (migration 047). Someone in one who signs in with Google gets a
Google-only account with their highest group's role, and the role
follows the groups: at every sign-in, hourly while signed in, and on
Panel → Google groups → Re-sync now. Out of every group, the account
is disabled and signed out until they're back in one.

Group accounts' roles are locked in the Panel; a superadmin's Disable
sticks. Superadmins and admin-cli accounts are never changed. If
Google can't be asked, sign-ins are refused but the hourly check
leaves accounts alone. Panel → Check their groups tests an email.

Lookups use the service account through the Directory API as
GOOGLE_DIRECTORY_AS. Setup: docs/google-sign-in.md.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Zaldimmar 2026-09-29 17:44:04 -05:00
parent d7835dd5d4
commit 80877a4659
13 changed files with 563 additions and 36 deletions

View file

@ -33,6 +33,9 @@ const GOOGLE_ERRORS: Record<string, string> = {
unverified: "That Google account's email isn't verified.",
google_unreachable: "Couldn't reach Google. Try again in a moment.",
google_failed: "Google sign-in didn't work. Try again, or use your password.",
not_in_group:
"That Google account isn't in a website access group. Ask a superadmin to add you to one.",
groups_unreachable: "Couldn't check your Google groups just now. Try again in a moment.",
};
const fieldClass =