From 834db587a407da87e06a0264ea8730382c81c744 Mon Sep 17 00:00:00 2001 From: Anirudh Oppiliappan Date: Wed, 9 Apr 2025 12:00:33 +0300 Subject: [PATCH] knotserver: add missing perms to forked repo Thanks @dvjn.dev! --- knotserver/routes.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/knotserver/routes.go b/knotserver/routes.go index c56d9c36..a2a1dc3e 100644 --- a/knotserver/routes.go +++ b/knotserver/routes.go @@ -617,6 +617,14 @@ func (h *Handle) RepoFork(w http.ResponseWriter, r *http.Request) { return } + // add perms for this user to access the repo + err = h.e.AddRepo(did, ThisServer, relativeRepoPath) + if err != nil { + l.Error("adding repo permissions", "error", err.Error()) + writeError(w, err.Error(), http.StatusInternalServerError) + return + } + w.WriteHeader(http.StatusNoContent) } -- 2.51.2