Adding & Removing Users on Google Sites | OpsBlu Docs

Adding & Removing Users on Google Sites

Adding & Removing Users on Google Sites — setup, configuration, and best practices for Googlesites.

Google Sites uses Google Account permissions for all access control. There are no standalone user accounts -- collaborators are added by sharing the site through Google Drive or the Sites editor. Permissions are managed via Google Drive sharing, Google Workspace Admin Console (for organizations), and the Google Drive API.

Adding Editors via the Google Sites Editor

Sharing a Site for Editing

  1. Open the site in the Google Sites editor at sites.google.com
  2. Click the Share with others icon (person with plus) in the top toolbar
  3. Under Add people and groups, enter one or more email addresses
  4. Select a permission level:
    • Editor -- Can edit all pages, add content, change layouts, and publish
    • Viewer -- Can only view the draft site (not the published version)
  5. Optionally check Notify people to send an email notification
  6. Click Send

Editors can access the site immediately at sites.google.com and make changes. They cannot delete the site or change sharing settings unless they are also the owner.

Permission Levels

Level Can Edit Can Publish Can Share Can Delete Site
Owner Yes Yes Yes Yes
Editor Yes Yes No (unless granted) No
Viewer No No No No

Google Sites has a simpler permission model than most CMS platforms -- there are no custom roles, no page-level permissions, and no content-type restrictions.

Adding Users via Google Drive Sharing

Since every Google Site is backed by a file in Google Drive, you can manage access through Drive:

  1. Open drive.google.com
  2. Find the Google Site file (it appears as a Google Sites icon)
  3. Right-click and select Share
  4. Add people with Editor or Viewer access
  5. Click Done

Sharing via the Google Drive API

# Share a Google Site with a new editor using the Drive API
# First, find the Site's Drive file ID from the Sites URL

# Grant editor access
curl -X POST "https://www.googleapis.com/drive/v3/files/FILE_ID/permissions" \
  -H "Authorization: Bearer $(gcloud auth print-access-token)" \
  -H "Content-Type: application/json" \
  -d '{
    "role": "writer",
    "type": "user",
    "emailAddress": "jsmith@example.com"
  }'

# Grant viewer access
curl -X POST "https://www.googleapis.com/drive/v3/files/FILE_ID/permissions" \
  -H "Authorization: Bearer $(gcloud auth print-access-token)" \
  -H "Content-Type: application/json" \
  -d '{
    "role": "reader",
    "type": "user",
    "emailAddress": "viewer@example.com"
  }'

# List all current permissions on a Site
curl -s "https://www.googleapis.com/drive/v3/files/FILE_ID/permissions?fields=permissions(id,emailAddress,role,type)" \
  -H "Authorization: Bearer $(gcloud auth print-access-token)" | python3 -m json.tool

Sharing with a Google Group

For team-wide access, share the site with a Google Group:

# Share with an entire Google Group
curl -X POST "https://www.googleapis.com/drive/v3/files/FILE_ID/permissions" \
  -H "Authorization: Bearer $(gcloud auth print-access-token)" \
  -H "Content-Type: application/json" \
  -d '{
    "role": "writer",
    "type": "group",
    "emailAddress": "site-editors@yourdomain.com"
  }'

This is the recommended approach for organizations -- manage group membership instead of individual site permissions.

Bulk User Management

Bulk Add Editors via Script

#!/usr/bin/env python3
"""bulk_share_site.py -- Add multiple editors to a Google Site via Drive API."""

from google.oauth2 import service_account
from googleapiclient.discovery import build

SCOPES = ['https://www.googleapis.com/auth/drive']
SERVICE_ACCOUNT_FILE = 'service-account-key.json'
SITE_FILE_ID = 'your-site-drive-file-id'

credentials = service_account.Credentials.from_service_account_file(
    SERVICE_ACCOUNT_FILE, scopes=SCOPES
)
# If using domain-wide delegation:
credentials = credentials.with_subject('admin@yourdomain.com')

drive = build('drive', 'v3', credentials=credentials)

editors = [
    'alice@example.com',
    'bob@example.com',
    'carol@example.com',
]

for email in editors:
    try:
        permission = drive.permissions().create(
            fileId=SITE_FILE_ID,
            body={'role': 'writer', 'type': 'user', 'emailAddress': email},
            sendNotificationEmail=True,
        ).execute()
        print(f'OK: {email} -> {permission["id"]}')
    except Exception as e:
        print(f'FAIL: {email} -> {e}')

Audit All Shared Users

#!/usr/bin/env python3
"""audit_site_access.py -- List all users with access to a Google Site."""

from google.oauth2 import service_account
from googleapiclient.discovery import build

SCOPES = ['https://www.googleapis.com/auth/drive.metadata.readonly']
SERVICE_ACCOUNT_FILE = 'service-account-key.json'
SITE_FILE_ID = 'your-site-drive-file-id'

credentials = service_account.Credentials.from_service_account_file(
    SERVICE_ACCOUNT_FILE, scopes=SCOPES
)
drive = build('drive', 'v3', credentials=credentials)

permissions = drive.permissions().list(
    fileId=SITE_FILE_ID,
    fields='permissions(id,emailAddress,role,type,displayName)',
).execute()

print(f"{'Email':40s} {'Role':10s} {'Type':8s} Name")
print('-' * 80)
for p in permissions.get('permissions', []):
    print(f"{p.get('emailAddress', 'N/A'):40s} {p['role']:10s} {p['type']:8s} {p.get('displayName', '')}")

Removing Users

Removing via the Sites Editor

  1. Open the site in the Google Sites editor
  2. Click the Share icon
  3. Find the user in the sharing list
  4. Click the dropdown next to their name
  5. Select Remove
  6. Click Save

Removing via the Drive API

# Remove a specific user's access
# First, get the permission ID
PERM_ID=$(curl -s "https://www.googleapis.com/drive/v3/files/FILE_ID/permissions?fields=permissions(id,emailAddress)" \
  -H "Authorization: Bearer $(gcloud auth print-access-token)" \
  | python3 -c "import sys,json; perms=json.load(sys.stdin)['permissions']; print(next(p['id'] for p in perms if p.get('emailAddress')=='jsmith@example.com'))")

# Delete the permission
curl -X DELETE "https://www.googleapis.com/drive/v3/files/FILE_ID/permissions/$PERM_ID" \
  -H "Authorization: Bearer $(gcloud auth print-access-token)"

What Happens to Their Content

When you remove a user from a Google Site:

  • All content they added remains on the site -- nothing is deleted
  • There is no per-page or per-section attribution in Google Sites, so there is no concept of "their content"
  • The removed user immediately loses access to edit the site
  • If the site is published publicly, the removed user can still view the published version (like any internet user)
  • Revision history retains the removed user's name on their edits
  • The removed user's Google Account is unaffected

Transferring Ownership

# Transfer site ownership to another user
curl -X PATCH "https://www.googleapis.com/drive/v3/files/FILE_ID/permissions/PERM_ID" \
  -H "Authorization: Bearer $(gcloud auth print-access-token)" \
  -H "Content-Type: application/json" \
  -d '{"role": "owner"}'

The original owner becomes an editor after transferring ownership.

Google Workspace Admin Controls

For Google Workspace organizations, administrators can control Google Sites access at the organizational level:

Google Workspace Admin Console:
Admin Console > Apps > Google Workspace > Sites

Settings:
├── Service status: ON/OFF for organization/OUs
├── New Sites creation: Allow/Disallow per OU
├── Sharing settings: Internal only / Anyone with the link
├── Classic Sites: Enable/Disable (legacy)
└── Drive and Docs sharing settings apply to Sites

Restricting Site Creation by OU

# Using the Admin SDK Directory API to manage OU-level settings
# This controls who can create new Google Sites

gcloud admin-sdk settings update \
  --org-unit="/Marketing" \
  --service="sites" \
  --setting="createSites=false"

When a Google Workspace Account is Suspended

If a Workspace admin suspends a user's account:

  • The user immediately loses access to all Google Sites they can edit
  • Sites they own continue to exist and remain published
  • Other editors can still access and edit the site
  • The suspended user's edits in revision history remain visible
  • To transfer ownership of their Sites, use the Admin Console's data transfer tool

Data Transfer on Account Deletion

Admin Console > Users > [User] > More options > Transfer data

Transfer includes:
- Google Drive files (including Google Sites)
- Ownership is transferred to the selected user
- Sharing permissions on transferred Sites are preserved

Published Site Access vs. Editor Access

Google Sites separates editing access from published site visibility:

  • Editing access: Controlled by Drive sharing (Editor/Viewer roles)
  • Published site access: Controlled by the publishing settings:
    • Public -- Anyone on the internet can view
    • Restricted -- Only specified people can view (uses Drive sharing)
    • Organization -- Anyone in the Google Workspace domain can view
Sites editor > Publish > Publishing settings:
├── Who can visit my published site
│   ├── Everyone (public)
│   ├── Everyone at [your domain]
│   └── Only me / specific people
└── Search settings
    └── Request public search engines to not display this site

Offboarding Checklist

  1. Remove from all shared Sites -- Check Google Drive for Sites shared with the departing user
  2. Transfer ownership of any Sites they own using the Admin Console data transfer tool
  3. Review published Sites -- Ensure no Sites the user owned are now inaccessible
  4. Check Google Groups -- If access was granted via a Group, remove the user from the Group
  5. Suspend the Workspace account -- This immediately revokes all Google Sites access
  6. Audit sharing settings -- Verify no Sites were inadvertently shared publicly by the departing user
  7. Update publishing restrictions -- If a Site was only shared with specific people, update the list