Skip to content

Commit 9be48b3

Browse files
committed
Modified some comments to match the changes
1 parent 30550c3 commit 9be48b3

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

models/issue.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -1375,7 +1375,7 @@ func issuePullAccessibleRepoCond(repoIDstr string, userID int64, org *organizati
13751375
cond = cond.And(
13761376
builder.Or(
13771377
userOwnedRepoCond(userID), // owned repos
1378-
userAccessRepoCond(repoIDstr, userID), // collaboration repos
1378+
userAccessRepoCond(repoIDstr, userID), // user can access repo in a unit independent way
13791379
userAssignedRepoCond(repoIDstr, userID), // user has been assigned accessible public repos
13801380
userMentionedRepoCond(repoIDstr, userID), // user has been mentioned accessible public repos
13811381
userCreateIssueRepoCond(repoIDstr, userID, isPull), // user has created issue/pr accessible public repos

models/repo_list.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,7 @@ func teamUnitsRepoCond(id string, userID, orgID, teamID int64, units ...unit.Typ
282282
))
283283
}
284284

285-
// userAccessRepoCond returns a condition for selecting all repositories a user has access to
285+
// userAccessRepoCond returns a condition for selecting all repositories a user has unit independent access to
286286
func userAccessRepoCond(idStr string, userID int64) builder.Cond {
287287
return builder.In(idStr, builder.Select("repo_id").
288288
From("`access`").
@@ -425,7 +425,7 @@ func SearchRepositoryCondition(opts *SearchRepoOptions) builder.Cond {
425425
builder.Neq{"owner_id": opts.OwnerID},
426426
// 2. But we can see because of:
427427
builder.Or(
428-
// A. We have access
428+
// A. We have unit independent access
429429
userAccessRepoCond("`repository`.id", opts.OwnerID),
430430
// B. We are in a team for
431431
userOrgTeamRepoCond("`repository`.id", opts.OwnerID),
@@ -607,7 +607,7 @@ func accessibleRepositoryCondition(user *user_model.User, unitType unit.Type) bu
607607
}
608608

609609
if user != nil {
610-
// 2. Be able to see all repositories that we have direct access to
610+
// 2. Be able to see all repositories that we have unit independent access to
611611
// 3. Be able to see all repositories through team membership(s)
612612
if unitType == unit.TypeInvalid {
613613
// Regardless of UnitType

0 commit comments

Comments
 (0)