diff --git a/appview/knots/knots.go b/appview/knots/knots.go index cfdced38..8bfb252c 100644 --- a/appview/knots/knots.go +++ b/appview/knots/knots.go @@ -141,6 +141,18 @@ func (k *Knots) init(w http.ResponseWriter, r *http.Request) { l.Info("checking domain") + registration, err := db.RegistrationByDomain(k.Db, domain) + if err != nil { + l.Error("failed to get registration for domain", "err", err) + fail() + return + } + if registration.ByDid != user.Did { + l.Error("unauthorized", "wantedDid", registration.ByDid, "gotDid", user.Did) + w.WriteHeader(http.StatusUnauthorized) + return + } + secret, err := db.GetRegistrationKey(k.Db, domain) if err != nil { l.Error("failed to get registration key for domain", "err", err) diff --git a/appview/pages/templates/knots/index.html b/appview/pages/templates/knots/index.html index d583be82..8d9019ae 100644 --- a/appview/pages/templates/knots/index.html +++ b/appview/pages/templates/knots/index.html @@ -19,7 +19,7 @@

Knots are lightweight headless servers that enable users to host Git repositories with ease. Knots are designed for either single or multi-tenant use which is perfect for self-hosting on a Raspberry Pi at home, or larger “community” servers. - By default, Tangled provides managed knots where you can host your repositories for free. + When creating a repository, you can choose a knot to store it on. Checkout the documentation if you're interested in self-hosting. diff --git a/appview/pages/templates/user/fragments/repoCard.html b/appview/pages/templates/user/fragments/repoCard.html index d64c00f4..fc369fa3 100644 --- a/appview/pages/templates/user/fragments/repoCard.html +++ b/appview/pages/templates/user/fragments/repoCard.html @@ -47,7 +47,7 @@ {{ end }} {{ with .PullCount.Open }}

- {{ i "git-pull-request-arrow" "w-3 h-3" }} + {{ i "git-pull-request" "w-3 h-3" }} {{ . }}
{{ end }}