Browse Source

fix bu ong normal user visit public repo (#1984)

tags/v1.21.12.1
Lunny Xiao GitHub 9 years ago
parent
commit
e2ec4b7c23
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      models/repo.go

+ 1
- 1
models/repo.go View File

@@ -359,7 +359,7 @@ func (repo *Repository) getUnitsByUserID(e Engine, userID int64, isAdmin bool) (
return err
}

if !repo.Owner.IsOrganization() || userID == 0 || isAdmin {
if !repo.Owner.IsOrganization() || userID == 0 || isAdmin || !repo.IsPrivate {
return nil
}



Loading…
Cancel
Save