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: Implement runtine check for enterprise features #4676

Merged
merged 10 commits into from
Nov 22, 2022

Conversation

krynble
Copy link
Contributor

@krynble krynble commented Nov 21, 2022

No description provided.

@n8n-assistant n8n-assistant bot added core Enhancement outside /nodes-base and /editor-ui n8n team Authored by the n8n team labels Nov 21, 2022
@krynble krynble marked this pull request as ready for review November 22, 2022 07:43
ivov
ivov previously approved these changes Nov 22, 2022
Copy link
Contributor

@ivov ivov left a comment

Choose a reason for hiding this comment

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

All tests passing on all three DBs. Only minor comments.

Comment on lines 49 to 50
const credentialOwnerRole = await getRole('credential', 'owner');
credentialsWhereCondition.where.role = credentialOwnerRole;
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
const credentialOwnerRole = await getRole('credential', 'owner');
credentialsWhereCondition.where.role = credentialOwnerRole;
credentialsWhereCondition.where.role = await getRole('credential', 'owner');

Comment on lines 82 to 88
const role = await Db.collections.Role.findOneOrFail({
where: {
name,
scope,
},
});
return role;
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
const role = await Db.collections.Role.findOneOrFail({
where: {
name,
scope,
},
});
return role;
return await Db.collections.Role.findOneOrFail({
where: {
name,
scope,
},
});

@@ -78,6 +78,16 @@ export async function getInstanceOwner(): Promise<User> {
return owner;
}

export async function getRole(scope: RoleScopes, name: RoleNames): Promise<Role> {
Copy link
Contributor

Choose a reason for hiding this comment

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

You can also use lookup types to avoid ex/importing: Role['name'], Role['scope'].

Copy link
Contributor

@ivov ivov left a comment

Choose a reason for hiding this comment

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

🚀

@krynble krynble merged commit 7b00d6e into master Nov 22, 2022
@krynble krynble deleted the n8n-5634-change-runtime-when-enterprise-features branch November 22, 2022 13:24
@n8n-assistant n8n-assistant bot added the Upcoming Release Will be part of the upcoming release label Nov 22, 2022
MiloradFilipovic added a commit that referenced this pull request Nov 22, 2022
* feature/ad-ldap: (22 commits)
  perf(Code Node): Improve n8n item key validation performance (#4669)
  feat: Implement runtine check for enterprise features (no-changelog) (#4676)
  refactor: Consolidate `.prettierignore` patterns (no-changelog) (#4692)
  refactor: Improve error logging/reporting for `cli` (#4691)
  feat(editor): Add workflows list status filter (#4690)
  fix: Expand `nodes-base` formatting validation (no-changelog) (#4689)
  refactor: Improve warnings and error messages to users about sharing (#4687) (no-changelog)
  fix: Update subview switch condition (no-changelog) (#4688)
  refactor: Validate formatting in `nodes-base` (no-changelog) (#4685)
  feat: Show delete button based on workflow permissions (#4686)
  feat: Show toast when saving workflow sharing settings (#4684)
  feat: Add save confirmation modal when leaving sharing modal (#4683)
  fix: Update workflow title in workflowsById as well (no-changelog) (#4682)
  feat: Add share button to workflows list (#4681)
  feat: Add credentials E2E test suite and page object (#4596)
  fix(core): Use CredentialsOverwrites when testing credentials (#4675)
  refactor: Adjust credential endpoints permissions (#4656) (no-changelog)
  fix: Fix settings header text slot  (no-changelog) (#4667)
  feat: Switch owner subview to all subview if has shared resources (#4672)
  fix(IF Node): Fix "Is Empty" and "Is Not Empty" operation fails for date objects (#4670)
  ...
MiloradFilipovic added a commit that referenced this pull request Nov 23, 2022
* master: (35 commits)
  fix: Remove redundant await in node's api request functions without try/catch (#4639)
  fix(core): Fix `$items().length` behavior in `executeOnce` mode (#4694)
  perf(Code Node): Improve n8n item key validation performance (#4669)
  feat: Implement runtine check for enterprise features (no-changelog) (#4676)
  refactor: Consolidate `.prettierignore` patterns (no-changelog) (#4692)
  refactor: Improve error logging/reporting for `cli` (#4691)
  feat(editor): Add workflows list status filter (#4690)
  fix: Expand `nodes-base` formatting validation (no-changelog) (#4689)
  refactor: Improve warnings and error messages to users about sharing (#4687) (no-changelog)
  fix: Update subview switch condition (no-changelog) (#4688)
  refactor: Validate formatting in `nodes-base` (no-changelog) (#4685)
  feat: Show delete button based on workflow permissions (#4686)
  feat: Show toast when saving workflow sharing settings (#4684)
  feat: Add save confirmation modal when leaving sharing modal (#4683)
  fix: Update workflow title in workflowsById as well (no-changelog) (#4682)
  feat: Add share button to workflows list (#4681)
  feat: Add credentials E2E test suite and page object (#4596)
  fix(core): Use CredentialsOverwrites when testing credentials (#4675)
  refactor: Adjust credential endpoints permissions (#4656) (no-changelog)
  fix: Fix settings header text slot  (no-changelog) (#4667)
  ...

# Conflicts:
#	packages/editor-ui/src/components/WorkflowCard.vue
#	packages/editor-ui/src/views/WorkflowsView.vue
@janober
Copy link
Member

janober commented Nov 24, 2022

Got released with n8n@0.204.0

@janober janober removed the Upcoming Release Will be part of the upcoming release label Nov 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Enhancement outside /nodes-base and /editor-ui n8n team Authored by the n8n team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants