feat: require a special registration word in registration reason (#2)
A crude way to prune out people who don't read the rules. The hint is in the bottom of the rules generally.
This commit is contained in:
@@ -39,6 +39,14 @@ export const meta = {
|
||||
type: 'boolean',
|
||||
optional: false, nullable: false,
|
||||
},
|
||||
registrationWord: {
|
||||
type: 'string',
|
||||
optional: false, nullable: true,
|
||||
},
|
||||
regWordRequired: {
|
||||
type: 'boolean',
|
||||
optional: false, nullable: false,
|
||||
},
|
||||
enableHcaptcha: {
|
||||
type: 'boolean',
|
||||
optional: false, nullable: false,
|
||||
@@ -657,6 +665,8 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
|
||||
disableRegistration: instance.disableRegistration,
|
||||
emailRequiredForSignup: instance.emailRequiredForSignup,
|
||||
approvalRequiredForSignup: instance.approvalRequiredForSignup,
|
||||
registrationWord: instance.registrationWord,
|
||||
regWordRequired: instance.regWordRequired,
|
||||
enableHcaptcha: instance.enableHcaptcha,
|
||||
hcaptchaSiteKey: instance.hcaptchaSiteKey,
|
||||
enableMcaptcha: instance.enableMcaptcha,
|
||||
|
||||
@@ -74,6 +74,8 @@ export const paramDef = {
|
||||
cacheRemoteSensitiveFiles: { type: 'boolean' },
|
||||
emailRequiredForSignup: { type: 'boolean' },
|
||||
approvalRequiredForSignup: { type: 'boolean' },
|
||||
regWordRequired: { type: 'boolean', nullable: false },
|
||||
registrationWord: { type: 'string', nullable: true },
|
||||
enableHcaptcha: { type: 'boolean' },
|
||||
hcaptchaSiteKey: { type: 'string', nullable: true },
|
||||
hcaptchaSecretKey: { type: 'string', nullable: true },
|
||||
@@ -357,6 +359,14 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
|
||||
set.approvalRequiredForSignup = ps.approvalRequiredForSignup;
|
||||
}
|
||||
|
||||
if (ps.registrationWord !== undefined) {
|
||||
set.registrationWord = ps.registrationWord;
|
||||
}
|
||||
|
||||
if (ps.regWordRequired !== undefined) {
|
||||
set.regWordRequired = ps.regWordRequired;
|
||||
}
|
||||
|
||||
if (ps.enableHcaptcha !== undefined) {
|
||||
set.enableHcaptcha = ps.enableHcaptcha;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user