Skip to content

feat: add file ACL management via Drive PRIVATE Properties#14

Open
44103 wants to merge 2 commits into
mainfrom
feature/13
Open

feat: add file ACL management via Drive PRIVATE Properties#14
44103 wants to merge 2 commits into
mainfrom
feature/13

Conversation

@44103

@44103 44103 commented Jul 2, 2026

Copy link
Copy Markdown
Owner

概要

Drive ファイルに対するアクセス制御(ACL)を PRIVATE Properties で管理する機能を追加。

変更内容

ファイル追跡 (b7cc534)

  • myg 経由の読み取り/書き込み/作成を自動追跡
  • myg file props id=<ID> で追跡状態を確認可能
  • 追跡情報: acl, permitted_local, permitted_domain, permitted_at, created

ACL 手動設定 (608a8c8)

  • myg file props id=<ID> set=<-|r|w> で明示的に ACL を設定
    • -: アクセス拒否(read/write 両方ブロック)
    • r: 読み取り専用
    • w: 読み書き許可
  • 対話ターミナル必須 + 確認プロンプトで誤操作防止
  • TTY チェックにより LLM/パイプからの実行をブロック
  • Sheets, Docs, Drive, Slides の読み書き操作に checkAcl() を挿入

対象ファイル

  • src/drive.ts — checkAcl, setFileAcl, trackFileAccess/Write/Creation
  • src/main.ts — 各アクションへの ACL チェック挿入 + file:props:set ハンドラ
  • cli/myg / cli/myg.ps1 — set= パラメータ対応 (bash/PowerShell)
  • README.md / cli/help.txt — ドキュメント更新

設計判断

  • Drive API Properties (per file) を採用 — ファイル数にスケール、124B/prop で ACL には十分
  • PropertiesService (500KB全体制限) や Spreadsheet ログは見送り
  • 履歴は permitted_at/permitted_local で「最後の変更者・日時」を記録

今後の拡張候補

  • sheet:notes, sheet:note:set/clear への checkAcl 追加
  • file:upload, comment 系への checkAcl 追加

Add 'myg file props id=<ID> set=<-|r|w>' to explicitly set file
access control. Includes interactive confirmation prompt and TTY
check to block non-interactive (LLM/pipe) execution.

Also add checkAcl() enforcement on read/write operations for
sheets, docs, files, and slides.
@44103 44103 changed the title feat: add Drive Labels read support feat: add file ACL management via Drive PRIVATE Properties Jul 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant