Commit 170de82007f27c9d5f190b4b61745846a7381c53

Thomas de Grivel 2022-02-03T17:31:29

fix repository show

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
diff --git a/lib/kmxgit/repository_manager/repository.ex b/lib/kmxgit/repository_manager/repository.ex
index 533e797..526b6cb 100644
--- a/lib/kmxgit/repository_manager/repository.ex
+++ b/lib/kmxgit/repository_manager/repository.ex
@@ -143,6 +143,7 @@ defmodule Kmxgit.RepositoryManager.Repository do
     end
   end
 
+  def owner?(_, nil), do: false
   def owner?(repo, user) do
     if user do
       repo
@@ -158,6 +159,7 @@ defmodule Kmxgit.RepositoryManager.Repository do
     |> Enum.uniq
   end
 
+  def member?(_, nil), do: false
   def member?(repo, user) do
     if user do
       repo