Skip to content

Commit d56af8e

Browse files
author
Gusted
committed
Add config stuff
1 parent e5ef7c2 commit d56af8e

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

docs/content/doc/advanced/config-cheat-sheet.en-us.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -576,13 +576,16 @@ Certain queues have defaults that override the defaults set in `[queue]` (this o
576576
provided email rather than a generated email.
577577
- `ENABLE_CAPTCHA`: **false**: Enable this to use captcha validation for registration.
578578
- `REQUIRE_EXTERNAL_REGISTRATION_CAPTCHA`: **false**: Enable this to force captcha validation
579-
even for External Accounts (i.e. GitHub, OpenID Connect, etc). You must `ENABLE_CAPTCHA` also.
580-
- `CAPTCHA_TYPE`: **image**: \[image, recaptcha, hcaptcha\]
579+
even for External Accounts (i.e. GitHub, OpenID Connect, etc). You also must enable `ENABLE_CAPTCHA`.
580+
- `CAPTCHA_TYPE`: **image**: \[image, recaptcha, hcaptcha, mcaptcha\]
581581
- `RECAPTCHA_SECRET`: **""**: Go to https://www.google.com/recaptcha/admin to get a secret for recaptcha.
582582
- `RECAPTCHA_SITEKEY`: **""**: Go to https://www.google.com/recaptcha/admin to get a sitekey for recaptcha.
583583
- `RECAPTCHA_URL`: **https://www.google.com/recaptcha/**: Set the recaptcha url - allows the use of recaptcha net.
584584
- `HCAPTCHA_SECRET`: **""**: Sign up at https://www.hcaptcha.com/ to get a secret for hcaptcha.
585585
- `HCAPTCHA_SITEKEY`: **""**: Sign up at https://www.hcaptcha.com/ to get a sitekey for hcaptcha.
586+
- `MCAPTCHA_SECRET`: **""**: Go to your mCaptcha instance to get a secret for mCaptcha.
587+
- `MCAPTCHA_SITEKEY`: **""**: Go to your mCaptcha instance to get a sitekey for mCaptcha.
588+
- `MCAPTCHA_URL` **https://demo.mcaptcha.org/**: Set the mCaptcha URL.
586589
- `DEFAULT_KEEP_EMAIL_PRIVATE`: **false**: By default set users to keep their email address private.
587590
- `DEFAULT_ALLOW_CREATE_ORGANIZATION`: **true**: Allow new users to create organizations by default.
588591
- `DEFAULT_USER_IS_RESTRICTED`: **false**: Give new users restricted permissions by default

modules/setting/service.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,9 @@ var Service = struct {
4747
RecaptchaURL string
4848
HcaptchaSecret string
4949
HcaptchaSitekey string
50+
McaptchaSecret string
51+
McaptchaSitekey string
52+
McaptchaURL string
5053
DefaultKeepEmailPrivate bool
5154
DefaultAllowCreateOrganization bool
5255
DefaultUserIsRestricted bool
@@ -133,6 +136,9 @@ func newService() {
133136
Service.RecaptchaURL = sec.Key("RECAPTCHA_URL").MustString("https://www.google.com/recaptcha/")
134137
Service.HcaptchaSecret = sec.Key("HCAPTCHA_SECRET").MustString("")
135138
Service.HcaptchaSitekey = sec.Key("HCAPTCHA_SITEKEY").MustString("")
139+
Service.McaptchaURL = sec.Key("MCAPTCHA_URL").MustString("https://demo.mcaptcha.org/")
140+
Service.McaptchaSecret = sec.Key("MCAPTCHA_SECRET").MustString("")
141+
Service.McaptchaSitekey = sec.Key("MCAPTCHA_SITEKEY").MustString("")
136142
Service.DefaultKeepEmailPrivate = sec.Key("DEFAULT_KEEP_EMAIL_PRIVATE").MustBool()
137143
Service.DefaultAllowCreateOrganization = sec.Key("DEFAULT_ALLOW_CREATE_ORGANIZATION").MustBool(true)
138144
Service.DefaultUserIsRestricted = sec.Key("DEFAULT_USER_IS_RESTRICTED").MustBool(false)

0 commit comments

Comments
 (0)