diff options
author | wxiaoguang <wxiaoguang@gmail.com> | 2023-07-26 10:53:31 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-07-26 02:53:31 +0000 |
commit | 915cdf8f87380bb6ea9cb518837726eb85c89fc7 (patch) | |
tree | 04aaf3b8d0b75b341902bac3dbbd37629d9089d5 /routers/api | |
parent | 9ed3700ad2b373b6fa22f50dbd31ca106e1f82bc (diff) | |
download | gitea-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.go | 4 |
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() { |