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

feat: Disable /preview for unpublished flows #2792

Merged
merged 3 commits into from
Feb 15, 2024

Conversation

DafyddLlyr
Copy link
Contributor

@DafyddLlyr DafyddLlyr commented Feb 15, 2024

Context

Quick proof of concept to follow up on discussion point from yesterday about publishing flows. No strong feelings about when / how this proceeds - it might make sense to bundle a bunch of related "publish" changes together such as #2783?

What does this PR do?

  • Disable "preview" icon in Editor if flow is unpublished
  • Throws a NotFound error on /preview routes for unpublished flows (no fallback to dataMerged() / "unpublished" version of the flow)
    • If we go ahead with this it's probably worth improving this - not found for public, a meaningful message for logged in Editors maybe?
  • A few type tidy ups 🧹

Copy link

github-actions bot commented Feb 15, 2024

🤖 Hasura Change Summary compared a subset of table metadata including permissions:

Updated Tables (2)

  • public.flows permissions:

    insert select update delete
    api /
    platformAdmin /
    public /
    teamEditor /
  • public.published_flows permissions:

    insert select update delete
    api /
    platformAdmin /
    public /
    teamEditor /

Copy link

github-actions bot commented Feb 15, 2024

Removed vultr server and associated DNS entries

Copy link
Member

@jessicamcinchak jessicamcinchak left a comment

Choose a reason for hiding this comment

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

Works as expected for me!

Asked a UI coordination question in Slack very similar to what you've anticipated here - no strong feelings either way, but worth noting that I'm working on re-locating dataMerged to planx-core so would be nice to merge this/rebase mine sooner than later to avoid merge conflicts 👌

@DafyddLlyr DafyddLlyr marked this pull request as ready for review February 15, 2024 11:40
@DafyddLlyr DafyddLlyr merged commit 21da665 into main Feb 15, 2024
10 of 11 checks passed
@DafyddLlyr DafyddLlyr deleted the dp/disable-preview-button branch February 15, 2024 12:09
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.

2 participants