1
1
mirror of https://github.com/go-gitea/gitea synced 2024-11-16 15:14:24 +00:00
This commit is contained in:
m.huber 2023-11-13 20:09:43 +01:00
parent 4bc1ce0a1d
commit 499d147055
No known key found for this signature in database
GPG Key ID: B8BE6D610E61C862

View File

@ -652,12 +652,12 @@ func AccessibleRepositoryCondition(user *user_model.User, unitType unit.Type) bu
userOrgTeamUnitRepoCond("`repository`.id", user.ID, unitType),
)
}
cond = cond.Or(
// 4. Repositories that we directly own
cond = cond.Or(builder.Eq{"`repository`.owner_id": user.ID})
if !user.IsRestricted {
builder.Eq{"`repository`.owner_id": user.ID},
// 5. Be able to see all public repos in private organizations that we are an org_user of
cond = cond.Or(userOrgPublicRepoCond(user.ID))
}
userOrgPublicRepoCond(user.ID),
)
}
return cond