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(editor): Enable moving resources only if team projects are available by the license #10271

Conversation

cstuncsik
Copy link
Contributor

@cstuncsik cstuncsik commented Jul 31, 2024

Summary

The current setting of the Move action is broken. We can't rely on the plan name because it is the same on the cloud, where we should enable moving resources even when the plan name shows Community if the users have a quota for team projects.

Related Linear tickets, Github issues, and Community forum posts

PAY-1798

Review / Merge checklist

  • PR title and summary are descriptive
  • Tests included
  • PR Labeled with release/backport

@cstuncsik cstuncsik added the release/backport Changes that need to be backported to older releases. label Jul 31, 2024
@n8n-assistant n8n-assistant bot added n8n team Authored by the n8n team ui Enhancement in /editor-ui or /design-system labels Jul 31, 2024
tomi
tomi previously approved these changes Aug 1, 2024
Copy link
Contributor

@tomi tomi left a comment

Choose a reason for hiding this comment

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

Nice 👏 Just one small comment about grammar

@@ -49,19 +49,19 @@ export const useProjectsStore = defineStore('projects', () => {
);
const teamProjects = computed(() => projects.value.filter((p) => p.type === ProjectTypes.Team));
const teamProjectsLimit = computed(() => settingsStore.settings.enterprise.projects.team.limit);
const teamProjectsAvailable = computed<boolean>(
const isTeamProjectsAvailable = computed<boolean>(
Copy link
Contributor

Choose a reason for hiding this comment

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

👍 much better with the prefix. Tho to be grammatically correct, we should name this areTeamProjectsAvailable, as it's plural projects

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, probably. I was considering it as the feature name, and actually, with that in mind, it should be isTeamProjectFeatureEnabled

Copy link
Contributor

github-actions bot commented Aug 1, 2024

✅ All Cypress E2E specs passed

Copy link

cypress bot commented Aug 1, 2024



Test summary

217 3 0 0Flakiness 0


Run details

Project n8n
Status Failed
Commit d737273
Started Aug 2, 2024 11:34 AM
Ended Aug 2, 2024 11:38 AM
Duration 04:36 💡
OS Linux Debian -
Browser Electron 118

View run in Cypress Cloud ➡️


Failures

2-credentials.cy.ts Failed
1 Credentials > should correctly render required and optional credentials
7-workflow-actions.cy.ts Failed
1 Workflow Actions > should not save workflow twice when save is in progress
26-resource-locator.cy.ts Failed
1 Resource Locator > should retrieve list options when other params throw errors

This comment has been generated by cypress-bot as a result of this project's GitHub integration settings. You can manage this integration in this project's settings in the Cypress Cloud

Copy link
Contributor

@tomi tomi left a comment

Choose a reason for hiding this comment

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

Thanks for addressing 💟

Copy link
Contributor

github-actions bot commented Aug 1, 2024

✅ All Cypress E2E specs passed

@cstuncsik cstuncsik merged commit 42ba884 into master Aug 1, 2024
28 checks passed
@cstuncsik cstuncsik deleted the pay-1798-bug-cannot-rely-on-planname-to-check-for-permission-to-move branch August 1, 2024 15:33
despairblue pushed a commit that referenced this pull request Aug 2, 2024
@github-actions github-actions bot mentioned this pull request Aug 2, 2024
@janober
Copy link
Member

janober commented Aug 2, 2024

Got released with n8n@1.53.1

MiloradFilipovic added a commit that referenced this pull request Aug 2, 2024
* master:
  refactor(core): Clean up event relays (no-changelog) (#10284)
  fix(editor): Fix execution retry button (#10275)
  feat(core): Show sub-node error on the logs pane. Open logs pane on sub-node error (#10248)
  refactor(core): Move instanceRole to InstanceSettings (no-changelog) (#10242)
  feat(core): Allow filtering executions and users by project in Public API  (#10250)
  fix(core): Make execution and its data creation atomic (#10276)
  refactor(core): Mark schema env vars used by cloud hooks (no-changelog) (#10283)
  ci: Fix DB tests (no-changelog) (#10282)
  feat(core): Support create, delete, edit role for users in Public API (#10279)
  refactor(core): Decouple post workflow execute event from internal hooks (no-changelog) (#10280)
  feat(core): Allow transferring credentials in Public API (#10259)
  feat(core): Support create, read, update, delete projects in Public API (#10269)
  ci: Introduce lint rule `no-type-unsafe-event-emitter` (no-changelog) (#10254)
  fix(core): Surface enterprise trial error message (#10267)
  fix(editor): Enable moving resources only if team projects are available by the license (#10271)
  fix(core): Upgrade tournament to address some XSS vulnerabilities (#10277)

# Conflicts:
#	packages/cli/src/Server.ts
@github-actions github-actions bot mentioned this pull request Aug 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
n8n team Authored by the n8n team release/backport Changes that need to be backported to older releases. Released ui Enhancement in /editor-ui or /design-system
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants