1
1
mirror of https://github.com/go-gitea/gitea synced 2025-12-07 05:18:29 +00:00

Fix team member access check (#35899)

Fix #35499
This commit is contained in:
wxiaoguang
2025-11-09 11:13:31 +08:00
committed by GitHub
parent 919348665b
commit 050c9485df
7 changed files with 87 additions and 60 deletions

View File

@@ -73,10 +73,9 @@ func SettingsProtectedBranch(c *context.Context) {
c.Data["PageIsSettingsBranches"] = true
c.Data["Title"] = c.Locale.TrString("repo.settings.protected_branch") + " - " + rule.RuleName
users, err := access_model.GetRepoReaders(c, c.Repo.Repository)
users, err := access_model.GetUsersWithUnitAccess(c, c.Repo.Repository, perm.AccessModeRead, unit.TypePullRequests)
if err != nil {
c.ServerError("Repo.Repository.GetReaders", err)
c.ServerError("GetUsersWithUnitAccess", err)
return
}
c.Data["Users"] = users