|
|
|
@@ -275,6 +275,7 @@ func RegisterRoutes(m *macaron.Macaron) { |
|
|
|
ignSignInAndCsrf := context.Toggle(&context.ToggleOptions{DisableCSRF: true}) |
|
|
|
reqSignOut := context.Toggle(&context.ToggleOptions{SignOutRequired: true}) |
|
|
|
reqBasicAuth := context.Toggle(&context.ToggleOptions{BasicAuthRequired: true, DisableCSRF: true}) |
|
|
|
reqWechatBind := context.Toggle(&context.ToggleOptions{WechatAuthRequired: true}) |
|
|
|
|
|
|
|
bindIgnErr := binding.BindIgnErr |
|
|
|
validation.AddBindingRules() |
|
|
|
@@ -394,7 +395,7 @@ func RegisterRoutes(m *macaron.Macaron) { |
|
|
|
|
|
|
|
m.Group("/authentication/wechat", func() { |
|
|
|
m.Get("/qrCode4Bind", authentication.GetQRCode4Bind) |
|
|
|
m.Post("/grant", bindIgnErr(auth.GrantApplicationForm{}), user.GrantApplicationOAuth) |
|
|
|
m.Get("/bindStatus", authentication.GetBindStatus) |
|
|
|
// TODO manage redirection |
|
|
|
m.Post("/authorize", bindIgnErr(auth.AuthorizationForm{}), user.AuthorizeOAuth) |
|
|
|
}, reqSignIn) |
|
|
|
@@ -1033,7 +1034,7 @@ func RegisterRoutes(m *macaron.Macaron) { |
|
|
|
|
|
|
|
m.Group("/debugjob", func() { |
|
|
|
m.Get("", reqRepoCloudBrainReader, repo.DebugJobIndex) |
|
|
|
}, context.RepoRef()) |
|
|
|
}, context.RepoRef(), reqWechatBind) |
|
|
|
|
|
|
|
m.Group("/modelarts", func() { |
|
|
|
m.Group("/notebook", func() { |
|
|
|
|