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

fix(core): Disallow deletion of default channel #3181

Conversation

DanielBiegler
Copy link
Contributor

Description

Deleting the default channel breaks the entire instance since you cant log in anymore.

Fixes #3157

Breaking changes

AFAIK none.

Checklist

📌 Always:

  • I have set a clear title
  • My PR is small and contains a single feature
  • I have checked my own PR

👍 Most of the time:

  • I have added or updated test cases
  • I have updated the README if needed

Copy link

vercel bot commented Nov 3, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
docs ✅ Ready (Inspect) Visit Preview Nov 3, 2024 8:27pm

Copy link

sonarcloud bot commented Nov 5, 2024

Copy link
Member

@michaelbromley michaelbromley left a comment

Choose a reason for hiding this comment

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

Yeah this is kinda obvious, how did we miss it for so long? Let's not allow people to brick their Vendure instance 🤝

@@ -370,6 +370,26 @@ describe('Channels', () => {
expect(product!.channels.map(c => c.id)).toEqual(['T_1']);
});

it('Fail to delete the default channel', async () => {
Copy link
Member

Choose a reason for hiding this comment

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

you did an e2e test, you are a good man

@michaelbromley michaelbromley merged commit 2ed3211 into vendure-ecommerce:master Nov 15, 2024
27 of 30 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Nov 15, 2024
@DanielBiegler DanielBiegler deleted the prevent-deletion-of-default-channel branch November 15, 2024 13:22
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
2 participants