@@ -707,7 +707,7 @@ func oAuth2UserLoginCallback(loginSource *models.LoginSource, request *http.Requ
707
707
708
708
// LinkAccount shows the page where the user can decide to login or create a new account
709
709
func LinkAccount (ctx * context.Context ) {
710
- ctx .Data ["DisablePassword" ] = ! setting .Service .RequireExternalRegistrationCaptcha || setting .Service .AllowOnlyExternalRegistration
710
+ ctx .Data ["DisablePassword" ] = ! setting .Service .RequireExternalRegistrationPassword || setting .Service .AllowOnlyExternalRegistration
711
711
ctx .Data ["Title" ] = ctx .Tr ("link_account" )
712
712
ctx .Data ["LinkAccountMode" ] = true
713
713
ctx .Data ["EnableCaptcha" ] = setting .Service .EnableCaptcha && setting .Service .RequireExternalRegistrationCaptcha
@@ -757,7 +757,7 @@ func LinkAccount(ctx *context.Context) {
757
757
758
758
// LinkAccountPostSignIn handle the coupling of external account with another account using signIn
759
759
func LinkAccountPostSignIn (ctx * context.Context , signInForm auth.SignInForm ) {
760
- ctx .Data ["DisablePassword" ] = setting .Service .AllowOnlyExternalRegistration
760
+ ctx .Data ["DisablePassword" ] = ! setting . Service . RequireExternalRegistrationPassword || setting .Service .AllowOnlyExternalRegistration
761
761
ctx .Data ["Title" ] = ctx .Tr ("link_account" )
762
762
ctx .Data ["LinkAccountMode" ] = true
763
763
ctx .Data ["LinkAccountModeSignIn" ] = true
@@ -840,7 +840,7 @@ func LinkAccountPostSignIn(ctx *context.Context, signInForm auth.SignInForm) {
840
840
func LinkAccountPostRegister (ctx * context.Context , cpt * captcha.Captcha , form auth.RegisterForm ) {
841
841
// TODO Make insecure passwords optional for local accounts also,
842
842
// once email-based Second-Factor Auth is available
843
- ctx .Data ["DisablePassword" ] = ! setting .Service .RequireExternalRegistrationCaptcha || setting .Service .AllowOnlyExternalRegistration
843
+ ctx .Data ["DisablePassword" ] = ! setting .Service .RequireExternalRegistrationPassword || setting .Service .AllowOnlyExternalRegistration
844
844
ctx .Data ["Title" ] = ctx .Tr ("link_account" )
845
845
ctx .Data ["LinkAccountMode" ] = true
846
846
ctx .Data ["LinkAccountModeRegister" ] = true
0 commit comments