gitea/routers/api/v1
zeripath ef12b8de80
Ensure that restricted users can access repos for which they are members (#17460) (#17464)
Backport #17460

There is a small bug in the way that repo access is checked in
repoAssignment: Accessibility is checked by checking if the user has a
marked access to the repository instead of checking if the user has any
team granted access.

This PR changes this permissions check to use HasAccess() which does the
correct test. There is also a fix in the release api ListReleases where
it should return draft releases if the user is a member of a team with
write access to the releases.

The PR also adds a testcase.

Signed-off-by: Andrew Thornton <art27@cantab.net>
2021-10-28 11:33:18 +08:00
..
admin List limited and private orgs if authenticated on API (#16866) (#16879) 2021-08-31 12:49:02 +02:00
misc Refactor renders (#15175) 2021-04-19 18:25:08 -04:00
notify [API] expose repo.GetReviewers() & repo.GetAssignees() (#16168) 2021-06-17 16:02:34 +02:00
org List limited and private orgs if authenticated on API (#16866) (#16879) 2021-08-31 12:49:02 +02:00
repo Ensure that restricted users can access repos for which they are members (#17460) (#17464) 2021-10-28 11:33:18 +08:00
settings Add custom emoji support (#16004) 2021-06-29 16:28:38 +02:00
swagger Swagger AccessToken fixes (#16574) (#16597) 2021-08-02 20:24:47 +02:00
user List limited and private orgs if authenticated on API (#16866) (#16879) 2021-08-31 12:49:02 +02:00
utils Let branch/tag name be a valid ref to get CI status (#16400) 2021-07-13 08:14:14 +01:00
api.go Set AllowedHeaders on API CORS handler (#16524) (#16618) 2021-08-04 21:57:59 +02:00