aboutsummaryrefslogtreecommitdiffstats
path: root/routers/api
diff options
context:
space:
mode:
authorwxiaoguang <wxiaoguang@gmail.com>2023-07-26 10:53:31 +0800
committerGitHub <noreply@github.com>2023-07-26 02:53:31 +0000
commit915cdf8f87380bb6ea9cb518837726eb85c89fc7 (patch)
tree04aaf3b8d0b75b341902bac3dbbd37629d9089d5 /routers/api
parent9ed3700ad2b373b6fa22f50dbd31ca106e1f82bc (diff)
downloadgitea-915cdf8f87380bb6ea9cb518837726eb85c89fc7.tar.gz
gitea-915cdf8f87380bb6ea9cb518837726eb85c89fc7.zip
Remove "misc" scope check from public API endpoints (#26134)
Fix #26035
Diffstat (limited to 'routers/api')
-rw-r--r--routers/api/v1/api.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/routers/api/v1/api.go b/routers/api/v1/api.go
index 91483f0e38..397eb10558 100644
--- a/routers/api/v1/api.go
+++ b/routers/api/v1/api.go
@@ -751,7 +751,7 @@ func Routes() *web.Route {
}, tokenRequiresScopes(auth_model.AccessTokenScopeCategoryActivityPub))
}
- // Misc (requires 'misc' scope)
+ // Misc (public accessible)
m.Group("", func() {
m.Get("/version", misc.Version)
m.Get("/signing-key.gpg", misc.SigningKey)
@@ -771,7 +771,7 @@ func Routes() *web.Route {
m.Get("/attachment", settings.GetGeneralAttachmentSettings)
m.Get("/repository", settings.GetGeneralRepoSettings)
})
- }, tokenRequiresScopes(auth_model.AccessTokenScopeCategoryMisc))
+ })
// Notifications (requires 'notifications' scope)
m.Group("/notifications", func() {