diff options
author | Rémy Boulanouar <rboulanouar@gmail.com> | 2019-02-18 17:00:27 +0100 |
---|---|---|
committer | Lauris BH <lauris@nix.lv> | 2019-02-18 18:00:27 +0200 |
commit | 64ce159a6eacc81962d07a8f5ef7f69c17365363 (patch) | |
tree | d6b94d035de14df8b1a773d97ab35937cce1d00a /routers/repo | |
parent | ae3a913122d3430ccf14da22f09daf6f636a00f8 (diff) | |
download | gitea-64ce159a6eacc81962d07a8f5ef7f69c17365363.tar.gz gitea-64ce159a6eacc81962d07a8f5ef7f69c17365363.zip |
Allow to set organization visibility (public, internal, private) (#1763)
Diffstat (limited to 'routers/repo')
-rw-r--r-- | routers/repo/view.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/routers/repo/view.go b/routers/repo/view.go index 02cf2cc0bd..da6c527242 100644 --- a/routers/repo/view.go +++ b/routers/repo/view.go @@ -303,6 +303,11 @@ func renderFile(ctx *context.Context, entry *git.TreeEntry, treeLink, rawLink st // Home render repository home page func Home(ctx *context.Context) { + if !models.HasOrgVisible(ctx.Repo.Repository.Owner, ctx.User) { + ctx.NotFound("HasOrgVisible", nil) + return + } + if len(ctx.Repo.Units) > 0 { var firstUnit *models.Unit for _, repoUnit := range ctx.Repo.Units { |