Compare commits
No commits in common. "e9fc4e4828fc68262612137510e7f3293210e597" and "a7aba8a19a164d467c6a8c31a43359a76874a4ba" have entirely different histories.
e9fc4e4828
...
a7aba8a19a
|
|
@ -1097,9 +1097,6 @@ export interface Locale {
|
||||||
"doYouAgree": string;
|
"doYouAgree": string;
|
||||||
"beSureToReadThisAsItIsImportant": string;
|
"beSureToReadThisAsItIsImportant": string;
|
||||||
"iHaveReadXCarefullyAndAgree": string;
|
"iHaveReadXCarefullyAndAgree": string;
|
||||||
"doNotSendNotificationEmailsForAbuseReport": string;
|
|
||||||
"emailToReceiveAbuseReport": string;
|
|
||||||
"emailToReceiveAbuseReportCaption": string;
|
|
||||||
"_initialAccountSetting": {
|
"_initialAccountSetting": {
|
||||||
"accountCreated": string;
|
"accountCreated": string;
|
||||||
"letsStartAccountSetup": string;
|
"letsStartAccountSetup": string;
|
||||||
|
|
|
||||||
|
|
@ -1094,9 +1094,6 @@ expired: "期限切れ"
|
||||||
doYouAgree: "同意しますか?"
|
doYouAgree: "同意しますか?"
|
||||||
beSureToReadThisAsItIsImportant: "重要ですので必ずお読みください。"
|
beSureToReadThisAsItIsImportant: "重要ですので必ずお読みください。"
|
||||||
iHaveReadXCarefullyAndAgree: "「{x}」の内容をよく読み、同意します。"
|
iHaveReadXCarefullyAndAgree: "「{x}」の内容をよく読み、同意します。"
|
||||||
doNotSendNotificationEmailsForAbuseReport: "通報の通知メールを発送しないようにする"
|
|
||||||
emailToReceiveAbuseReport: "通報通知を受け取るためのメールアドレス"
|
|
||||||
emailToReceiveAbuseReportCaption: "通報通知を受け取るためのメールアドレスを指定します。ここの入力欄を空にするとメールサーバーのメールアドレスが使用されます。"
|
|
||||||
|
|
||||||
_initialAccountSetting:
|
_initialAccountSetting:
|
||||||
accountCreated: "アカウントの作成が完了しました!"
|
accountCreated: "アカウントの作成が完了しました!"
|
||||||
|
|
|
||||||
|
|
@ -1,13 +0,0 @@
|
||||||
export class NotificationEmailsForAbuseReport1691120548582 {
|
|
||||||
name = 'NotificationEmailsForAbuseReport1691120548582'
|
|
||||||
|
|
||||||
async up(queryRunner) {
|
|
||||||
await queryRunner.query(`ALTER TABLE "meta" ADD "emailToReceiveAbuseReport" character varying(1024)`);
|
|
||||||
await queryRunner.query(`ALTER TABLE "meta" ADD "doNotSendNotificationEmailsForAbuseReport" boolean NOT NULL DEFAULT false`);
|
|
||||||
}
|
|
||||||
|
|
||||||
async down(queryRunner) {
|
|
||||||
await queryRunner.query(`ALTER TABLE "meta" DROP COLUMN "doNotSendNotificationEmailsForAbuseReport"`);
|
|
||||||
await queryRunner.query(`ALTER TABLE "meta" DROP COLUMN "emailToReceiveAbuseReport"`);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -41,11 +41,6 @@ export class Meta {
|
||||||
})
|
})
|
||||||
public maintainerEmail: string | null;
|
public maintainerEmail: string | null;
|
||||||
|
|
||||||
@Column('varchar', {
|
|
||||||
length: 1024, nullable: true,
|
|
||||||
})
|
|
||||||
public emailToReceiveAbuseReport: string | null;
|
|
||||||
|
|
||||||
@Column('boolean', {
|
@Column('boolean', {
|
||||||
default: false,
|
default: false,
|
||||||
})
|
})
|
||||||
|
|
@ -437,11 +432,6 @@ export class Meta {
|
||||||
})
|
})
|
||||||
public enableIdenticonGeneration: boolean;
|
public enableIdenticonGeneration: boolean;
|
||||||
|
|
||||||
@Column('boolean', {
|
|
||||||
default: false,
|
|
||||||
})
|
|
||||||
public doNotSendNotificationEmailsForAbuseReport: boolean;
|
|
||||||
|
|
||||||
@Column('jsonb', {
|
@Column('jsonb', {
|
||||||
default: { },
|
default: { },
|
||||||
})
|
})
|
||||||
|
|
|
||||||
|
|
@ -104,8 +104,8 @@ export class ReportAbuseProcessorService {
|
||||||
}
|
}
|
||||||
|
|
||||||
const meta = await this.metaService.fetch();
|
const meta = await this.metaService.fetch();
|
||||||
if ((meta.emailToReceiveAbuseReport || meta.email) && !meta.doNotSendNotificationEmailsForAbuseReport) {
|
if (meta.email) {
|
||||||
this.emailService.sendEmail(meta.emailToReceiveAbuseReport ?? meta.email!, 'New abuse report',
|
this.emailService.sendEmail(meta.email, 'New abuse report',
|
||||||
sanitizeHtml(job.data.comment),
|
sanitizeHtml(job.data.comment),
|
||||||
sanitizeHtml(job.data.comment));
|
sanitizeHtml(job.data.comment));
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -278,14 +278,6 @@ export const meta = {
|
||||||
type: 'boolean',
|
type: 'boolean',
|
||||||
optional: false, nullable: false,
|
optional: false, nullable: false,
|
||||||
},
|
},
|
||||||
doNotSendNotificationEmailsForAbuseReport: {
|
|
||||||
type: 'boolean',
|
|
||||||
optional: false, nullable: false,
|
|
||||||
},
|
|
||||||
emailToReceiveAbuseReport: {
|
|
||||||
type: 'string',
|
|
||||||
optional: false, nullable: true,
|
|
||||||
},
|
|
||||||
policies: {
|
policies: {
|
||||||
type: 'object',
|
type: 'object',
|
||||||
optional: false, nullable: false,
|
optional: false, nullable: false,
|
||||||
|
|
@ -391,8 +383,6 @@ export default class extends Endpoint<typeof meta, typeof paramDef> {
|
||||||
enableChartsForFederatedInstances: instance.enableChartsForFederatedInstances,
|
enableChartsForFederatedInstances: instance.enableChartsForFederatedInstances,
|
||||||
enableServerMachineStats: instance.enableServerMachineStats,
|
enableServerMachineStats: instance.enableServerMachineStats,
|
||||||
enableIdenticonGeneration: instance.enableIdenticonGeneration,
|
enableIdenticonGeneration: instance.enableIdenticonGeneration,
|
||||||
doNotSendNotificationEmailsForAbuseReport: instance.doNotSendNotificationEmailsForAbuseReport,
|
|
||||||
emailToReceiveAbuseReport: instance.emailToReceiveAbuseReport,
|
|
||||||
policies: { ...DEFAULT_POLICIES, ...instance.policies },
|
policies: { ...DEFAULT_POLICIES, ...instance.policies },
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -104,8 +104,6 @@ export const paramDef = {
|
||||||
enableChartsForFederatedInstances: { type: 'boolean' },
|
enableChartsForFederatedInstances: { type: 'boolean' },
|
||||||
enableServerMachineStats: { type: 'boolean' },
|
enableServerMachineStats: { type: 'boolean' },
|
||||||
enableIdenticonGeneration: { type: 'boolean' },
|
enableIdenticonGeneration: { type: 'boolean' },
|
||||||
doNotSendNotificationEmailsForAbuseReport: { type: 'boolean' },
|
|
||||||
emailToReceiveAbuseReport: { type: 'string', nullable: true },
|
|
||||||
serverRules: { type: 'array', items: { type: 'string' } },
|
serverRules: { type: 'array', items: { type: 'string' } },
|
||||||
preservedUsernames: { type: 'array', items: { type: 'string' } },
|
preservedUsernames: { type: 'array', items: { type: 'string' } },
|
||||||
},
|
},
|
||||||
|
|
@ -421,14 +419,6 @@ export default class extends Endpoint<typeof meta, typeof paramDef> {
|
||||||
set.enableIdenticonGeneration = ps.enableIdenticonGeneration;
|
set.enableIdenticonGeneration = ps.enableIdenticonGeneration;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ps.doNotSendNotificationEmailsForAbuseReport !== undefined) {
|
|
||||||
set.doNotSendNotificationEmailsForAbuseReport = ps.doNotSendNotificationEmailsForAbuseReport;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (ps.emailToReceiveAbuseReport !== undefined) {
|
|
||||||
set.emailToReceiveAbuseReport = ps.emailToReceiveAbuseReport;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (ps.serverRules !== undefined) {
|
if (ps.serverRules !== undefined) {
|
||||||
set.serverRules = ps.serverRules;
|
set.serverRules = ps.serverRules;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -36,12 +36,6 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
<template #caption>{{ i18n.ts.turnOffToImprovePerformance }}</template>
|
<template #caption>{{ i18n.ts.turnOffToImprovePerformance }}</template>
|
||||||
</MkSwitch>
|
</MkSwitch>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="_panel" style="padding: 16px;">
|
|
||||||
<MkSwitch v-model="doNotSendNotificationEmailsForAbuseReport">
|
|
||||||
<template #label>{{ i18n.ts.doNotSendNotificationEmailsForAbuseReport }}</template>
|
|
||||||
</MkSwitch>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</FormSuspense>
|
</FormSuspense>
|
||||||
</MkSpacer>
|
</MkSpacer>
|
||||||
|
|
@ -62,7 +56,6 @@ let enableServerMachineStats: boolean = $ref(false);
|
||||||
let enableIdenticonGeneration: boolean = $ref(false);
|
let enableIdenticonGeneration: boolean = $ref(false);
|
||||||
let enableChartsForRemoteUser: boolean = $ref(false);
|
let enableChartsForRemoteUser: boolean = $ref(false);
|
||||||
let enableChartsForFederatedInstances: boolean = $ref(false);
|
let enableChartsForFederatedInstances: boolean = $ref(false);
|
||||||
let doNotSendNotificationEmailsForAbuseReport: boolean = $ref(false);
|
|
||||||
|
|
||||||
async function init() {
|
async function init() {
|
||||||
const meta = await os.api('admin/meta');
|
const meta = await os.api('admin/meta');
|
||||||
|
|
@ -70,7 +63,6 @@ async function init() {
|
||||||
enableIdenticonGeneration = meta.enableIdenticonGeneration;
|
enableIdenticonGeneration = meta.enableIdenticonGeneration;
|
||||||
enableChartsForRemoteUser = meta.enableChartsForRemoteUser;
|
enableChartsForRemoteUser = meta.enableChartsForRemoteUser;
|
||||||
enableChartsForFederatedInstances = meta.enableChartsForFederatedInstances;
|
enableChartsForFederatedInstances = meta.enableChartsForFederatedInstances;
|
||||||
doNotSendNotificationEmailsForAbuseReport = meta.doNotSendNotificationEmailsForAbuseReport;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function save() {
|
function save() {
|
||||||
|
|
@ -79,7 +71,6 @@ function save() {
|
||||||
enableIdenticonGeneration,
|
enableIdenticonGeneration,
|
||||||
enableChartsForRemoteUser,
|
enableChartsForRemoteUser,
|
||||||
enableChartsForFederatedInstances,
|
enableChartsForFederatedInstances,
|
||||||
doNotSendNotificationEmailsForAbuseReport,
|
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
fetchInstance();
|
fetchInstance();
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -88,18 +88,6 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
</MkSwitch>
|
</MkSwitch>
|
||||||
</div>
|
</div>
|
||||||
</FormSection>
|
</FormSection>
|
||||||
|
|
||||||
<FormSection>
|
|
||||||
<template #label>{{ i18n.ts.abuseReports }}</template>
|
|
||||||
|
|
||||||
<div class="_gaps_m">
|
|
||||||
<MkInput v-model="emailToReceiveAbuseReport" type="email">
|
|
||||||
<template #prefix><i class="ti ti-mail"></i></template>
|
|
||||||
<template #label>{{ i18n.ts.emailToReceiveAbuseReport }}</template>
|
|
||||||
<template #caption>{{ i18n.ts.emailToReceiveAbuseReportCaption }}</template>
|
|
||||||
</MkInput>
|
|
||||||
</div>
|
|
||||||
</FormSection>
|
|
||||||
</div>
|
</div>
|
||||||
</FormSuspense>
|
</FormSuspense>
|
||||||
</MkSpacer>
|
</MkSpacer>
|
||||||
|
|
@ -133,7 +121,6 @@ let name: string | null = $ref(null);
|
||||||
let description: string | null = $ref(null);
|
let description: string | null = $ref(null);
|
||||||
let maintainerName: string | null = $ref(null);
|
let maintainerName: string | null = $ref(null);
|
||||||
let maintainerEmail: string | null = $ref(null);
|
let maintainerEmail: string | null = $ref(null);
|
||||||
let emailToReceiveAbuseReport: string | null = $ref(null);
|
|
||||||
let pinnedUsers: string = $ref('');
|
let pinnedUsers: string = $ref('');
|
||||||
let cacheRemoteFiles: boolean = $ref(false);
|
let cacheRemoteFiles: boolean = $ref(false);
|
||||||
let cacheRemoteSensitiveFiles: boolean = $ref(false);
|
let cacheRemoteSensitiveFiles: boolean = $ref(false);
|
||||||
|
|
@ -149,7 +136,6 @@ async function init(): Promise<void> {
|
||||||
description = meta.description;
|
description = meta.description;
|
||||||
maintainerName = meta.maintainerName;
|
maintainerName = meta.maintainerName;
|
||||||
maintainerEmail = meta.maintainerEmail;
|
maintainerEmail = meta.maintainerEmail;
|
||||||
emailToReceiveAbuseReport = meta.emailToReceiveAbuseReport;
|
|
||||||
pinnedUsers = meta.pinnedUsers.join('\n');
|
pinnedUsers = meta.pinnedUsers.join('\n');
|
||||||
cacheRemoteFiles = meta.cacheRemoteFiles;
|
cacheRemoteFiles = meta.cacheRemoteFiles;
|
||||||
cacheRemoteSensitiveFiles = meta.cacheRemoteSensitiveFiles;
|
cacheRemoteSensitiveFiles = meta.cacheRemoteSensitiveFiles;
|
||||||
|
|
@ -166,8 +152,6 @@ function save(): void {
|
||||||
description,
|
description,
|
||||||
maintainerName,
|
maintainerName,
|
||||||
maintainerEmail,
|
maintainerEmail,
|
||||||
// eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
|
|
||||||
emailToReceiveAbuseReport: emailToReceiveAbuseReport || null,
|
|
||||||
pinnedUsers: pinnedUsers.split('\n'),
|
pinnedUsers: pinnedUsers.split('\n'),
|
||||||
cacheRemoteFiles,
|
cacheRemoteFiles,
|
||||||
cacheRemoteSensitiveFiles,
|
cacheRemoteSensitiveFiles,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue