diff --git a/src/e2e/src/__tests__/message-import.spec.ts b/src/e2e/src/__tests__/message-import.spec.ts index dce2d862..a7dfc1e0 100644 --- a/src/e2e/src/__tests__/message-import.spec.ts +++ b/src/e2e/src/__tests__/message-import.spec.ts @@ -116,13 +116,10 @@ test.describe("Import Message", () => { .click(); await page.waitForLoadState("networkidle"); - // The header settings menu should not contain the Import messages option - // as the user does not have admin rights to the shared mailbox + // The header settings button should be disabled because the user has no + // admin abilities on the shared mailbox, so no menu option is available. const header = page.locator(".c__header"); const settingsButton = header.getByRole("button", { name: "More options" }); - await settingsButton.click(); - await expect( - page.getByRole("menuitem", { name: "Import messages" }) - ).not.toBeVisible(); + await expect(settingsButton).toBeDisabled(); }); }); diff --git a/src/frontend/public/locales/common/en-US.json b/src/frontend/public/locales/common/en-US.json index a54200fe..cfa8e958 100755 --- a/src/frontend/public/locales/common/en-US.json +++ b/src/frontend/public/locales/common/en-US.json @@ -423,6 +423,7 @@ "Monthly": "Monthly", "More": "More", "More options": "More options", + "More options (none available for this mailbox)": "More options (none available for this mailbox)", "Move {{count}} threads_one": "Move {{count}} thread", "Move {{count}} threads_other": "Move {{count}} threads", "My auto-replies": "My auto-replies", @@ -440,6 +441,7 @@ "New signature": "New signature", "New template": "New template", "No accesses": "No accesses", + "No action available for this mailbox": "No action available for this mailbox", "No addresses found": "No addresses found", "No attachments": "No attachments", "No auto-replies found": "No auto-replies found", diff --git a/src/frontend/public/locales/common/fr-FR.json b/src/frontend/public/locales/common/fr-FR.json index 39d48d26..a2b69f46 100755 --- a/src/frontend/public/locales/common/fr-FR.json +++ b/src/frontend/public/locales/common/fr-FR.json @@ -479,6 +479,7 @@ "Monthly": "Mensuel", "More": "Plus", "More options": "Plus d'options", + "More options (none available for this mailbox)": "Plus d'options (aucune disponible pour cette boîte aux lettres)", "Move {{count}} threads_one": "Déplacer {{count}} conversation", "Move {{count}} threads_many": "Déplacer {{count}} conversations", "Move {{count}} threads_other": "Déplacer {{count}} conversations", @@ -497,6 +498,7 @@ "New signature": "Nouvelle signature", "New template": "Nouveau modèle", "No accesses": "Aucun accès", + "No action available for this mailbox": "Aucune action disponible pour cette boîte aux lettres", "No addresses found": "Aucune adresse trouvée", "No attachments": "Aucune pièce jointe", "No auto-replies found": "Aucune réponse automatique trouvée", diff --git a/src/frontend/src/features/layouts/components/main/header/authenticated.tsx b/src/frontend/src/features/layouts/components/main/header/authenticated.tsx index 3845a620..aa44a818 100644 --- a/src/frontend/src/features/layouts/components/main/header/authenticated.tsx +++ b/src/frontend/src/features/layouts/components/main/header/authenticated.tsx @@ -152,6 +152,7 @@ const ApplicationMenu = () => { }, [isDropdownOpen, selectedMailbox?.id]); const taskStatus = useImportTaskStatus(taskId, { enabled: canImportMessages && isDropdownOpen }); + const hasOptions = canAccessDomainAdmin || canImportMessages || canManageMessageTemplates || canManageIntegrations; const importMessageOption = useMemo(() => { let label = t("Import messages"); let icon = ; @@ -181,6 +182,21 @@ const ApplicationMenu = () => { } }, [t, taskStatus]); + if (!hasOptions) { + return ( + +