@@ -228,11 +228,11 @@ func Routes(ctx gocontext.Context) *web.Route {
228
228
229
229
// RegisterRoutes register routes
230
230
func RegisterRoutes (m * web.Route ) {
231
- reqSignIn := context . Toggle ( & context. ToggleOptions {SignInRequired : true })
232
- ignSignIn := context . Toggle ( & context. ToggleOptions {SignInRequired : setting .Service .RequireSignInView })
233
- ignExploreSignIn := context . Toggle ( & context. ToggleOptions {SignInRequired : setting .Service .RequireSignInView || setting .Service .Explore .RequireSigninView })
234
- ignSignInAndCsrf := context . Toggle ( & context. ToggleOptions {DisableCSRF : true })
235
- reqSignOut := context . Toggle ( & context. ToggleOptions {SignOutRequired : true })
231
+ reqSignIn := auth_service . VerifyAuthWithOptions ( & auth_service. VerifyOptions {SignInRequired : true })
232
+ ignSignIn := auth_service . VerifyAuthWithOptions ( & auth_service. VerifyOptions {SignInRequired : setting .Service .RequireSignInView })
233
+ ignExploreSignIn := auth_service . VerifyAuthWithOptions ( & auth_service. VerifyOptions {SignInRequired : setting .Service .RequireSignInView || setting .Service .Explore .RequireSigninView })
234
+ ignSignInAndCsrf := auth_service . VerifyAuthWithOptions ( & auth_service. VerifyOptions {DisableCSRF : true })
235
+ reqSignOut := auth_service . VerifyAuthWithOptions ( & auth_service. VerifyOptions {SignOutRequired : true })
236
236
validation .AddBindingRules ()
237
237
238
238
linkAccountEnabled := func (ctx * context.Context ) {
@@ -551,7 +551,7 @@ func RegisterRoutes(m *web.Route) {
551
551
552
552
m .Get ("/avatar/{hash}" , user .AvatarByEmailHash )
553
553
554
- adminReq := context . Toggle ( & context. ToggleOptions {SignInRequired : true , AdminRequired : true })
554
+ adminReq := auth_service . VerifyAuthWithOptions ( & auth_service. VerifyOptions {SignInRequired : true , AdminRequired : true })
555
555
556
556
// ***** START: Admin *****
557
557
m .Group ("/admin" , func () {
0 commit comments