summaryrefslogtreecommitdiffstats
path: root/models
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2017-06-17 12:53:51 +0800
committerGitHub <noreply@github.com>2017-06-17 12:53:51 +0800
commite2ec4b7c23e0be11e9100a23f8156e9ce9fba399 (patch)
tree7fda2176c85f2be3999315d4d998d3c8fecf4dae /models
parent8fc64741d95aa31665e4238fd7e20396a4cdf813 (diff)
downloadgitea-e2ec4b7c23e0be11e9100a23f8156e9ce9fba399.tar.gz
gitea-e2ec4b7c23e0be11e9100a23f8156e9ce9fba399.zip
fix bu ong normal user visit public repo (#1984)
Diffstat (limited to 'models')
-rw-r--r--models/repo.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/models/repo.go b/models/repo.go
index 47d694cdac..f8fef47ebe 100644
--- a/models/repo.go
+++ b/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
}