aboutsummaryrefslogtreecommitdiffstats
path: root/routers/web/auth.go
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2022-03-28 12:46:28 +0800
committerGitHub <noreply@github.com>2022-03-28 12:46:28 +0800
commit6526733a58632086d51ce7211b3a4dc75dbbef90 (patch)
treed4d00230c18e0b4bbae1a767ef3f52800d284a14 /routers/web/auth.go
parentd6fa138e7ce7c36ce253a3c847e3218fd31452c4 (diff)
downloadgitea-6526733a58632086d51ce7211b3a4dc75dbbef90.tar.gz
gitea-6526733a58632086d51ce7211b3a4dc75dbbef90.zip
Let web and API routes have different auth methods group (#19168)
* remove the global methods but create dynamiclly * Fix lint * Fix windows lint * Fix windows lint * some improvements Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Diffstat (limited to 'routers/web/auth.go')
-rw-r--r--routers/web/auth.go12
1 files changed, 12 insertions, 0 deletions
diff --git a/routers/web/auth.go b/routers/web/auth.go
new file mode 100644
index 0000000000..4a7fb856be
--- /dev/null
+++ b/routers/web/auth.go
@@ -0,0 +1,12 @@
+// Copyright 2022 The Gitea Authors. All rights reserved.
+// Use of this source code is governed by a MIT-style
+// license that can be found in the LICENSE file.
+
+//go:build !windows
+// +build !windows
+
+package web
+
+import auth_service "code.gitea.io/gitea/services/auth"
+
+func specialAdd(group *auth_service.Group) {}