pull-requests: security, check for permissions on exposure of repo-refs
This commit is contained in:
parent
bdccd1a75f
commit
6c435973fe
1 changed files with 7 additions and 0 deletions
|
|
@ -681,6 +681,13 @@ class RepoPullRequestsView(RepoAppView, DataGridAppView):
|
|||
repo = Repository.get_by_repo_name(target_repo_name)
|
||||
if not repo:
|
||||
raise HTTPNotFound()
|
||||
|
||||
target_perm = HasRepoPermissionAny(
|
||||
'repository.read', 'repository.write', 'repository.admin')(
|
||||
target_repo_name)
|
||||
if not target_perm:
|
||||
raise HTTPNotFound()
|
||||
|
||||
return PullRequestModel().generate_repo_data(
|
||||
repo, translator=self.request.translate)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue