1
0
Fork 0
forked from forgejo/forgejo

Remove "misc" scope check from public API endpoints (#26134) (#26149)

Backport #26134 by @wxiaoguang

Fix #26035

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
(cherry picked from commit a8445e9320)
This commit is contained in:
Giteabot 2023-07-26 01:32:41 -04:00 committed by Earl Warren
parent bbc3426c53
commit df5200e814
No known key found for this signature in database
GPG key ID: 0579CB2928A78A00
4 changed files with 33 additions and 63 deletions

View file

@ -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() {