n8n 1.90.0 → 1.90.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/build.tsbuildinfo +1 -1
- package/dist/databases/migrations/common/1742918400000-AddScopesColumnToApiKeys.d.ts +1 -1
- package/dist/databases/migrations/common/1742918400000-AddScopesColumnToApiKeys.js +4 -4
- package/dist/databases/migrations/common/1742918400000-AddScopesColumnToApiKeys.js.map +1 -1
- package/package.json +6 -6
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { MigrationContext, ReversibleMigration } from '../../../databases/types';
|
|
2
2
|
export declare class AddScopesColumnToApiKeys1742918400000 implements ReversibleMigration {
|
|
3
|
-
up({ runQuery, escape, schemaBuilder: { addColumns, column } }: MigrationContext): Promise<void>;
|
|
3
|
+
up({ runQuery, escape, queryRunner, schemaBuilder: { addColumns, column }, }: MigrationContext): Promise<void>;
|
|
4
4
|
down({ schemaBuilder: { dropColumns } }: MigrationContext): Promise<void>;
|
|
5
5
|
}
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.AddScopesColumnToApiKeys1742918400000 = void 0;
|
|
4
|
+
const api_key_1 = require("../../../databases/entities/api-key");
|
|
4
5
|
const permissions_ee_1 = require("../../../public-api/permissions.ee");
|
|
5
6
|
class AddScopesColumnToApiKeys1742918400000 {
|
|
6
|
-
async up({ runQuery, escape, schemaBuilder: { addColumns, column } }) {
|
|
7
|
+
async up({ runQuery, escape, queryRunner, schemaBuilder: { addColumns, column }, }) {
|
|
7
8
|
await addColumns('user_api_keys', [column('scopes').json]);
|
|
8
9
|
const userApiKeysTable = escape.tableName('user_api_keys');
|
|
9
10
|
const userTable = escape.tableName('user');
|
|
10
11
|
const idColumn = escape.columnName('id');
|
|
11
12
|
const userIdColumn = escape.columnName('userId');
|
|
12
13
|
const roleColumn = escape.columnName('role');
|
|
13
|
-
const scopesColumn = escape.columnName('scopes');
|
|
14
14
|
const apiKeysWithRoles = await runQuery(`SELECT ${userApiKeysTable}.${idColumn} AS id, ${userTable}.${roleColumn} AS role FROM ${userApiKeysTable} JOIN ${userTable} ON ${userTable}.${idColumn} = ${userApiKeysTable}.${userIdColumn}`);
|
|
15
15
|
for (const { id, role } of apiKeysWithRoles) {
|
|
16
|
-
const scopes =
|
|
17
|
-
await
|
|
16
|
+
const scopes = (0, permissions_ee_1.getApiKeyScopesForRole)(role);
|
|
17
|
+
await queryRunner.manager.update(api_key_1.ApiKey, { id }, { scopes });
|
|
18
18
|
}
|
|
19
19
|
}
|
|
20
20
|
async down({ schemaBuilder: { dropColumns } }) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"1742918400000-AddScopesColumnToApiKeys.js","sourceRoot":"","sources":["../../../../src/databases/migrations/common/1742918400000-AddScopesColumnToApiKeys.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"1742918400000-AddScopesColumnToApiKeys.js","sourceRoot":"","sources":["../../../../src/databases/migrations/common/1742918400000-AddScopesColumnToApiKeys.ts"],"names":[],"mappings":";;;AAEA,0DAAsD;AAEtD,gEAAqE;AAIrE,MAAa,qCAAqC;IACjD,KAAK,CAAC,EAAE,CAAC,EACR,QAAQ,EACR,MAAM,EACN,WAAW,EACX,aAAa,EAAE,EAAE,UAAU,EAAE,MAAM,EAAE,GACnB;QAClB,MAAM,UAAU,CAAC,eAAe,EAAE,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC;QAE3D,MAAM,gBAAgB,GAAG,MAAM,CAAC,SAAS,CAAC,eAAe,CAAC,CAAC;QAC3D,MAAM,SAAS,GAAG,MAAM,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;QAC3C,MAAM,QAAQ,GAAG,MAAM,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;QACzC,MAAM,YAAY,GAAG,MAAM,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC;QACjD,MAAM,UAAU,GAAG,MAAM,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC;QAE7C,MAAM,gBAAgB,GAAG,MAAM,QAAQ,CACtC,UAAU,gBAAgB,IAAI,QAAQ,WAAW,SAAS,IAAI,UAAU,iBAAiB,gBAAgB,SAAS,SAAS,OAAO,SAAS,IAAI,QAAQ,MAAM,gBAAgB,IAAI,YAAY,EAAE,CAC/L,CAAC;QAEF,KAAK,MAAM,EAAE,EAAE,EAAE,IAAI,EAAE,IAAI,gBAAgB,EAAE,CAAC;YAC7C,MAAM,MAAM,GAAG,IAAA,uCAAsB,EAAC,IAAI,CAAC,CAAC;YAC5C,MAAM,WAAW,CAAC,OAAO,CAAC,MAAM,CAAC,gBAAM,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,MAAM,EAAE,CAAC,CAAC;QAC9D,CAAC;IACF,CAAC;IAED,KAAK,CAAC,IAAI,CAAC,EAAE,aAAa,EAAE,EAAE,WAAW,EAAE,EAAoB;QAC9D,MAAM,WAAW,CAAC,eAAe,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC;IAChD,CAAC;CACD;AA5BD,sFA4BC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "n8n",
|
|
3
|
-
"version": "1.90.
|
|
3
|
+
"version": "1.90.1",
|
|
4
4
|
"description": "n8n Workflow Automation Tool",
|
|
5
5
|
"main": "dist/index",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -142,17 +142,17 @@
|
|
|
142
142
|
"xss": "1.0.15",
|
|
143
143
|
"yamljs": "0.3.0",
|
|
144
144
|
"zod": "3.24.1",
|
|
145
|
-
"@n8n/config": "1.37.0",
|
|
146
145
|
"@n8n/api-types": "0.25.0",
|
|
147
|
-
"@n8n/
|
|
146
|
+
"@n8n/config": "1.37.0",
|
|
148
147
|
"@n8n/di": "0.5.0",
|
|
149
|
-
"@n8n/n8n-nodes-langchain": "1.90.0",
|
|
150
148
|
"@n8n/permissions": "0.22.0",
|
|
151
149
|
"@n8n/task-runner": "1.27.0",
|
|
152
150
|
"n8n-core": "1.89.0",
|
|
153
|
-
"n8n-
|
|
151
|
+
"n8n-editor-ui": "1.90.0",
|
|
152
|
+
"@n8n/n8n-nodes-langchain": "1.90.0",
|
|
154
153
|
"n8n-nodes-base": "1.89.0",
|
|
155
|
-
"n8n-
|
|
154
|
+
"@n8n/client-oauth2": "0.23.0",
|
|
155
|
+
"n8n-workflow": "1.88.0"
|
|
156
156
|
},
|
|
157
157
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
158
158
|
"homepage": "https://n8n.io",
|