Skip to content

Commit e68479a

Browse files
committed
Add todo for checking permissions
1 parent b6a8a65 commit e68479a

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

routers/web/repo/pull_review.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -398,6 +398,7 @@ func UpdatePullReviewRequest(ctx *context.Context) {
398398
return
399399
}
400400

401+
// TODO: Team review request should check if the team has permission to review the PR
401402
_, err = pull_service.TeamReviewRequest(ctx, issue.PullRequest, ctx.Doer, team, action == "attach")
402403
if err != nil {
403404
if issues_model.IsErrNotValidReviewRequest(err) {
@@ -430,6 +431,7 @@ func UpdatePullReviewRequest(ctx *context.Context) {
430431
return
431432
}
432433

434+
// TODO: Reviewer review request should check if the user has permission to review the PR
433435
_, err = pull_service.ReviewRequest(ctx, issue.PullRequest, ctx.Doer, &ctx.Repo.Permission, reviewer, action == "attach")
434436
if err != nil {
435437
if issues_model.IsErrNotValidReviewRequest(err) {

0 commit comments

Comments
 (0)