diff --git a/lib/kmxgit_web/controllers/slug_controller.ex b/lib/kmxgit_web/controllers/slug_controller.ex
index 3c87878..0ad9061 100644
--- a/lib/kmxgit_web/controllers/slug_controller.ex
+++ b/lib/kmxgit_web/controllers/slug_controller.ex
@@ -35,7 +35,7 @@ defmodule KmxgitWeb.SlugController do
else
org = slug.organisation
if org do
- repos = org.repositories
+ repos = org.owned_repositories
|> Enum.filter(fn repo ->
repo.public_access || Repository.member?(repo, current_user)
end)
diff --git a/lib/kmxgit_web/templates/organisation/show.html.heex b/lib/kmxgit_web/templates/organisation/show.html.heex
index a6c0cd1..b5a3477 100644
--- a/lib/kmxgit_web/templates/organisation/show.html.heex
+++ b/lib/kmxgit_web/templates/organisation/show.html.heex
@@ -21,7 +21,7 @@
<hr/>
<h2><%= gettext "Repositories" %></h2>
<ul>
- <%= for repo <- Organisation.owned_repositories(@org) do %>
+ <%= for repo <- @repos do %>
<li>
<%= link Repository.full_slug(repo), to: Routes.repository_path(@conn, :show, @org.slug.slug, Repository.splat(repo)) %>
</li>