i18n - translations (#16832)

Created by Github action

---------

Co-authored-by: Félix Malfait <felix@twenty.com>
Co-authored-by: github-actions <github-actions@twenty.com>
This commit is contained in:
github-actions[bot]
2025-12-29 11:01:07 +01:00
committed by GitHub
parent 343b74666f
commit ee0e2ed854
69 changed files with 270 additions and 141 deletions
@@ -1960,7 +1960,6 @@ export type Mutation = {
updateWorkspaceMemberRole: WorkspaceMember;
uploadFile: SignedFile;
uploadImage: SignedFile;
uploadProfilePicture: SignedFile;
uploadWorkspaceLogo: SignedFile;
uploadWorkspaceMemberProfilePicture: SignedFile;
upsertFieldPermissions: Array<FieldPermission>;
@@ -2850,11 +2849,6 @@ export type MutationUploadImageArgs = {
};
export type MutationUploadProfilePictureArgs = {
file: Scalars['Upload'];
};
export type MutationUploadWorkspaceLogoArgs = {
file: Scalars['Upload'];
};
@@ -6120,13 +6114,6 @@ export type DeleteUserWorkspaceMutationVariables = Exact<{
export type DeleteUserWorkspaceMutation = { __typename?: 'Mutation', deleteUserFromWorkspace: { __typename?: 'UserWorkspace', id: string } };
export type UploadProfilePictureMutationVariables = Exact<{
file: Scalars['Upload'];
}>;
export type UploadProfilePictureMutation = { __typename?: 'Mutation', uploadProfilePicture: { __typename?: 'SignedFile', path: string, token: string } };
export type GetCurrentUserQueryVariables = Exact<{ [key: string]: never; }>;
@@ -12752,40 +12739,6 @@ export function useDeleteUserWorkspaceMutation(baseOptions?: Apollo.MutationHook
export type DeleteUserWorkspaceMutationHookResult = ReturnType<typeof useDeleteUserWorkspaceMutation>;
export type DeleteUserWorkspaceMutationResult = Apollo.MutationResult<DeleteUserWorkspaceMutation>;
export type DeleteUserWorkspaceMutationOptions = Apollo.BaseMutationOptions<DeleteUserWorkspaceMutation, DeleteUserWorkspaceMutationVariables>;
export const UploadProfilePictureDocument = gql`
mutation UploadProfilePicture($file: Upload!) {
uploadProfilePicture(file: $file) {
path
token
}
}
`;
export type UploadProfilePictureMutationFn = Apollo.MutationFunction<UploadProfilePictureMutation, UploadProfilePictureMutationVariables>;
/**
* __useUploadProfilePictureMutation__
*
* To run a mutation, you first call `useUploadProfilePictureMutation` within a React component and pass it any options that fit your needs.
* When your component renders, `useUploadProfilePictureMutation` returns a tuple that includes:
* - A mutate function that you can call at any time to execute the mutation
* - An object with fields that represent the current status of the mutation's execution
*
* @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2;
*
* @example
* const [uploadProfilePictureMutation, { data, loading, error }] = useUploadProfilePictureMutation({
* variables: {
* file: // value for 'file'
* },
* });
*/
export function useUploadProfilePictureMutation(baseOptions?: Apollo.MutationHookOptions<UploadProfilePictureMutation, UploadProfilePictureMutationVariables>) {
const options = {...defaultOptions, ...baseOptions}
return Apollo.useMutation<UploadProfilePictureMutation, UploadProfilePictureMutationVariables>(UploadProfilePictureDocument, options);
}
export type UploadProfilePictureMutationHookResult = ReturnType<typeof useUploadProfilePictureMutation>;
export type UploadProfilePictureMutationResult = Apollo.MutationResult<UploadProfilePictureMutation>;
export type UploadProfilePictureMutationOptions = Apollo.BaseMutationOptions<UploadProfilePictureMutation, UploadProfilePictureMutationVariables>;
export const GetCurrentUserDocument = gql`
query GetCurrentUser {
currentUser {
@@ -1927,7 +1927,6 @@ export type Mutation = {
updateWorkspaceMemberRole: WorkspaceMember;
uploadFile: SignedFile;
uploadImage: SignedFile;
uploadProfilePicture: SignedFile;
uploadWorkspaceLogo: SignedFile;
uploadWorkspaceMemberProfilePicture: SignedFile;
upsertFieldPermissions: Array<FieldPermission>;
@@ -2771,11 +2770,6 @@ export type MutationUploadImageArgs = {
};
export type MutationUploadProfilePictureArgs = {
file: Scalars['Upload'];
};
export type MutationUploadWorkspaceLogoArgs = {
file: Scalars['Upload'];
};
@@ -1,10 +0,0 @@
import { gql } from '@apollo/client';
export const UPLOAD_PROFILE_PICTURE = gql`
mutation UploadProfilePicture($file: Upload!) {
uploadProfilePicture(file: $file) {
path
token
}
}
`;
@@ -6462,6 +6462,11 @@ msgstr "Jy het nie toestemming om hierdie werkvloei-aksie uit te voer nie."
msgid "You do not have permission to update these fields: {fieldsList}. Please contact your workspace administrator."
msgstr "Jy het nie toestemming om hierdie velde op te dateer nie: {fieldsList}. Kontak asseblief jou werkruimte administrateur."
#. js-lingui-id: ZPo5fR
#: src/engine/core-modules/user-workspace/guards/upload-profile-picture-permission.guard.ts
msgid "You do not have permission to upload profile pictures. Please contact your workspace administrator for access."
msgstr ""
#. js-lingui-id: M1he8p
#: src/engine/metadata-modules/view/exceptions/view.exception.ts
msgid "You don't have permission to create workspace-level views."
@@ -6462,6 +6462,11 @@ msgstr "ليس لديك إذن لتنفيذ إجراء سير العمل هذا.
msgid "You do not have permission to update these fields: {fieldsList}. Please contact your workspace administrator."
msgstr "ليس لديك إذن لتحديث هذه الحقول: {fieldsList}. يُرجى الاتصال بمسؤول مساحة العمل الخاص بك."
#. js-lingui-id: ZPo5fR
#: src/engine/core-modules/user-workspace/guards/upload-profile-picture-permission.guard.ts
msgid "You do not have permission to upload profile pictures. Please contact your workspace administrator for access."
msgstr ""
#. js-lingui-id: M1he8p
#: src/engine/metadata-modules/view/exceptions/view.exception.ts
msgid "You don't have permission to create workspace-level views."
@@ -6462,6 +6462,11 @@ msgstr "No tens permís per realitzar aquesta acció del flux de treball."
msgid "You do not have permission to update these fields: {fieldsList}. Please contact your workspace administrator."
msgstr "No tens permís per actualitzar aquests camps: {fieldsList}. Si us plau, contacta amb l'administrador del teu espai de treball."
#. js-lingui-id: ZPo5fR
#: src/engine/core-modules/user-workspace/guards/upload-profile-picture-permission.guard.ts
msgid "You do not have permission to upload profile pictures. Please contact your workspace administrator for access."
msgstr ""
#. js-lingui-id: M1he8p
#: src/engine/metadata-modules/view/exceptions/view.exception.ts
msgid "You don't have permission to create workspace-level views."
@@ -6462,6 +6462,11 @@ msgstr "Nemáte oprávnění k provedení této akce pracovního postupu."
msgid "You do not have permission to update these fields: {fieldsList}. Please contact your workspace administrator."
msgstr "Nemáte oprávnění k aktualizaci těchto polí: {fieldsList}. Kontaktujte prosím svého správce pracovního prostoru."
#. js-lingui-id: ZPo5fR
#: src/engine/core-modules/user-workspace/guards/upload-profile-picture-permission.guard.ts
msgid "You do not have permission to upload profile pictures. Please contact your workspace administrator for access."
msgstr ""
#. js-lingui-id: M1he8p
#: src/engine/metadata-modules/view/exceptions/view.exception.ts
msgid "You don't have permission to create workspace-level views."
@@ -6462,6 +6462,11 @@ msgstr "Du har ikke tilladelse til at udføre denne arbejdsgangshandling."
msgid "You do not have permission to update these fields: {fieldsList}. Please contact your workspace administrator."
msgstr "Du har ikke adgang til at opdatere disse felter: {fieldsList}. Kontakt venligst din workspace administrator."
#. js-lingui-id: ZPo5fR
#: src/engine/core-modules/user-workspace/guards/upload-profile-picture-permission.guard.ts
msgid "You do not have permission to upload profile pictures. Please contact your workspace administrator for access."
msgstr ""
#. js-lingui-id: M1he8p
#: src/engine/metadata-modules/view/exceptions/view.exception.ts
msgid "You don't have permission to create workspace-level views."
@@ -6462,6 +6462,11 @@ msgstr "Sie haben keine Berechtigung, diese Workflow-Aktion auszuführen."
msgid "You do not have permission to update these fields: {fieldsList}. Please contact your workspace administrator."
msgstr "Sie haben keine Berechtigung, diese Felder zu aktualisieren: {fieldsList}. Bitte kontaktieren Sie Ihren Arbeitsbereichsadministrator."
#. js-lingui-id: ZPo5fR
#: src/engine/core-modules/user-workspace/guards/upload-profile-picture-permission.guard.ts
msgid "You do not have permission to upload profile pictures. Please contact your workspace administrator for access."
msgstr ""
#. js-lingui-id: M1he8p
#: src/engine/metadata-modules/view/exceptions/view.exception.ts
msgid "You don't have permission to create workspace-level views."
@@ -6462,6 +6462,11 @@ msgstr "Δεν έχετε δικαίωμα να εκτελέσετε αυτήν
msgid "You do not have permission to update these fields: {fieldsList}. Please contact your workspace administrator."
msgstr "Δεν έχετε άδεια να ενημερώσετε αυτά τα πεδία: {fieldsList}. Παρακαλώ επικοινωνήστε με τον διαχειριστή του workspace σας."
#. js-lingui-id: ZPo5fR
#: src/engine/core-modules/user-workspace/guards/upload-profile-picture-permission.guard.ts
msgid "You do not have permission to upload profile pictures. Please contact your workspace administrator for access."
msgstr ""
#. js-lingui-id: M1he8p
#: src/engine/metadata-modules/view/exceptions/view.exception.ts
msgid "You don't have permission to create workspace-level views."
@@ -6457,6 +6457,11 @@ msgstr "You do not have permission to perform this workflow action."
msgid "You do not have permission to update these fields: {fieldsList}. Please contact your workspace administrator."
msgstr "You do not have permission to update these fields: {fieldsList}. Please contact your workspace administrator."
#. js-lingui-id: ZPo5fR
#: src/engine/core-modules/user-workspace/guards/upload-profile-picture-permission.guard.ts
msgid "You do not have permission to upload profile pictures. Please contact your workspace administrator for access."
msgstr "You do not have permission to upload profile pictures. Please contact your workspace administrator for access."
#. js-lingui-id: M1he8p
#: src/engine/metadata-modules/view/exceptions/view.exception.ts
msgid "You don't have permission to create workspace-level views."
@@ -6462,6 +6462,11 @@ msgstr "No tiene permiso para realizar esta acción del flujo de trabajo."
msgid "You do not have permission to update these fields: {fieldsList}. Please contact your workspace administrator."
msgstr "No tiene permiso para actualizar estos campos: {fieldsList}. Por favor, contacte con su administrador de espacio de trabajo."
#. js-lingui-id: ZPo5fR
#: src/engine/core-modules/user-workspace/guards/upload-profile-picture-permission.guard.ts
msgid "You do not have permission to upload profile pictures. Please contact your workspace administrator for access."
msgstr ""
#. js-lingui-id: M1he8p
#: src/engine/metadata-modules/view/exceptions/view.exception.ts
msgid "You don't have permission to create workspace-level views."
@@ -6462,6 +6462,11 @@ msgstr "Sinulla ei ole oikeutta suorittaa tätä työnkulun toimintoa."
msgid "You do not have permission to update these fields: {fieldsList}. Please contact your workspace administrator."
msgstr "Sinulla ei ole lupaa päivittää näitä kenttiä: {fieldsList}. Ota yhteyttä työtilan ylläpitäjään."
#. js-lingui-id: ZPo5fR
#: src/engine/core-modules/user-workspace/guards/upload-profile-picture-permission.guard.ts
msgid "You do not have permission to upload profile pictures. Please contact your workspace administrator for access."
msgstr ""
#. js-lingui-id: M1he8p
#: src/engine/metadata-modules/view/exceptions/view.exception.ts
msgid "You don't have permission to create workspace-level views."
@@ -6462,6 +6462,11 @@ msgstr "Vous n'avez pas l'autorisation d'effectuer cette action de workflow."
msgid "You do not have permission to update these fields: {fieldsList}. Please contact your workspace administrator."
msgstr "Vous n'avez pas la permission de mettre à jour ces champs : {fieldsList}. Veuillez contacter votre administrateur de l'espace de travail."
#. js-lingui-id: ZPo5fR
#: src/engine/core-modules/user-workspace/guards/upload-profile-picture-permission.guard.ts
msgid "You do not have permission to upload profile pictures. Please contact your workspace administrator for access."
msgstr ""
#. js-lingui-id: M1he8p
#: src/engine/metadata-modules/view/exceptions/view.exception.ts
msgid "You don't have permission to create workspace-level views."
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -6462,6 +6462,11 @@ msgstr "אין לך הרשאה לבצע פעולה זו בזרימת העבוד
msgid "You do not have permission to update these fields: {fieldsList}. Please contact your workspace administrator."
msgstr "אין לך הרשאה לעדכן את השדות הבאים: {fieldsList}. אנא פנה למנהל המרחב שלך."
#. js-lingui-id: ZPo5fR
#: src/engine/core-modules/user-workspace/guards/upload-profile-picture-permission.guard.ts
msgid "You do not have permission to upload profile pictures. Please contact your workspace administrator for access."
msgstr ""
#. js-lingui-id: M1he8p
#: src/engine/metadata-modules/view/exceptions/view.exception.ts
msgid "You don't have permission to create workspace-level views."
@@ -6462,6 +6462,11 @@ msgstr "Nincs jogosultsága a munkafolyamat-művelet végrehajtásához."
msgid "You do not have permission to update these fields: {fieldsList}. Please contact your workspace administrator."
msgstr "Nincs engedélye a következő mezők frissítésére: {fieldsList}. Kérjük, lépjen kapcsolatba munkaterületének adminisztrátorával."
#. js-lingui-id: ZPo5fR
#: src/engine/core-modules/user-workspace/guards/upload-profile-picture-permission.guard.ts
msgid "You do not have permission to upload profile pictures. Please contact your workspace administrator for access."
msgstr ""
#. js-lingui-id: M1he8p
#: src/engine/metadata-modules/view/exceptions/view.exception.ts
msgid "You don't have permission to create workspace-level views."
@@ -6462,6 +6462,11 @@ msgstr "Non hai il permesso di eseguire questa azione del flusso di lavoro."
msgid "You do not have permission to update these fields: {fieldsList}. Please contact your workspace administrator."
msgstr "Non hai il permesso di aggiornare questi campi: {fieldsList}. Si prega di contattare l'amministratore del tuo workspace."
#. js-lingui-id: ZPo5fR
#: src/engine/core-modules/user-workspace/guards/upload-profile-picture-permission.guard.ts
msgid "You do not have permission to upload profile pictures. Please contact your workspace administrator for access."
msgstr ""
#. js-lingui-id: M1he8p
#: src/engine/metadata-modules/view/exceptions/view.exception.ts
msgid "You don't have permission to create workspace-level views."
@@ -6462,6 +6462,11 @@ msgstr "このワークフロー操作を実行する権限がありません。
msgid "You do not have permission to update these fields: {fieldsList}. Please contact your workspace administrator."
msgstr "これらのフィールドを更新する権限がありません: {fieldsList}。ワークスペース管理者に連絡してください。"
#. js-lingui-id: ZPo5fR
#: src/engine/core-modules/user-workspace/guards/upload-profile-picture-permission.guard.ts
msgid "You do not have permission to upload profile pictures. Please contact your workspace administrator for access."
msgstr ""
#. js-lingui-id: M1he8p
#: src/engine/metadata-modules/view/exceptions/view.exception.ts
msgid "You don't have permission to create workspace-level views."
@@ -6462,6 +6462,11 @@ msgstr "이 워크플로우 작업을 수행할 권한이 없습니다."
msgid "You do not have permission to update these fields: {fieldsList}. Please contact your workspace administrator."
msgstr "다음 필드를 업데이트할 권한이 없습니다: {fieldsList}. 작업 공간 관리자에게 문의하십시오."
#. js-lingui-id: ZPo5fR
#: src/engine/core-modules/user-workspace/guards/upload-profile-picture-permission.guard.ts
msgid "You do not have permission to upload profile pictures. Please contact your workspace administrator for access."
msgstr ""
#. js-lingui-id: M1he8p
#: src/engine/metadata-modules/view/exceptions/view.exception.ts
msgid "You don't have permission to create workspace-level views."
@@ -6462,6 +6462,11 @@ msgstr "Je hebt geen toestemming om deze workflowactie uit te voeren."
msgid "You do not have permission to update these fields: {fieldsList}. Please contact your workspace administrator."
msgstr "U heeft geen toestemming om deze velden bij te werken: {fieldsList}. Neem contact op met uw werkruimtebeheerder."
#. js-lingui-id: ZPo5fR
#: src/engine/core-modules/user-workspace/guards/upload-profile-picture-permission.guard.ts
msgid "You do not have permission to upload profile pictures. Please contact your workspace administrator for access."
msgstr ""
#. js-lingui-id: M1he8p
#: src/engine/metadata-modules/view/exceptions/view.exception.ts
msgid "You don't have permission to create workspace-level views."
@@ -6462,6 +6462,11 @@ msgstr "Du har ikke tillatelse til å utføre denne arbeidsflythandlingen."
msgid "You do not have permission to update these fields: {fieldsList}. Please contact your workspace administrator."
msgstr "Du har ikke tillatelse til å oppdatere disse feltene: {fieldsList}. Vennligst kontakt arbeidsplassadministratoren din."
#. js-lingui-id: ZPo5fR
#: src/engine/core-modules/user-workspace/guards/upload-profile-picture-permission.guard.ts
msgid "You do not have permission to upload profile pictures. Please contact your workspace administrator for access."
msgstr ""
#. js-lingui-id: M1he8p
#: src/engine/metadata-modules/view/exceptions/view.exception.ts
msgid "You don't have permission to create workspace-level views."
@@ -6462,6 +6462,11 @@ msgstr "Nie masz uprawnień do wykonania tej akcji przepływu pracy."
msgid "You do not have permission to update these fields: {fieldsList}. Please contact your workspace administrator."
msgstr "Nie masz uprawnień do aktualizacji tych pól: {fieldsList}. Proszę skontaktować się z administratorem obszaru roboczego."
#. js-lingui-id: ZPo5fR
#: src/engine/core-modules/user-workspace/guards/upload-profile-picture-permission.guard.ts
msgid "You do not have permission to upload profile pictures. Please contact your workspace administrator for access."
msgstr ""
#. js-lingui-id: M1he8p
#: src/engine/metadata-modules/view/exceptions/view.exception.ts
msgid "You don't have permission to create workspace-level views."
@@ -6457,6 +6457,11 @@ msgstr ""
msgid "You do not have permission to update these fields: {fieldsList}. Please contact your workspace administrator."
msgstr ""
#. js-lingui-id: ZPo5fR
#: src/engine/core-modules/user-workspace/guards/upload-profile-picture-permission.guard.ts
msgid "You do not have permission to upload profile pictures. Please contact your workspace administrator for access."
msgstr ""
#. js-lingui-id: M1he8p
#: src/engine/metadata-modules/view/exceptions/view.exception.ts
msgid "You don't have permission to create workspace-level views."
@@ -6462,6 +6462,11 @@ msgstr "Você não tem permissão para executar esta ação do fluxo de trabalho
msgid "You do not have permission to update these fields: {fieldsList}. Please contact your workspace administrator."
msgstr "Você não tem permissão para atualizar estes campos: {fieldsList}. Por favor, entre em contato com o administrador do seu espaço de trabalho."
#. js-lingui-id: ZPo5fR
#: src/engine/core-modules/user-workspace/guards/upload-profile-picture-permission.guard.ts
msgid "You do not have permission to upload profile pictures. Please contact your workspace administrator for access."
msgstr ""
#. js-lingui-id: M1he8p
#: src/engine/metadata-modules/view/exceptions/view.exception.ts
msgid "You don't have permission to create workspace-level views."
@@ -6462,6 +6462,11 @@ msgstr "Você não tem permissão para executar esta ação do fluxo de trabalho
msgid "You do not have permission to update these fields: {fieldsList}. Please contact your workspace administrator."
msgstr "Você não tem permissão para atualizar estes campos: {fieldsList}. Por favor, entre em contato com o administrador da área de trabalho."
#. js-lingui-id: ZPo5fR
#: src/engine/core-modules/user-workspace/guards/upload-profile-picture-permission.guard.ts
msgid "You do not have permission to upload profile pictures. Please contact your workspace administrator for access."
msgstr ""
#. js-lingui-id: M1he8p
#: src/engine/metadata-modules/view/exceptions/view.exception.ts
msgid "You don't have permission to create workspace-level views."
@@ -6462,6 +6462,11 @@ msgstr "Nu aveți permisiunea de a efectua această acțiune de workflow."
msgid "You do not have permission to update these fields: {fieldsList}. Please contact your workspace administrator."
msgstr "Nu aveți permisiunea de a actualiza aceste câmpuri: {fieldsList}. Vă rugăm să contactați administratorul spațiului dumneavoastră de lucru."
#. js-lingui-id: ZPo5fR
#: src/engine/core-modules/user-workspace/guards/upload-profile-picture-permission.guard.ts
msgid "You do not have permission to upload profile pictures. Please contact your workspace administrator for access."
msgstr ""
#. js-lingui-id: M1he8p
#: src/engine/metadata-modules/view/exceptions/view.exception.ts
msgid "You don't have permission to create workspace-level views."
@@ -6462,6 +6462,11 @@ msgstr "У вас нет прав для выполнения этого дей
msgid "You do not have permission to update these fields: {fieldsList}. Please contact your workspace administrator."
msgstr "У вас нет разрешения на обновление этих полей: {fieldsList}. Пожалуйста, обратитесь к администратору вашей рабочей группы."
#. js-lingui-id: ZPo5fR
#: src/engine/core-modules/user-workspace/guards/upload-profile-picture-permission.guard.ts
msgid "You do not have permission to upload profile pictures. Please contact your workspace administrator for access."
msgstr ""
#. js-lingui-id: M1he8p
#: src/engine/metadata-modules/view/exceptions/view.exception.ts
msgid "You don't have permission to create workspace-level views."
@@ -6462,6 +6462,11 @@ msgstr "Немате дозволу да извршите ову радњу ра
msgid "You do not have permission to update these fields: {fieldsList}. Please contact your workspace administrator."
msgstr "Немате дозволу за ажурирање ових поља: {fieldsList}. Молимо контактирајте администратора ваше радне површине."
#. js-lingui-id: ZPo5fR
#: src/engine/core-modules/user-workspace/guards/upload-profile-picture-permission.guard.ts
msgid "You do not have permission to upload profile pictures. Please contact your workspace administrator for access."
msgstr ""
#. js-lingui-id: M1he8p
#: src/engine/metadata-modules/view/exceptions/view.exception.ts
msgid "You don't have permission to create workspace-level views."
@@ -6468,6 +6468,11 @@ msgstr "Du har inte behörighet att utföra denna arbetsflödesåtgärd."
msgid "You do not have permission to update these fields: {fieldsList}. Please contact your workspace administrator."
msgstr "Du har inte behörighet att uppdatera följande fält: {fieldsList}. Vänligen kontakta din arbetsytsadministratör."
#. js-lingui-id: ZPo5fR
#: src/engine/core-modules/user-workspace/guards/upload-profile-picture-permission.guard.ts
msgid "You do not have permission to upload profile pictures. Please contact your workspace administrator for access."
msgstr ""
#. js-lingui-id: M1he8p
#: src/engine/metadata-modules/view/exceptions/view.exception.ts
msgid "You don't have permission to create workspace-level views."
@@ -6462,6 +6462,11 @@ msgstr "Bu iş akışı işlemini gerçekleştirme izniniz yok."
msgid "You do not have permission to update these fields: {fieldsList}. Please contact your workspace administrator."
msgstr "{fieldsList} alanlarını güncelleme izniniz yoktur. Lütfen çalışma alanı yöneticiniz ile iletişime geçin."
#. js-lingui-id: ZPo5fR
#: src/engine/core-modules/user-workspace/guards/upload-profile-picture-permission.guard.ts
msgid "You do not have permission to upload profile pictures. Please contact your workspace administrator for access."
msgstr ""
#. js-lingui-id: M1he8p
#: src/engine/metadata-modules/view/exceptions/view.exception.ts
msgid "You don't have permission to create workspace-level views."
@@ -6462,6 +6462,11 @@ msgstr "У вас немає дозволу виконувати цю дію р
msgid "You do not have permission to update these fields: {fieldsList}. Please contact your workspace administrator."
msgstr "Ви не маєте дозволу оновлювати ці поля: {fieldsList}. Зверніться до адміністратора робочого простору."
#. js-lingui-id: ZPo5fR
#: src/engine/core-modules/user-workspace/guards/upload-profile-picture-permission.guard.ts
msgid "You do not have permission to upload profile pictures. Please contact your workspace administrator for access."
msgstr ""
#. js-lingui-id: M1he8p
#: src/engine/metadata-modules/view/exceptions/view.exception.ts
msgid "You don't have permission to create workspace-level views."
@@ -6462,6 +6462,11 @@ msgstr "Bạn không có quyền thực hiện hành động quy trình làm vi
msgid "You do not have permission to update these fields: {fieldsList}. Please contact your workspace administrator."
msgstr "Bạn không có quyền cập nhật các trường này: {fieldsList}. Vui lòng liên hệ quản trị viên không gian làm việc của bạn."
#. js-lingui-id: ZPo5fR
#: src/engine/core-modules/user-workspace/guards/upload-profile-picture-permission.guard.ts
msgid "You do not have permission to upload profile pictures. Please contact your workspace administrator for access."
msgstr ""
#. js-lingui-id: M1he8p
#: src/engine/metadata-modules/view/exceptions/view.exception.ts
msgid "You don't have permission to create workspace-level views."
@@ -6462,6 +6462,11 @@ msgstr "您没有执行此工作流操作的权限。"
msgid "You do not have permission to update these fields: {fieldsList}. Please contact your workspace administrator."
msgstr "您无权更新这些字段:{fieldsList}。请联系您的工作区管理员。"
#. js-lingui-id: ZPo5fR
#: src/engine/core-modules/user-workspace/guards/upload-profile-picture-permission.guard.ts
msgid "You do not have permission to upload profile pictures. Please contact your workspace administrator for access."
msgstr ""
#. js-lingui-id: M1he8p
#: src/engine/metadata-modules/view/exceptions/view.exception.ts
msgid "You don't have permission to create workspace-level views."
@@ -6462,6 +6462,11 @@ msgstr "您沒有權限執行此工作流程操作。"
msgid "You do not have permission to update these fields: {fieldsList}. Please contact your workspace administrator."
msgstr "您無權更新這些欄位:{fieldsList}。請聯繫您的工作區管理員。"
#. js-lingui-id: ZPo5fR
#: src/engine/core-modules/user-workspace/guards/upload-profile-picture-permission.guard.ts
msgid "You do not have permission to upload profile pictures. Please contact your workspace administrator for access."
msgstr ""
#. js-lingui-id: M1he8p
#: src/engine/metadata-modules/view/exceptions/view.exception.ts
msgid "You don't have permission to create workspace-level views."
@@ -0,0 +1,76 @@
import {
Injectable,
type CanActivate,
type ExecutionContext,
} from '@nestjs/common';
import { GqlExecutionContext } from '@nestjs/graphql';
import { msg } from '@lingui/core/macro';
import { PermissionFlagType } from 'twenty-shared/constants';
import { WorkspaceActivationStatus } from 'twenty-shared/workspace';
import {
PermissionsException,
PermissionsExceptionCode,
PermissionsExceptionMessage,
} from 'src/engine/metadata-modules/permissions/permissions.exception';
import { PermissionsService } from 'src/engine/metadata-modules/permissions/permissions.service';
@Injectable()
export class UploadProfilePicturePermissionGuard implements CanActivate {
constructor(private readonly permissionsService: PermissionsService) {}
async canActivate(context: ExecutionContext): Promise<boolean> {
const gqlContext = GqlExecutionContext.create(context);
const request = gqlContext.getContext().req;
const workspaceId = request.workspace.id;
const userWorkspaceId = request.userWorkspaceId;
const workspaceActivationStatus = request.workspace.activationStatus;
const apiKeyId = request.apiKey?.id;
// Allow during workspace creation
if (
[
WorkspaceActivationStatus.PENDING_CREATION,
WorkspaceActivationStatus.ONGOING_CREATION,
].includes(workspaceActivationStatus)
) {
return true;
}
// Check if user has WORKSPACE_MEMBERS permission (can edit any profile picture)
const hasWorkspaceMembersPermission =
await this.permissionsService.userHasWorkspaceSettingPermission({
userWorkspaceId,
workspaceId,
setting: PermissionFlagType.WORKSPACE_MEMBERS,
apiKeyId,
});
if (hasWorkspaceMembersPermission) {
return true;
}
// Check if user has PROFILE_INFORMATION permission (can edit their own profile picture)
const hasProfileInformationPermission =
await this.permissionsService.userHasWorkspaceSettingPermission({
userWorkspaceId,
workspaceId,
setting: PermissionFlagType.PROFILE_INFORMATION,
apiKeyId,
});
if (hasProfileInformationPermission) {
return true;
}
throw new PermissionsException(
PermissionsExceptionMessage.PERMISSION_DENIED,
PermissionsExceptionCode.PERMISSION_DENIED,
{
userFriendlyMessage: msg`You do not have permission to upload profile pictures. Please contact your workspace administrator for access.`,
},
);
}
}
@@ -10,6 +10,7 @@ import { WorkspaceDomainsModule } from 'src/engine/core-modules/domain/workspace
import { FileUploadModule } from 'src/engine/core-modules/file/file-upload/file-upload.module';
import { FileModule } from 'src/engine/core-modules/file/file.module';
import { OnboardingModule } from 'src/engine/core-modules/onboarding/onboarding.module';
import { UploadProfilePicturePermissionGuard } from 'src/engine/core-modules/user-workspace/guards/upload-profile-picture-permission.guard';
import { UserWorkspaceEntity } from 'src/engine/core-modules/user-workspace/user-workspace.entity';
import { UserWorkspaceResolver } from 'src/engine/core-modules/user-workspace/user-workspace.resolver';
import { UserWorkspaceService } from 'src/engine/core-modules/user-workspace/user-workspace.service';
@@ -53,6 +54,10 @@ import { WorkspaceDataSourceModule } from 'src/engine/workspace-datasource/works
}),
],
exports: [UserWorkspaceService],
providers: [UserWorkspaceService, UserWorkspaceResolver],
providers: [
UserWorkspaceService,
UserWorkspaceResolver,
UploadProfilePicturePermissionGuard,
],
})
export class UserWorkspaceModule {}
@@ -2,7 +2,6 @@ import { UseGuards } from '@nestjs/common';
import { Args, Mutation, Resolver } from '@nestjs/graphql';
import GraphQLUpload from 'graphql-upload/GraphQLUpload.mjs';
import { PermissionFlagType } from 'twenty-shared/constants';
import { FileFolder } from 'src/engine/core-modules/file/interfaces/file-folder.interface';
@@ -10,9 +9,9 @@ import type { FileUpload } from 'graphql-upload/processRequest.mjs';
import { SignedFileDTO } from 'src/engine/core-modules/file/file-upload/dtos/signed-file.dto';
import { FileUploadService } from 'src/engine/core-modules/file/file-upload/services/file-upload.service';
import { UploadProfilePicturePermissionGuard } from 'src/engine/core-modules/user-workspace/guards/upload-profile-picture-permission.guard';
import { WorkspaceEntity } from 'src/engine/core-modules/workspace/workspace.entity';
import { AuthWorkspace } from 'src/engine/decorators/auth/auth-workspace.decorator';
import { SettingsPermissionGuard } from 'src/engine/guards/settings-permission.guard';
import { WorkspaceAuthGuard } from 'src/engine/guards/workspace-auth.guard';
import { streamToBuffer } from 'src/utils/stream-to-buffer';
@@ -21,10 +20,7 @@ export class UserWorkspaceResolver {
constructor(private readonly fileUploadService: FileUploadService) {}
@Mutation(() => SignedFileDTO)
@UseGuards(
WorkspaceAuthGuard,
SettingsPermissionGuard(PermissionFlagType.WORKSPACE_MEMBERS),
)
@UseGuards(WorkspaceAuthGuard, UploadProfilePicturePermissionGuard)
async uploadWorkspaceMemberProfilePicture(
@AuthWorkspace() { id: workspaceId }: WorkspaceEntity,
@Args({ name: 'file', type: () => GraphQLUpload })
@@ -13,25 +13,19 @@ import crypto from 'crypto';
import { msg } from '@lingui/core/macro';
import { GraphQLJSONObject } from 'graphql-type-json';
import GraphQLUpload from 'graphql-upload/GraphQLUpload.mjs';
import { PermissionFlagType } from 'twenty-shared/constants';
import { isDefined } from 'twenty-shared/utils';
import { WorkspaceActivationStatus } from 'twenty-shared/workspace';
import { In, Repository } from 'typeorm';
import { FileFolder } from 'src/engine/core-modules/file/interfaces/file-folder.interface';
import { SupportDriver } from 'src/engine/core-modules/twenty-config/interfaces/support.interface';
import type { FileUpload } from 'graphql-upload/processRequest.mjs';
import { ApiKeyEntity } from 'src/engine/core-modules/api-key/api-key.entity';
import {
AuthException,
AuthExceptionCode,
} from 'src/engine/core-modules/auth/auth.exception';
import { AvailableWorkspaces } from 'src/engine/core-modules/auth/dto/available-workspaces.output';
import { SignedFileDTO } from 'src/engine/core-modules/file/file-upload/dtos/signed-file.dto';
import { FileUploadService } from 'src/engine/core-modules/file/file-upload/services/file-upload.service';
import { OnboardingStatus } from 'src/engine/core-modules/onboarding/enums/onboarding-status.enum';
import {
OnboardingService,
@@ -78,7 +72,6 @@ import { GlobalWorkspaceOrmManager } from 'src/engine/twenty-orm/global-workspac
import { buildSystemAuthContext } from 'src/engine/twenty-orm/utils/build-system-auth-context.util';
import { AccountsToReconnectKeys } from 'src/modules/connected-account/types/accounts-to-reconnect-key-value.type';
import { WorkspaceMemberWorkspaceEntity } from 'src/modules/workspace-member/standard-objects/workspace-member.workspace-entity';
import { streamToBuffer } from 'src/utils/stream-to-buffer';
const getHMACKey = (email?: string, key?: string | null) => {
if (!email || !key) return null;
@@ -96,7 +89,6 @@ export class UserResolver {
private readonly userRepository: Repository<UserEntity>,
private readonly userService: UserService,
private readonly twentyConfigService: TwentyConfigService,
private readonly fileUploadService: FileUploadService,
private readonly onboardingService: OnboardingService,
private readonly userVarService: UserVarsService,
@InjectRepository(UserWorkspaceEntity)
@@ -372,38 +364,6 @@ export class UserResolver {
return getHMACKey(parent.email, key);
}
@Mutation(() => SignedFileDTO)
@UseGuards(WorkspaceAuthGuard, NoPermissionGuard)
async uploadProfilePicture(
@AuthUser() { id }: UserEntity,
@AuthWorkspace({ allowUndefined: true })
{ id: workspaceId }: WorkspaceEntity,
@Args({ name: 'file', type: () => GraphQLUpload })
{ createReadStream, filename, mimetype }: FileUpload,
): Promise<SignedFileDTO> {
if (!id) {
throw new Error('UserEntity not found');
}
const stream = createReadStream();
const buffer = await streamToBuffer(stream);
const fileFolder = FileFolder.ProfilePicture;
const { files } = await this.fileUploadService.uploadImage({
file: buffer,
filename,
mimeType: mimetype,
fileFolder,
workspaceId,
});
if (!files.length) {
throw new Error('Failed to upload profile picture');
}
return files[0];
}
@Mutation(() => UserEntity)
@UseGuards(UserAuthGuard, NoPermissionGuard)
async deleteUser(@AuthUser() { id: userId }: UserEntity) {