1
1
mirror of https://github.com/go-gitea/gitea synced 2024-11-15 14:44:41 +00:00
gitea/routers
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
..
api/v1 Ensure that restricted users can access repos for which they are members (#17460) (#17464) 2021-10-28 11:33:18 +08:00
common Read expected buffer size (#17409) (#17430) 2021-10-25 17:46:56 +01:00
install just add some unit tests (#16291) 2021-06-29 22:00:02 +01:00
private Prevent panic in serv.go with Deploy Keys (#17434) (#17435) 2021-10-26 01:24:29 +02:00
utils just add some unit tests (#16291) 2021-06-29 22:00:02 +01:00
web Fix CSV render error (#17406) (#17431) 2021-10-25 18:31:15 +01:00
init.go Add LRU mem cache implementation (#16226) 2021-07-10 23:54:15 +02:00