You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
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>
3 years ago
..
blob.go Swagger info corrections (#9441) 5 years ago
branch.go Support unprotected file patterns (#16395) 3 years ago
collaborators.go [API] generalize list header (#16551) 3 years ago
commits.go Add API to get commit diff/patch (#17095) 3 years ago
file.go Add caller to cat-file batch calls (#17082) 3 years ago
fork.go Refactor the fork service slightly to take ForkRepoOptions (#16744) 3 years ago
git_hook.go Move macaron to chi (#14293) 3 years ago
git_ref.go Let branch/tag name be a valid ref to get CI status (#16400) 3 years ago
hook.go [API] generalize list header (#16551) 3 years ago
hook_test.go Move db related basic functions to models/db (#17075) 3 years ago
issue.go API: don't allow merged PRs to be reopened (#17192) 3 years ago
issue_comment.go [API] generalize list header (#16551) 3 years ago
issue_label.go Calculate label URL on API (#16186) 3 years ago
issue_reaction.go [refactor] Unify the export of user data via API (#15144) 3 years ago
issue_stopwatch.go [API] generalize list header (#16551) 3 years ago
issue_subscription.go [refactor] Unify the export of user data via API (#15144) 3 years ago
issue_tracked_time.go [API] generalize list header (#16551) 3 years ago
key.go [API] generalize list header (#16551) 3 years ago
label.go Calculate label URL on API (#16186) 3 years ago
language.go Add language statistics API endpoint (#11737) 4 years ago
main_test.go Move db related basic functions to models/db (#17075) 3 years ago
migrate.go Make mirror feature more configurable (#16957) 3 years ago
milestone.go [API] generalize list header (#16551) 3 years ago
mirror.go Make mirror feature more configurable (#16957) 3 years ago
notes.go Add an api endpoint to fetch git notes (#15373) (#16649) 3 years ago
pull.go Add buttons to allow loading of incomplete diffs (#16829) 3 years ago
pull_review.go [API] generalize list header (#16551) 3 years ago
release.go Ensure that restricted users can access repos for which they are members (#17460) 3 years ago
release_attachment.go Add repo_id for attachment (#16958) 3 years ago
release_tags.go [API] Add delete release by tag & fix unreleased inconsistency (#14563) 3 years ago
repo.go [API] generalize list header (#16551) 3 years ago
repo_test.go Move db related basic functions to models/db (#17075) 3 years ago
star.go [API] generalize list header (#16551) 3 years ago
status.go [API] generalize list header (#16551) 3 years ago
subscriber.go [API] generalize list header (#16551) 3 years ago
tag.go [API] generalize list header (#16551) 3 years ago
teams.go [API] List, Check, Add & delete endpoints for repository teams (#13630) 3 years ago
topic.go [API] generalize list header (#16551) 3 years ago
transfer.go Repository transfer has to be confirmed, if user can not create repo for new owner (#14792) 3 years ago
tree.go Rename context.Query to context.Form (#16562) 3 years ago
wiki.go Add API to get/edit wiki (#17278) 3 years ago