diff --git a/packages/pieces/community/amazon-s3/src/i18n/translation.json b/packages/pieces/community/amazon-s3/src/i18n/translation.json index f70be912d70..f37aeb89510 100644 --- a/packages/pieces/community/amazon-s3/src/i18n/translation.json +++ b/packages/pieces/community/amazon-s3/src/i18n/translation.json @@ -42,12 +42,14 @@ "Move File": "Move File", "Delete File": "Delete File", "List Files": "List Files", + "Decrypt PGP File": "Decrypt PGP File", "Upload an File to S3": "Upload an File to S3", "Read a file from S3 to use it in other steps": "Read a file from S3 to use it in other steps", "Generate a signed URL for a file in a s3 bucket": "Generate a signed URL for a file in a s3 bucket", "Move a File to Another Folder": "Move a File to Another Folder", "Deletes an existing file.": "Deletes an existing file.", "List all files from an S3 bucket folder/prefix.": "List all files from an S3 bucket folder/prefix.", + "Decrypt a PGP encrypted file from S3 using a private key stored in AWS Secrets Manager": "Decrypt a PGP encrypted file from S3 using a private key stored in AWS Secrets Manager", "File": "File", "File Name": "File Name", "ACL": "ACL", @@ -58,6 +60,10 @@ "Folder Key": "Folder Key", "Folder path": "Folder path", "Maximum Files": "Maximum Files", + "S3 File Key": "S3 File Key", + "Secret ARN": "Secret ARN", + "Passphrase ARN": "Passphrase ARN", + "Secrets Manager Region": "Secrets Manager Region", "The File Name to use, if not set the API will try to figure out the file name.": "The File Name to use, if not set the API will try to figure out the file name.", "Content Type of the uploaded file, if not set the API will try to figure out the content type.": "Content Type of the uploaded file, if not set the API will try to figure out the content type.", "The key of the file to read": "The key of the file to read", @@ -68,6 +74,10 @@ "The key of the file to delete.": "The key of the file to delete.", "The folder path to list files from (e.g., \"folder/\"). Leave empty to list from root.": "The folder path to list files from (e.g., \"folder/\"). Leave empty to list from root.", "Maximum number of files to return (1-1000)": "Maximum number of files to return (1-1000)", + "The key (path) of the encrypted file in S3": "The key (path) of the encrypted file in S3", + "The ARN of the secret in AWS Secrets Manager containing the PGP private key": "The ARN of the secret in AWS Secrets Manager containing the PGP private key", + "Optional ARN of the secret in AWS Secrets Manager containing the passphrase for the private key (if the key is encrypted)": "Optional ARN of the secret in AWS Secrets Manager containing the passphrase for the private key (if the key is encrypted)", + "The AWS region where the Secrets Manager secret is stored (defaults to S3 region if not provided)": "The AWS region where the Secrets Manager secret is stored (defaults to S3 region if not provided)", "private": "private", "public-read": "public-read", "public-read-write": "public-read-write", diff --git a/packages/pieces/community/file-helper/package.json b/packages/pieces/community/file-helper/package.json index 8be782900f4..a8125da2ffb 100644 --- a/packages/pieces/community/file-helper/package.json +++ b/packages/pieces/community/file-helper/package.json @@ -1,6 +1,6 @@ { "name": "@activepieces/piece-file-helper", - "version": "0.1.14", + "version": "0.1.15", "dependencies": { "adm-zip": "^0.5.16" }, diff --git a/packages/pieces/community/file-helper/src/i18n/fr.json b/packages/pieces/community/file-helper/src/i18n/fr.json index 06405543559..8796bf18f88 100644 --- a/packages/pieces/community/file-helper/src/i18n/fr.json +++ b/packages/pieces/community/file-helper/src/i18n/fr.json @@ -4,8 +4,8 @@ "Create file": "Créer un fichier", "Change File Encoding": "Modifier l'encodage du fichier", "Check file type": "Vérifier le type de fichier", - "Zip Files": "Fichiers Zip", - "Unzip File": "Décompresser le fichier", + "Zip Files": "Compresser les fichiers en Zip", + "Unzip File": "Décompresser le fichier Zip", "Read a file from the file system": "Lire un fichier depuis le système de fichiers", "Create file from content": "Créer un fichier à partir du contenu", "Changes the encoding of a file": "Modifie l'encodage d'un fichier", diff --git a/packages/pieces/community/file-helper/src/lib/actions/unzip-file.ts b/packages/pieces/community/file-helper/src/lib/actions/unzip-file.ts index cc845479d70..173b7998176 100644 --- a/packages/pieces/community/file-helper/src/lib/actions/unzip-file.ts +++ b/packages/pieces/community/file-helper/src/lib/actions/unzip-file.ts @@ -38,7 +38,7 @@ export const unzipFile = createAction({ } const results: Result[] = []; - zipFile.forEach(async (zipEntry) => { + for (const zipEntry of zipFile.getEntries()) { if (!zipEntry.isDirectory) { const fileReference = await context.files.write({ data: zipEntry.getData(), @@ -50,7 +50,7 @@ export const unzipFile = createAction({ filePath: zipEntry.entryName, }); } - }); + } return results; }, diff --git a/packages/react-ui/public/locales/de/translation.json b/packages/react-ui/public/locales/de/translation.json index fc2ade30796..738b84cdff4 100644 --- a/packages/react-ui/public/locales/de/translation.json +++ b/packages/react-ui/public/locales/de/translation.json @@ -426,7 +426,6 @@ "You tried to access a project that you do not have access to.": "", "Status": "Status", "Name": "Name", - "Owner": "Besitzer", "This connection is global and can be managed in the platform admin": "Diese Verbindung ist global und kann im Plattform-Admin verwaltet werden", "Connected At": "Verbunden am", "Delete Connections": "Verbindungen löschen", @@ -453,6 +452,7 @@ "Details": "Details", "Download": "Download", "Flow": "Ablauf", + "Owner": "Besitzer", "Project": "Projekt", "Not set": "", "You don't have permission to edit this flow": "", diff --git a/packages/react-ui/public/locales/en/translation.json b/packages/react-ui/public/locales/en/translation.json index 386c697e23c..1de6a4e1e9c 100644 --- a/packages/react-ui/public/locales/en/translation.json +++ b/packages/react-ui/public/locales/en/translation.json @@ -426,7 +426,6 @@ "You tried to access a project that you do not have access to.": "", "Status": "Status", "Name": "Name", - "Owner": "Owner", "This connection is global and can be managed in the platform admin": "This connection is global and can be managed in the platform admin", "Connected At": "Connected At", "Delete Connections": "Delete Connections", @@ -453,6 +452,7 @@ "Details": "Details", "Download": "Download", "Flow": "Flow", + "Owner": "Owner", "Project": "Project", "Not set": "", "You don't have permission to edit this flow": "", diff --git a/packages/react-ui/public/locales/es/translation.json b/packages/react-ui/public/locales/es/translation.json index e6a3fa5115f..ac888897a84 100644 --- a/packages/react-ui/public/locales/es/translation.json +++ b/packages/react-ui/public/locales/es/translation.json @@ -426,7 +426,6 @@ "You tried to access a project that you do not have access to.": "", "Status": "Estado", "Name": "Nombre", - "Owner": "Propietario", "This connection is global and can be managed in the platform admin": "Esta conexión es global y se puede administrar en el administrador de la plataforma", "Connected At": "Conectado en", "Delete Connections": "Eliminar conexiones", @@ -453,6 +452,7 @@ "Details": "Detalles", "Download": "Descargar", "Flow": "Flujo", + "Owner": "Propietario", "Project": "Projekt", "Not set": "", "You don't have permission to edit this flow": "", diff --git a/packages/react-ui/public/locales/fr/translation.json b/packages/react-ui/public/locales/fr/translation.json index 0e59044c123..0b335cb215e 100644 --- a/packages/react-ui/public/locales/fr/translation.json +++ b/packages/react-ui/public/locales/fr/translation.json @@ -426,7 +426,6 @@ "You tried to access a project that you do not have access to.": "", "Status": "Statut", "Name": "Nom", - "Owner": "Propriétaire", "This connection is global and can be managed in the platform admin": "Cette connexion est globale et peut être gérée dans l'admin de la plateforme", "Connected At": "Connecté à", "Delete Connections": "Supprimer les connexions", @@ -453,6 +452,7 @@ "Details": "Détails", "Download": "Télécharger", "Flow": "Flow", + "Owner": "Propriétaire", "Project": "Projet", "Not set": "", "You don't have permission to edit this flow": "", diff --git a/packages/react-ui/public/locales/ja/translation.json b/packages/react-ui/public/locales/ja/translation.json index 8e3cb446a92..4ade172211e 100644 --- a/packages/react-ui/public/locales/ja/translation.json +++ b/packages/react-ui/public/locales/ja/translation.json @@ -426,7 +426,6 @@ "You tried to access a project that you do not have access to.": "", "Status": "ステータス", "Name": "名前", - "Owner": "所有者", "This connection is global and can be managed in the platform admin": "この接続はグローバルで、プラットフォーム管理者で管理できます", "Connected At": "接続日時", "Delete Connections": "コネクションの削除", @@ -453,6 +452,7 @@ "Details": "詳細", "Download": "ダウンロード", "Flow": "フロー", + "Owner": "所有者", "Project": "プロジェクト", "Not set": "", "You don't have permission to edit this flow": "", diff --git a/packages/react-ui/public/locales/nl/translation.json b/packages/react-ui/public/locales/nl/translation.json index 246e6b74cb5..546252d4b8d 100644 --- a/packages/react-ui/public/locales/nl/translation.json +++ b/packages/react-ui/public/locales/nl/translation.json @@ -426,7 +426,6 @@ "You tried to access a project that you do not have access to.": "", "Status": "status", "Name": "Naam", - "Owner": "Eigenaar", "This connection is global and can be managed in the platform admin": "Deze verbinding is globaal en kan worden beheerd in de platformbeheerder", "Connected At": "Verbonden op", "Delete Connections": "Contacten verwijderen", @@ -453,6 +452,7 @@ "Details": "Beschrijving", "Download": "downloaden", "Flow": "Stroom", + "Owner": "Eigenaar", "Project": "Project", "Not set": "", "You don't have permission to edit this flow": "", diff --git a/packages/react-ui/public/locales/pt/translation.json b/packages/react-ui/public/locales/pt/translation.json index ff496bc8ec4..54082e4916c 100644 --- a/packages/react-ui/public/locales/pt/translation.json +++ b/packages/react-ui/public/locales/pt/translation.json @@ -426,7 +426,6 @@ "You tried to access a project that you do not have access to.": "", "Status": "Estado", "Name": "Nome", - "Owner": "Proprietário", "This connection is global and can be managed in the platform admin": "Essa conexão é global e pode ser gerenciada no administrador da plataforma", "Connected At": "Conectado em", "Delete Connections": "Excluir conexões", @@ -453,6 +452,7 @@ "Details": "detalhes", "Download": "BAIXAR", "Flow": "Fluxo", + "Owner": "Proprietário", "Project": "Projecto", "Not set": "", "You don't have permission to edit this flow": "", diff --git a/packages/react-ui/public/locales/zh-TW/translation.json b/packages/react-ui/public/locales/zh-TW/translation.json index 6f35dd03f08..7f562413f01 100644 --- a/packages/react-ui/public/locales/zh-TW/translation.json +++ b/packages/react-ui/public/locales/zh-TW/translation.json @@ -426,7 +426,6 @@ "You tried to access a project that you do not have access to.": "", "Status": "", "Name": "", - "Owner": "", "This connection is global and can be managed in the platform admin": "", "Connected At": "", "Delete Connections": "", @@ -453,6 +452,7 @@ "Details": "", "Download": "", "Flow": "", + "Owner": "", "Project": "", "Not set": "", "You don't have permission to edit this flow": "", diff --git a/packages/react-ui/public/locales/zh/translation.json b/packages/react-ui/public/locales/zh/translation.json index bc3166b9505..de19988e568 100644 --- a/packages/react-ui/public/locales/zh/translation.json +++ b/packages/react-ui/public/locales/zh/translation.json @@ -426,7 +426,6 @@ "You tried to access a project that you do not have access to.": "", "Status": "状态", "Name": "名称", - "Owner": "所有者", "This connection is global and can be managed in the platform admin": "此连接是全局的,可以在平台管理器中管理", "Connected At": "连接于", "Delete Connections": "Delete Connections", @@ -453,6 +452,7 @@ "Details": "详细信息", "Download": "下载", "Flow": "流", + "Owner": "所有者", "Project": "项目", "Not set": "", "You don't have permission to edit this flow": "", diff --git a/packages/server/api/src/app/core/security/v2/authz/projectIdExtractor.ts b/packages/server/api/src/app/core/security/v2/authz/projectIdExtractor.ts index 043614385ea..619959fa040 100644 --- a/packages/server/api/src/app/core/security/v2/authz/projectIdExtractor.ts +++ b/packages/server/api/src/app/core/security/v2/authz/projectIdExtractor.ts @@ -1,5 +1,5 @@ import { EntitySourceType, ProjectBodyResource, ProjectParamResource, ProjectQueryResource, ProjectTableResource } from '@activepieces/server-shared' -import { assertNotNullOrUndefined, isNil, isObject } from '@activepieces/shared' +import { ActivepiecesError, assertNotNullOrUndefined, ErrorCode, isNil, isObject } from '@activepieces/shared' import { FastifyRequest } from 'fastify' import { databaseConnection } from '../../../../database/database-connection' @@ -31,7 +31,16 @@ export const projectIdExtractor = { const entity = await databaseConnection().getRepository(projectTableResource.tableName).findOneBy({ [entityField]: entityValue, }) - return entity?.projectId ?? entity?.projectIds?.[0] ?? undefined + if (isNil(entity)) { + throw new ActivepiecesError({ + code: ErrorCode.ENTITY_NOT_FOUND, + params: { + entityId: entityValue, + entityType: projectTableResource.tableName.options.name, + }, + }) + } + return entity.projectId ?? entity.projectIds?.[0] ?? undefined }, fromBody(request: FastifyRequest, projectBodyResource: ProjectBodyResource): string | undefined {