FIX: Show group Email settings if just SMTP enabled (#13362)
We previously only showed the link to the Email section of group settings if both SMTP and IMAP were enabled for a site, but this is not necessary now, only SMTP can be enabled by itself so we should show the section if SMTP is enabled.
This commit is contained in:
parent
c780ae9d25
commit
af15bf1350
|
@ -29,7 +29,7 @@ export default Controller.extend({
|
||||||
});
|
});
|
||||||
|
|
||||||
if (!automatic) {
|
if (!automatic) {
|
||||||
if (this.siteSettings.enable_imap && this.siteSettings.enable_smtp) {
|
if (this.siteSettings.enable_smtp) {
|
||||||
defaultTabs.splice(2, 0, {
|
defaultTabs.splice(2, 0, {
|
||||||
route: "group.manage.email",
|
route: "group.manage.email",
|
||||||
title: "groups.manage.email.title",
|
title: "groups.manage.email.title",
|
||||||
|
|
|
@ -9,6 +9,10 @@ acceptance("Managing Group Email Settings - SMTP Disabled", function (needs) {
|
||||||
|
|
||||||
test("When SiteSetting.enable_smtp is false", async function (assert) {
|
test("When SiteSetting.enable_smtp is false", async function (assert) {
|
||||||
await visit("/g/discourse/manage/email");
|
await visit("/g/discourse/manage/email");
|
||||||
|
assert.notOk(
|
||||||
|
queryAll(".user-secondary-navigation").text().includes("Email"),
|
||||||
|
"email link is not shown in the sidebar"
|
||||||
|
);
|
||||||
assert.equal(
|
assert.equal(
|
||||||
currentRouteName(),
|
currentRouteName(),
|
||||||
"group.manage.profile",
|
"group.manage.profile",
|
||||||
|
@ -25,6 +29,10 @@ acceptance(
|
||||||
|
|
||||||
test("When SiteSetting.enable_smtp is true but SiteSetting.enable_imap is false", async function (assert) {
|
test("When SiteSetting.enable_smtp is true but SiteSetting.enable_imap is false", async function (assert) {
|
||||||
await visit("/g/discourse/manage/email");
|
await visit("/g/discourse/manage/email");
|
||||||
|
assert.ok(
|
||||||
|
queryAll(".user-secondary-navigation").text().includes("Email"),
|
||||||
|
"email link is shown in the sidebar"
|
||||||
|
);
|
||||||
assert.equal(
|
assert.equal(
|
||||||
currentRouteName(),
|
currentRouteName(),
|
||||||
"group.manage.email",
|
"group.manage.email",
|
||||||
|
@ -59,6 +67,10 @@ acceptance(
|
||||||
|
|
||||||
test("enabling SMTP, testing, and saving", async function (assert) {
|
test("enabling SMTP, testing, and saving", async function (assert) {
|
||||||
await visit("/g/discourse/manage/email");
|
await visit("/g/discourse/manage/email");
|
||||||
|
assert.ok(
|
||||||
|
queryAll(".user-secondary-navigation").text().includes("Email"),
|
||||||
|
"email link is shown in the sidebar"
|
||||||
|
);
|
||||||
assert.ok(
|
assert.ok(
|
||||||
exists("#enable_imap:disabled"),
|
exists("#enable_imap:disabled"),
|
||||||
"IMAP is disabled until SMTP settings are valid"
|
"IMAP is disabled until SMTP settings are valid"
|
||||||
|
|
Loading…
Reference in New Issue