mirror of
https://github.com/go-gitea/gitea
synced 2025-01-03 03:45:56 +01:00
split
This commit is contained in:
parent
4bc1ce0a1d
commit
499d147055
@ -652,12 +652,12 @@ func AccessibleRepositoryCondition(user *user_model.User, unitType unit.Type) bu
|
|||||||
userOrgTeamUnitRepoCond("`repository`.id", user.ID, unitType),
|
userOrgTeamUnitRepoCond("`repository`.id", user.ID, unitType),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
// 4. Repositories that we directly own
|
cond = cond.Or(
|
||||||
cond = cond.Or(builder.Eq{"`repository`.owner_id": user.ID})
|
// 4. Repositories that we directly own
|
||||||
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
|
// 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
|
return cond
|
||||||
|
Loading…
Reference in New Issue
Block a user