0
0
Fork 0
mirror of https://github.com/go-gitea/gitea synced 2024-11-16 23:11:10 +01:00

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

This commit is contained in:
Lunny Xiao 2017-06-17 12:53:51 +08:00 committed by GitHub
parent 8fc64741d9
commit e2ec4b7c23

View file

@ -359,7 +359,7 @@ func (repo *Repository) getUnitsByUserID(e Engine, userID int64, isAdmin bool) (
return err return err
} }
if !repo.Owner.IsOrganization() || userID == 0 || isAdmin { if !repo.Owner.IsOrganization() || userID == 0 || isAdmin || !repo.IsPrivate {
return nil return nil
} }