aboutsummaryrefslogtreecommitdiffstats
path: root/models/review.go
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2022-04-01 14:05:31 +0800
committerGitHub <noreply@github.com>2022-04-01 14:05:31 +0800
commit89b9d42f083b1f83ee8fc3ba0feaaa7cf04ec05b (patch)
treee5ab9cdf543d84b89324a4c70e27d1494232d185 /models/review.go
parent124b072f0b69650baff086b9688d198f5a6761af (diff)
downloadgitea-89b9d42f083b1f83ee8fc3ba0feaaa7cf04ec05b.tar.gz
gitea-89b9d42f083b1f83ee8fc3ba0feaaa7cf04ec05b.zip
Fix broken of team create (#19288)
* Fix broken of team create * Update models/organization/team.go Co-authored-by: wxiaoguang <wxiaoguang@gmail.com> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Diffstat (limited to 'models/review.go')
-rw-r--r--models/review.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/models/review.go b/models/review.go
index 6ef8d530b6..f360d459cf 100644
--- a/models/review.go
+++ b/models/review.go
@@ -273,7 +273,7 @@ func isOfficialReviewerTeam(ctx context.Context, issue *Issue, team *organizatio
}
if !pr.ProtectedBranch.EnableApprovalsWhitelist {
- return team.UnitAccessMode(ctx, unit.TypeCode) >= perm.AccessModeWrite, nil
+ return team.UnitAccessModeCtx(ctx, unit.TypeCode) >= perm.AccessModeWrite, nil
}
return base.Int64sContains(pr.ProtectedBranch.ApprovalsWhitelistTeamIDs, team.ID), nil