@ -1021,7 +1021,8 @@ func SignUp(ctx *context.Context) {
ctx . Data [ "CaptchaType" ] = setting . Service . CaptchaType
ctx . Data [ "CaptchaType" ] = setting . Service . CaptchaType
ctx . Data [ "RecaptchaSitekey" ] = setting . Service . RecaptchaSitekey
ctx . Data [ "RecaptchaSitekey" ] = setting . Service . RecaptchaSitekey
ctx . Data [ "DisableRegistration" ] = setting . Service . DisableRegistration
//Show Disabled Registration message if DisableRegistration or AllowOnlyExternalRegistration options are true
ctx . Data [ "DisableRegistration" ] = setting . Service . DisableRegistration || setting . Service . AllowOnlyExternalRegistration
ctx . HTML ( 200 , tplSignUp )
ctx . HTML ( 200 , tplSignUp )
}
}
@ -1038,7 +1039,7 @@ func SignUpPost(ctx *context.Context, cpt *captcha.Captcha, form auth.RegisterFo
ctx . Data [ "RecaptchaSitekey" ] = setting . Service . RecaptchaSitekey
ctx . Data [ "RecaptchaSitekey" ] = setting . Service . RecaptchaSitekey
//Permission denied if DisableRegistration or AllowOnlyExternalRegistration options are true
//Permission denied if DisableRegistration or AllowOnlyExternalRegistration options are true
if setting . Service . DisableRegistration {
if setting . Service . DisableRegistration || setting . Service . AllowOnlyExternalRegistration {
ctx . Error ( 403 )
ctx . Error ( 403 )
return
return
}
}