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

tokarchuk/v1.17
Lunny Xiao 8 years ago committed by GitHub
parent 8fc64741d9
commit e2ec4b7c23
  1. 2
      models/repo.go

@ -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