Fix bug when a token is given public only (#32204)

This commit is contained in:
Lunny Xiao 2024-10-08 17:51:09 +08:00 committed by GitHub
parent d3ada91ea4
commit d6d3c96e65
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
11 changed files with 178 additions and 57 deletions

View file

@ -35,9 +35,10 @@ type APIContext struct {
ContextUser *user_model.User // the user which is being visited, in most cases it differs from Doer
Repo *Repository
Org *APIOrganization
Package *Package
Repo *Repository
Org *APIOrganization
Package *Package
PublicOnly bool // Whether the request is for a public endpoint
}
func init() {