Commit f7c7377909d5b3086036a1785e0c9a5b5c8767e1

Thomas de Grivel 2024-05-14T21:18:42

fix repository tag controller

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
diff --git a/lib/kmxgit_web/controllers/repository_controller.ex b/lib/kmxgit_web/controllers/repository_controller.ex
index a6d5526..5653624 100644
--- a/lib/kmxgit_web/controllers/repository_controller.ex
+++ b/lib/kmxgit_web/controllers/repository_controller.ex
@@ -980,7 +980,7 @@ defmodule KmxgitWeb.RepositoryController do
     |> git_put_release(repo, tree, conn)
     |> git_put_tags(repo, conn, op, nil)
     |> git_put_avatars()
-
+    public_access = GitManager.public_access?(Repository.full_slug(repo))
     tag = Enum.find(git.tags, fn tag -> tag == tree end)
     if git.log1 && tag do
       conn
@@ -989,6 +989,7 @@ defmodule KmxgitWeb.RepositoryController do
       |> assign(:git, git)
       |> assign(:path, nil)
       |> assign(:repo, repo)
+      |> assign(:public_access, public_access)
       |> assign(:tag, tag)
       |> render("tag.html")
     else