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 #508

Merged
merged 1 commit into from
Dec 16, 2023
Merged

Conversation

jfreda
Copy link
Contributor

@jfreda jfreda commented Dec 15, 2023

This PR enables creating documents on behalf of logged-in Hermes users when running Hermes as a service account with domain-wide authority.

New config attribute

google_workspace {
  ...
  auth {
    ...
    create_docs_as_user = true
    ...
  }
  ...
}

@jfreda jfreda requested a review from a team as a code owner December 15, 2023 17:58
// subject = ""
// token_url = "https://oauth2.googleapis.com/token"
// client_email = ""
// create_docs_as_user = true
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that's one way to make it easy for our users! Great work @jfreda 🎉

@@ -121,6 +129,7 @@ func ConfigHandler(
AlgoliaDocsIndexName: cfg.Algolia.DocsIndexName,
AlgoliaDraftsIndexName: cfg.Algolia.DraftsIndexName,
AlgoliaInternalIndexName: cfg.Algolia.InternalIndexName,
CreateDocsAsUser: createDocsAsUser,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Curious why we need to send it in the config?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was thinking that we could make the modal that pops up after a draft is created (or at least the text in it about users having to manually manage their notifications) conditional on this.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That is a good idea

@jfreda jfreda added the enhancement New feature or request label Dec 15, 2023
@jfreda jfreda merged commit 5085c5a into main Dec 16, 2023
2 checks passed
@jfreda jfreda deleted the jfreda/create-docs-as-user branch December 16, 2023 00:33
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