reapply_anyone_permissions
Reapplies public 'anyone with the link' permissions from a Google Sheet audit to the destination Shared Drive. Requires explicit confirmation to execute.
Instructions
Step 14 — Reapply "anyone" (public) permissions from the audit sheet.
DESTRUCTIVE — requires confirmed=True to execute.
If the audit captured any "anyone with the link" ACLs, this step
reapplies them. Consider whether public access is appropriate on
the destination Shared Drive before confirming.
Args:
user_email: The admin email executing the command.
sheet_id: The ID of the Google Sheet containing the audit.
sheet_name: The tab containing ACL data (default: "all_permissions").
confirmed: Must be True to execute. False returns a preview.
GAM command:
gam config csv_input_row_filter "permission.type:regex:anyone"
redirect stdout ./reapply_anyone_perms.txt multiprocess
redirect stderr stdout
csv gsheet <user_email> <sheet_id> <sheet_name>
gam user <user_email> create drivefileacl "~id"
anyone role "~permission.role"
allowfilediscovery "~permission.allowFileDiscovery"
nodetails
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sheet_id | Yes | ||
| confirmed | No | ||
| sheet_name | No | all_permissions | |
| user_email | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |