summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--modules/context/repo.go1
-rw-r--r--templates/repo/settings/collaboration.tmpl2
2 files changed, 3 insertions, 0 deletions
diff --git a/modules/context/repo.go b/modules/context/repo.go
index 3ef726f2e8..3caf583f83 100644
--- a/modules/context/repo.go
+++ b/modules/context/repo.go
@@ -395,6 +395,7 @@ func RepoAssignment() macaron.Handler {
ctx.Data["Owner"] = ctx.Repo.Repository.Owner
ctx.Data["IsRepositoryOwner"] = ctx.Repo.IsOwner()
ctx.Data["IsRepositoryAdmin"] = ctx.Repo.IsAdmin()
+ ctx.Data["RepoOwnerIsOrganization"] = repo.Owner.IsOrganization()
ctx.Data["CanWriteCode"] = ctx.Repo.CanWrite(models.UnitTypeCode)
ctx.Data["CanWriteIssues"] = ctx.Repo.CanWrite(models.UnitTypeIssues)
ctx.Data["CanWritePulls"] = ctx.Repo.CanWrite(models.UnitTypePullRequests)
diff --git a/templates/repo/settings/collaboration.tmpl b/templates/repo/settings/collaboration.tmpl
index b65fd4e167..61feb4ec18 100644
--- a/templates/repo/settings/collaboration.tmpl
+++ b/templates/repo/settings/collaboration.tmpl
@@ -52,6 +52,7 @@
</form>
</div>
+ {{if .RepoOwnerIsOrganization}}
<h4 class="ui top attached header">
Teams
</h4>
@@ -108,6 +109,7 @@
</div>
{{end}}
</div>
+ {{end}}
</div>
</div>