diff options
author | Giteabot <teabot@gitea.io> | 2023-07-26 01:32:41 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-07-26 05:32:41 +0000 |
commit | a8445e93204ab91065c45223bf5d4f7e06578549 (patch) | |
tree | 5ba358e9c462e7838e81f71a772fd4303e61d96f /routers | |
parent | 0f73be0ae3247deb1881f1ded9f8b2e55e46e233 (diff) | |
download | gitea-a8445e93204ab91065c45223bf5d4f7e06578549.tar.gz gitea-a8445e93204ab91065c45223bf5d4f7e06578549.zip |
Remove "misc" scope check from public API endpoints (#26134) (#26149)
Backport #26134 by @wxiaoguang
Fix #26035
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Diffstat (limited to 'routers')
-rw-r--r-- | routers/api/v1/api.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/routers/api/v1/api.go b/routers/api/v1/api.go index 3a1203628a..a1392e7ad7 100644 --- a/routers/api/v1/api.go +++ b/routers/api/v1/api.go @@ -757,7 +757,7 @@ func Routes(ctx gocontext.Context) *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) @@ -777,7 +777,7 @@ func Routes(ctx gocontext.Context) *web.Route { m.Get("/attachment", settings.GetGeneralAttachmentSettings) m.Get("/repository", settings.GetGeneralRepoSettings) }) - }, tokenRequiresScopes(auth_model.AccessTokenScopeCategoryMisc)) + }) // Notifications (requires 'notifications' scope) m.Group("/notifications", func() { |