@@ -370,9 +370,18 @@ func RegisterRoutes(m *macaron.Macaron) {
370
370
m .Get ("/:provider" , user .SignInOAuth )
371
371
m .Get ("/:provider/callback" , user .SignInOAuthCallback )
372
372
})
373
- m .Get ("/link_account" , user .LinkAccount )
374
- m .Post ("/link_account_signin" , bindIgnErr (auth.SignInForm {}), user .LinkAccountPostSignIn )
375
- m .Post ("/link_account_signup" , bindIgnErr (auth.RegisterForm {}), user .LinkAccountPostRegister )
373
+ m .Group ("/link_account" , func () {
374
+ m .Get ("" , user .LinkAccount )
375
+ }, openIDSignInEnabled )
376
+
377
+ m .Group ("/link_account_signin" , func () {
378
+ m .Post ("" , bindIgnErr (auth.SignInForm {}), user .LinkAccountPostSignIn )
379
+ }, openIDSignInEnabled )
380
+
381
+ m .Group ("/link_account_signup" , func () {
382
+ m .Post ("" , bindIgnErr (auth.RegisterForm {}), user .LinkAccountPostRegister )
383
+ }, openIDSignUpEnabled )
384
+
376
385
m .Group ("/two_factor" , func () {
377
386
m .Get ("" , user .TwoFactor )
378
387
m .Post ("" , bindIgnErr (auth.TwoFactorAuthForm {}), user .TwoFactorPost )
@@ -429,7 +438,10 @@ func RegisterRoutes(m *macaron.Macaron) {
429
438
m .Post ("/delete" , userSetting .DeleteOpenID )
430
439
m .Post ("/toggle_visibility" , userSetting .ToggleOpenIDVisibility )
431
440
}, openIDSignInEnabled )
432
- m .Post ("/account_link" , userSetting .DeleteAccountLink )
441
+
442
+ m .Group ("/account_link" , func () {
443
+ m .Post ("" , userSetting .DeleteAccountLink )
444
+ }, openIDSignInEnabled )
433
445
})
434
446
m .Group ("/applications/oauth2" , func () {
435
447
m .Get ("/:id" , userSetting .OAuth2ApplicationShow )
0 commit comments