[chatgpt] Add Google Drive access policy Admin API example - #3048
Draft
hmittal-oai wants to merge 1 commit into
Draft
[chatgpt] Add Google Drive access policy Admin API example#3048hmittal-oai wants to merge 1 commit into
hmittal-oai wants to merge 1 commit into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add a guide and Python standard-library CLI for managing Google Drive access through the ChatGPT workspace Admin API, following the SharePoint example in #3032. The example covers shared-drive ID and root-URL inputs, CSV/text imports, dry-run previews, full replacements, additions/removals, and independent My Drive access.
Make
null(all shared drives),[](no shared drives), and a selected allowlist explicit. Require confirmation for resetting restrictions or blocking every shared drive, reject malformed and empty imports, verify root URLs with Google Drive, and retry reads only. Register the guide inregistry.yamlusing the existing author slug.This is a draft pending availability of the Google Drive policy endpoint and enforcement for supported workspaces. The guide explains that a successful configuration request alone does not establish enforcement and that concurrent administrator saves can overwrite changes.
Motivation
Workspace administrators need a reusable example for managing shared-drive and My Drive controls at scale. Google Drive uses full replacement and distinct all/none semantics, so its workflow needs a dedicated example rather than adapting the SharePoint commands unchanged.
Validation
python3 -B -m unittest discover -s examples/chatgpt/google_drive_access -p 'test_*.py' -v— 31 tests passed with mocked Google Drive and ChatGPT Admin API responses.ruff check examples/chatgpt/google_drive_accessruff format --check examples/chatgpt/google_drive_access--helpand Python 3.10 syntax validation..github/scripts/check_notebooks.py— no changed notebooks.docs-editorreview — no remaining findings.For new content
hmittal-oaiauthor slug uses GitHub-profile attribution.