1
0
mirror of https://github.com/go-gitea/gitea.git synced 2024-11-02 08:57:32 -04:00
gitea/routers/api/v1
zeripath 0b4a8be26b
Ensure that restricted users can access repos for which they are members (#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 10:54:40 +08:00
..
admin Move login related structs and functions to models/login (#17093) 2021-09-24 19:32:56 +08:00
misc Add nodeinfo endpoint for federation purposes (#16953) 2021-09-28 01:38:06 +02:00
notify Notifications API: respond with updated notifications (#17064) 2021-09-17 19:40:50 -04:00
org Update documents for Gitea behind reverse proxy. Fix some small bugs (some URLs are generated without sub-path) (#17320) 2021-10-15 23:34:07 -04:00
repo Ensure that restricted users can access repos for which they are members (#17460) 2021-10-28 10:54:40 +08:00
settings Make mirror feature more configurable (#16957) 2021-09-07 17:49:36 +02:00
swagger Add API to get/edit wiki (#17278) 2021-10-25 11:43:40 +08:00
user Move login related structs and functions to models/login (#17093) 2021-09-24 19:32:56 +08:00
utils Move login related structs and functions to models/login (#17093) 2021-09-24 19:32:56 +08:00
api.go Add API to get/edit wiki (#17278) 2021-10-25 11:43:40 +08:00