feat: 登録を拒否するメールアドレスのドメインを手動で設定できるように (#12740)
* feat: 使い捨てアドレスのドメインを手動で設定できるように * Update CHANGELOG.md * disposableEmailDomains -> bannedEmailDomains * isBlockedHostを使うように
This commit is contained in:
		| @@ -145,6 +145,14 @@ export const meta = { | ||||
| 					type: 'string', | ||||
| 				}, | ||||
| 			}, | ||||
| 			bannedEmailDomains: { | ||||
| 				type: 'array', | ||||
| 				optional: true, nullable: false, | ||||
| 				items: { | ||||
| 					type: 'string', | ||||
| 					optional: false, nullable: false, | ||||
| 				}, | ||||
| 			}, | ||||
| 			preservedUsernames: { | ||||
| 				type: 'array', | ||||
| 				optional: false, nullable: false, | ||||
| @@ -513,6 +521,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint- | ||||
| 				enableChartsForFederatedInstances: instance.enableChartsForFederatedInstances, | ||||
| 				enableServerMachineStats: instance.enableServerMachineStats, | ||||
| 				enableIdenticonGeneration: instance.enableIdenticonGeneration, | ||||
| 				bannedEmailDomains: instance.bannedEmailDomains, | ||||
| 				policies: { ...DEFAULT_POLICIES, ...instance.policies }, | ||||
| 				manifestJsonOverride: instance.manifestJsonOverride, | ||||
| 				enableFanoutTimeline: instance.enableFanoutTimeline, | ||||
|   | ||||
| @@ -122,6 +122,7 @@ export const paramDef = { | ||||
| 		enableServerMachineStats: { type: 'boolean' }, | ||||
| 		enableIdenticonGeneration: { type: 'boolean' }, | ||||
| 		serverRules: { type: 'array', items: { type: 'string' } }, | ||||
| 		bannedEmailDomains: { type: 'array', items: { type: 'string' } }, | ||||
| 		preservedUsernames: { type: 'array', items: { type: 'string' } }, | ||||
| 		manifestJsonOverride: { type: 'string' }, | ||||
| 		enableFanoutTimeline: { type: 'boolean' }, | ||||
| @@ -526,6 +527,10 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint- | ||||
| 				set.notesPerOneAd = ps.notesPerOneAd; | ||||
| 			} | ||||
|  | ||||
| 			if (ps.bannedEmailDomains !== undefined) { | ||||
| 				set.bannedEmailDomains = ps.bannedEmailDomains; | ||||
| 			} | ||||
|  | ||||
| 			const before = await this.metaService.fetch(true); | ||||
|  | ||||
| 			await this.metaService.update(set); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 GrapeApple0
					GrapeApple0