1
0
Fork 0
forked from forgejo/forgejo

Revert "[GITEA] do not enforce misc scope tokens for public API endpoints"

This reverts commit 666f43fb64.
This commit is contained in:
Earl Warren 2023-07-26 13:51:06 +02:00
parent 7099ef15b6
commit bbc3426c53
No known key found for this signature in database
GPG key ID: 0579CB2928A78A00
3 changed files with 32 additions and 13 deletions

View file

@ -757,6 +757,7 @@ func Routes(ctx gocontext.Context) *web.Route {
}, tokenRequiresScopes(auth_model.AccessTokenScopeCategoryActivityPub))
}
// Misc (requires 'misc' scope)
m.Group("", func() {
m.Get("/version", misc.Version)
m.Get("/signing-key.gpg", misc.SigningKey)
@ -776,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() {