From 499d1470551a9903a7122f8ea25bfd93034ca99e Mon Sep 17 00:00:00 2001 From: "m.huber" Date: Mon, 13 Nov 2023 20:09:43 +0100 Subject: [PATCH] split --- models/repo/repo_list.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/models/repo/repo_list.go b/models/repo/repo_list.go index 533ca5251fe..1668c23c774 100644 --- a/models/repo/repo_list.go +++ b/models/repo/repo_list.go @@ -652,12 +652,12 @@ func AccessibleRepositoryCondition(user *user_model.User, unitType unit.Type) bu userOrgTeamUnitRepoCond("`repository`.id", user.ID, unitType), ) } - // 4. Repositories that we directly own - cond = cond.Or(builder.Eq{"`repository`.owner_id": user.ID}) - if !user.IsRestricted { + cond = cond.Or( + // 4. Repositories that we directly own + 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