Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable creating documents as logged-in user (take 2) #526

Merged
merged 2 commits into from
Dec 21, 2023

Conversation

jfreda
Copy link
Contributor

@jfreda jfreda commented Dec 21, 2023

This is a follow-up to #508 to (hopefully!) enable creating documents on behalf of logged-in Hermes users when running Hermes as a service account with domain-wide authority.

Shared drive permissions and Google Docs notification settings are fun, and hopefully this can create documents with the same notification settings as when a user creates their own Google Docs, by first copying the template to a new temporary drafts folder as the logged-in user, and then using the service user to copy the file to the drafts folder (which should have less permissive permissions - will submit another PR for these doc updates).

New config attribute

google_workspace {
  ...
  // temporary_drafts_folder is a folder that will brieflly contain document
  // drafts before they are moved to the drafts_folder. This is used when
  // create_docs_as_user is true in the auth block, so document notification
  // settings will be the same as when a user creates their own document.
  temporary_drafts_folder = "my-temporary-drafts-folder-id"
  ...
  }
}

@jfreda jfreda requested a review from a team as a code owner December 21, 2023 17:00
@jfreda jfreda added the enhancement New feature or request label Dec 21, 2023
@jfreda jfreda merged commit 83ed46f into main Dec 21, 2023
2 checks passed
@jfreda jfreda deleted the jfreda/create-docs-as-user-2 branch December 21, 2023 20:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants