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

Public site #252

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open

Public site #252

wants to merge 4 commits into from

Conversation

midorikocak
Copy link

@midorikocak midorikocak commented Feb 2, 2021

Description of Change

Adds env option PUBLIC_SITE to allow non-authenticated users to view. Hides google docs links. It requires a PUBLIC_SITE=true variable to be added to the .env file

Related Issue

#156

Motivation and Context

Checklist

  • [x ] Ran npm run lint and updated code style accordingly
  • [] npm run test passes
  • PR has a description and all contributors/stakeholder are noted/cc'ed
  • tests are updated and/or added to cover new code
  • [] relevant documentation is changed and/or added

Need some feedback on tests and documentation changes.

@midorikocak
Copy link
Author

Following this as well.

Is this repository maintained?

@isaacwhite isaacwhite self-requested a review February 28, 2021 22:57
Copy link
Member

@isaacwhite isaacwhite left a comment

Choose a reason for hiding this comment

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

Thanks so much for taking a pass at #156, @midorikocak! And thanks for your patience while we got around to reviewing this PR.

Adding an environment variable to trigger the public site behavior seems like a great way to opt-in to unauthenticating most of the site.

Since Library pages are rendered dynamically (except for caching of doc contents), would you be interested in making the edit buttons conditional based on the login status?

In that case, I wonder if we could trigger the login flow only on a predetermined url (like /login) so that administrators could view the site edit buttons.

That approach would also lend itself to the expansion of authenticated-only pages (like an audit log of some kind), but could come in a separate PR if you'd rather keep this PR more narrowly scoped.

Let me know how you'd like to proceed, and thanks for contributing to Library!

@isaacwhite isaacwhite linked an issue Feb 28, 2021 that may be closed by this pull request
Base automatically changed from master to main March 13, 2021 03:00
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.

Support public/no-auth Library-backed sites
2 participants