]> source.dussan.org Git - gitea.git/commit
Require repo scope for PATs for private repos and basic authentication (#24362)
authorJohn Olheiser <john.olheiser@gmail.com>
Thu, 27 Apr 2023 00:24:03 +0000 (19:24 -0500)
committerGitHub <noreply@github.com>
Thu, 27 Apr 2023 00:24:03 +0000 (19:24 -0500)
commit5e360241053f6fcfb7f8b89373cba431adaf44ce
tree8253e76b296a437b3e288e5cc0b70070e9578946
parent8f57aa014b5642bcd33a6b22492df3c63f03d808
Require repo scope for PATs for private repos and basic authentication (#24362)

> The scoped token PR just checked all API routes but in fact, some web
routes like `LFS`, git `HTTP`, container, and attachments supports basic
auth. This PR added scoped token check for them.

---------

Signed-off-by: jolheiser <john.olheiser@gmail.com>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
modules/context/permission.go
routers/api/packages/api.go
routers/web/repo/attachment.go
routers/web/repo/http.go
services/auth/basic.go
services/lfs/locks.go
services/lfs/server.go
tests/integration/api_packages_npm_test.go
tests/integration/api_packages_nuget_test.go
tests/integration/api_packages_pub_test.go
tests/integration/api_packages_vagrant_test.go