Commit Graph

101 Commits

Author SHA1 Message Date
Peter Steinberger
8addfcee8b
fix(auth): backfill account subjects on refresh 2026-04-28 04:19:39 +01:00
Peter Steinberger
532601a0f1
fix(auth): preserve accounts across Google email renames 2026-04-28 04:01:06 +01:00
Peter Steinberger
c4665c4bff
feat(auth): add ads service and keyring namespace override
Co-authored-by: Umar Khan <ufkhan97@gmail.com>

Co-authored-by: Matthias Kurz <m.kurz@irregular.at>
2026-04-20 15:29:03 +01:00
Peter Steinberger
68e0e2e6ba
chore(deps): update dependencies 2026-04-20 13:06:44 +01:00
Peter Steinberger
77f0798461 fix(auth): add proxy-friendly OAuth callback flags (#227) (thanks @cyberfox) 2026-03-09 02:58:53 +00:00
Peter Steinberger
e323f691e8 feat(keep): add create and delete commands (#413)
- add keep create/delete commands for text and checklist notes
- validate checklist items and switch Keep service-account scope to writable access
- refresh README and changelog for Keep write support

Co-authored-by: John Westerlund <john.westerlund@cygnisec.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-08 21:19:48 +00:00
Peter Steinberger
2bd8c347d0 fix(auth): preserve extra scopes replay and satisfy lint on current main (#421) (thanks @peteradams2026)
Some checks failed
ci / test (push) Has been cancelled
ci / worker (push) Has been cancelled
ci / windows (push) Has been cancelled
ci / darwin-cgo-build (push) Has been cancelled
2026-03-08 03:17:52 +00:00
Zainan Victor Zhou
b10c81a989 feat(auth): add --extra-scopes flag for fine-grained custom OAuth scope selection
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-08 03:14:44 +00:00
Dalton Alexandre
1216e6282f feat(admin): add user and group management via Admin Directory API
Implements Google Admin SDK Directory API support for Workspace user and

group management with domain-wide delegation.

New commands:

- gog admin users list --domain example.com

- gog admin users get user@example.com

- gog admin users create user@example.com --given John --family Doe

- gog admin users suspend user@example.com

- gog admin groups list --domain example.com

- gog admin groups members list group@example.com

- gog admin groups members add group@example.com user@example.com --role MEMBER

- gog admin groups members remove group@example.com user@example.com

Closes #340

Note: This is a focused implementation of core user/group management.

For full GAM feature parity (PR #179), additional work would be needed

for: alerts, licenses, org units, printers, reports, vault, SSO, etc.
2026-03-08 02:29:47 +00:00
Peter Steinberger
70c751c400 test(auth): satisfy oauth redirect lint rules (#398) (thanks @salmonumbrella) 2026-03-08 00:59:23 +00:00
salmonumbrella
5ea6d607fb feat(auth): add --redirect-uri to remote/manual oauth flow 2026-03-08 00:59:23 +00:00
Peter Steinberger
7abf494408 fix(ci): clear pre-existing lint baseline and docs updates 2026-03-03 04:06:29 +00:00
salmonumbrella
59fb51276f fix(auth): resolve main rebase fallout 2026-03-03 03:58:53 +00:00
salmonumbrella
6eab7fd95a fix(lint): add blank lines for wsl_v5 linter
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-03-03 03:58:53 +00:00
salmonumbrella
25040fe7fe fix(auth): add readonly gmail and drive scope handling 2026-03-03 03:58:53 +00:00
Peter Steinberger
366f7acbbb refactor(auth): split manual oauth flow 2026-02-14 18:44:37 +01:00
spookyuser
0e1f77dac0
fix(auth): use non-privileged port for manual OAuth redirect (#172)
* fix(auth): use non-privileged port for manual OAuth redirect

Change the manual auth flow redirect URI from http://localhost:1 to
http://127.0.0.1:9004. Port 1 is a privileged port that browsers may
block or handle differently, causing the redirect to fail. Using port
9004 (non-privileged) ensures the browser will properly attempt the
navigation and display the redirect URL in the address bar.

https://claude.ai/code/session_01Huxgf7YcpWvp6MzZGLyjcP

* fix(auth): use non-privileged port for manual OAuth redirect

Change the manual auth flow redirect URI from http://localhost:1 to
http://127.0.0.1:9004. Port 1 is a privileged port that browsers may
block or handle differently, causing the redirect to fail. Using port
9004 (non-privileged) ensures the browser will properly attempt the
navigation and display the redirect URL in the address bar.

https://claude.ai/code/session_01Huxgf7YcpWvp6MzZGLyjcP

* fix(auth): tighten manual oauth formatting

* docs(changelog): thank @spookyuser for #172

---------

Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-02-14 18:23:52 +01:00
Peter Steinberger
3b2ab325af feat(cli): add forms and appscript commands 2026-02-14 06:24:41 +01:00
Gonçalo Alves
7945602f15
feat: add docs update command for editing Google Docs (#219)
* feat: add docs update command for editing Google Docs

* fix: handle document content range correctly for replace

* docs: add Jarbas avatar

* feat(gogcli): add markdown formatting support for Google Docs

Phase 1 & 2 complete:
- Markdown parser supporting headings, lists, code blocks, blockquotes, links
- Google Docs API integration for formatting
- --format markdown flag for docs update command
- Heading styles (H1-H6), horizontal rules, list indentation
- Code blocks with monospace font

Pending (Phase 3):
- Inline formatting (bold, italic, inline code) - index calculation issues
- Links - index calculation issues

Usage:
  gog docs update <docId> --content-file ./doc.md --format markdown

* fix(gogcli): fix inline formatting indices in markdown formatter

- Simplified document generation to avoid index calculation errors
- Fixed ParseInlineFormatting to correctly track positions
- Preserves: headings, code blocks, blockquotes, lists, horizontal rules

Pending: inline formatting (bold, italic, code, links) - indices still need work

* fix(gogcli): use UTF-16 code units for Google Docs API indexing

- Fixed markdown formatter to use UTF-16 code units instead of UTF-8 bytes
- Added utf16Len() helper function for accurate character counting
- Fixed inline formatting indices (bold, italic, code, links)
- Added empty line handling (MDEmptyLine)
- Successfully tested with Docker course doc (21KB, emojis, diagrams)

This resolves index mismatch errors caused by multi-byte characters like emojis
which are 4 bytes in UTF-8 but 2 code units in UTF-16.

* feat(gogcli): add slides commands with markdown support

- Add 'gog slides update' command with markdown formatting
- Create slides_formatter.go for Google Slides API batch updates
- Create slides_markdown.go for markdown parsing (titles, bullets, code)
- Add slides.go with update/create/read operations
- Update googleauth service for Slides scope

Related: PR #219

* fix(gogcli): use shapes for slides text boxes instead of direct insertion

- Fixed slides creation to use CreateShape with TEXT_BOX instead of inserting text directly
- Direct text insertion into slides is not supported by Google Slides API
- Added title text box with bold 36pt font
- Added body text box for content (bullets, paragraphs, code)
- Supports markdown formatting (bold, bullets, code blocks)

Tested: Successfully created 20-slide presentation from Docker course outline

* feat: add markdown table support (formatted text output)

* feat: implement native Google Docs table insertion with multi-step API

* feat(slides): add --template flag for creating presentations from templates

* fix: stabilize docs/slides markdown + auth flow (#219) (thanks @goncaloalves)

---------

Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-02-13 22:52:17 +01:00
salmonumbrella
2df8ece2f6
fix(auth): enforce remote manual auth state (#187)
* fix(gmail): fallback to send-as list for display name

* refactor(gmail): remove dead code in primarySendAsDisplayNameFromList

The condition `primary == nil && sa.IsPrimary` inside the email-matching
block can never be true because `primary` is already unconditionally set
to `sa` when `sa.IsPrimary` is true earlier in the same loop iteration.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* test(gmail): add --from display name fallback to list test

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* feat(auth): persist manual oauth state

* feat(cli): add remote manual auth flow

* fix(auth): enforce remote manual auth state

* fix(auth): satisfy lint for manual auth flow

* fix(auth): harden remote manual auth state cache

* chore: update changelog for remote manual auth (#187) (thanks @salmonumbrella)

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-02-09 10:38:26 -08:00
Peter Steinberger
99d957581f feat(auth): add multi-org login
Some checks failed
ci / test (push) Has been cancelled
ci / worker (push) Has been cancelled
ci / darwin-cgo-build (push) Has been cancelled
2026-01-22 04:04:14 +00:00
Ruben J. Jongejan
d7c841a6b8 fix(auth): correct gmail search example in success template
Remove incorrect --query flag from the gmail search example. The
search command accepts the query as a positional argument, not a flag.
2026-01-19 22:01:41 +01:00
Peter Steinberger
b0d3a6b268 chore(fmt): gofmt service constants 2026-01-19 02:26:32 +00:00
salmonumbrella
33685adafe feat: add chat support and expand people commands 2026-01-18 05:42:12 +00:00
Peter Steinberger
3d6e0c20be refactor: share classroom topic scan helpers 2026-01-17 02:05:23 +00:00
Peter Steinberger
f5f33ca7a6 fix: adjust classroom topic scan + manage upgrade scopes (#73) (thanks @salmonumbrella) 2026-01-17 01:56:32 +00:00
salmonumbrella
ce44ca2620 fix(classroom): add leave confirmation and upgrade tests
- Add confirmDestructive() to leave command for consistency with other
  destructive operations
- Add SYNC comments to shared CSS in HTML templates
- Add tests for /auth/upgrade endpoint (success, missing email, creds error)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-17 01:46:16 +00:00
salmonumbrella
50dac265e1 feat(auth): add permission upgrade UI and missing service icons
- Add clickable account cards with pointer cursor
- Add "Permissions" button on hover to trigger re-auth
- Add /auth/upgrade endpoint with force-consent and login_hint
- Add service icons for classroom, groups, docs, keep
- Show all services on success page with missing ones greyed out

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-17 01:46:16 +00:00
Peter Steinberger
c3efce4704 chore: switch wsl to v5 2026-01-16 20:12:21 +00:00
Peter Steinberger
901020cb2d fix: normalize classroom assignees + lint cleanup (#74) (thanks @salmonumbrella) 2026-01-16 10:50:36 +00:00
salmonumbrella
7cf8b918ad fix(auth): request gmail settings scopes 2026-01-16 10:41:58 +00:00
salmonumbrella
f8a53b3d1f feat(classroom): add roster, materials, and course urls 2026-01-16 10:41:58 +00:00
salmonumbrella
cb70597f01 feat(classroom): add auth scopes and api client 2026-01-16 10:41:58 +00:00
Peter Steinberger
2313c1be4c fix: add gmail filter scope regression test (#69) (thanks @ryanh-ai) 2026-01-16 09:11:19 +00:00
Ryan H
0447664fcd fix(gmail): add settings.sharing scope for filter operations
Filter creation requires the gmail.settings.sharing scope. Without it,
users get a 403 insufficientPermissions error when trying to create
filters via `gog gmail settings filters create`.

Fixes #68
2026-01-16 09:08:11 +00:00
Peter Steinberger
29813305b9 chore: update deps + tests (0.6.2 Unreleased) 2026-01-15 17:26:19 +00:00
Peter Steinberger
f2347515d8 fix(keep): use keep.readonly scope (#64) (thanks @jeremys) 2026-01-11 02:24:48 +01:00
Peter Steinberger
bdace30a35 test(auth): cover sheets scope matrix
Some checks failed
ci / test (push) Has been cancelled
ci / worker (push) Has been cancelled
ci / darwin-cgo-build (push) Has been cancelled
2026-01-11 00:13:17 +01:00
Peter Steinberger
11562321ec fix(auth): include drive scope for sheets export
Some checks failed
ci / test (push) Has been cancelled
ci / worker (push) Has been cancelled
ci / darwin-cgo-build (push) Has been cancelled
2026-01-11 00:06:04 +01:00
Peter Steinberger
2bb6a8b37c feat(auth): add --readonly and --drive-scope (#58) (thanks @jeremys)
Some checks failed
ci / test (push) Has been cancelled
ci / worker (push) Has been cancelled
ci / darwin-cgo-build (push) Has been cancelled
2026-01-10 23:57:15 +01:00
Peter Steinberger
6d462c5864 fix(lint): satisfy wsl 2026-01-09 21:05:08 +01:00
Peter Steinberger
b44d1d5d97 feat(auth): add groups service 2026-01-09 21:05:05 +01:00
Peter Steinberger
4af0cb83f1 fix(auth): verify account matches authorized email 2026-01-09 17:30:19 +01:00
Peter Steinberger
bfe101a45f fix(lint): satisfy wsl/err113 2026-01-09 13:26:52 +01:00
Peter Steinberger
334570fa8e fix(auth): skip keychain access for file backend 2026-01-09 11:29:36 +01:00
Peter Steinberger
ba41885b1c test: raise coverage to 85% 2026-01-09 09:18:16 +01:00
Peter Steinberger
852083613f fix(lint): tidy wsl spacing (#35)
Thanks @salmonumbrella.

Co-authored-by: salmonumbrella <salmonumbrella@users.noreply.github.com>
2026-01-09 04:41:05 +01:00
Peter Steinberger
6547ac0b04 fix(lint): satisfy fmt/lint checks (#35)
Thanks @salmonumbrella.

Co-authored-by: salmonumbrella <salmonumbrella@users.noreply.github.com>
2026-01-09 04:39:24 +01:00
Peter Steinberger
7beb1bc52f fix(lint): tidy test lint findings (#35)
Thanks @salmonumbrella.

Co-authored-by: salmonumbrella <salmonumbrella@users.noreply.github.com>
2026-01-09 04:34:38 +01:00
Peter Steinberger
c1ebd60210 test: expand coverage and tracking regressions (#35)
Thanks @salmonumbrella.

Co-authored-by: salmonumbrella <salmonumbrella@users.noreply.github.com>
2026-01-09 04:21:16 +01:00