0
0
Fork 0
mirror of https://github.com/go-gitea/gitea synced 2024-12-26 01:34:20 +01:00
gitea/routers/api/v1/repo
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
..
blob.go
branch.go Support unprotected file patterns (#16395) 2021-09-11 16:21:17 +02:00
collaborators.go
commits.go Add API to get commit diff/patch (#17095) 2021-09-20 18:14:29 +02:00
file.go Add caller to cat-file batch calls (#17082) 2021-09-17 20:54:15 -04:00
fork.go
git_hook.go
git_ref.go
hook.go
hook_test.go Move db related basic functions to models/db (#17075) 2021-09-19 19:49:59 +08:00
issue.go API: don't allow merged PRs to be reopened (#17192) 2021-10-02 23:11:17 -04:00
issue_comment.go
issue_label.go
issue_reaction.go
issue_stopwatch.go
issue_subscription.go
issue_tracked_time.go
key.go
label.go
language.go
main_test.go Move db related basic functions to models/db (#17075) 2021-09-19 19:49:59 +08:00
migrate.go
milestone.go
mirror.go
notes.go
pull.go Add buttons to allow loading of incomplete diffs (#16829) 2021-10-15 17:05:33 +01:00
pull_review.go
release.go Ensure that restricted users can access repos for which they are members (#17460) 2021-10-28 10:54:40 +08:00
release_attachment.go
release_tags.go
repo.go
repo_test.go Move db related basic functions to models/db (#17075) 2021-09-19 19:49:59 +08:00
star.go
status.go
subscriber.go
tag.go
teams.go
topic.go
transfer.go
tree.go
wiki.go Add API to get/edit wiki (#17278) 2021-10-25 11:43:40 +08:00