vole
Site
Clone
Read only, no credentials:
https://rodent.software/vole.git
Write over SSH with a registered key:
git clone ssh://git@rodent.software/vole.git
Self-hosted forge that lives in your Git repo.
Let repo create choose visibility, not an owner
d74e7e231de16fa00366dc8ccc392fc9c637b52d · Keenan Nemetz · 3d ago · parent 3455902a
Let repo create choose visibility, not an owner A repository has no owner: the argument only seeded one admin entry in the ACL store, and instance admins can already administer every repository. The create command therefore asked for a fact the repository does not keep. Replace --owner with --visibility private|public on `vole admin repo create`, the remote admin command, and the web form. The initial rule set is written once, inside the store, so a public repository is never briefly private. An admin who wants to hand a repository to someone grants a role with the acl commands, exactly as for any later access change. closes: 01M82CC7G9W46PRP89GQ5CNMDE
server/home_test.go +3−2
| @@ -12,6 +12,7 @@ import ( | |||
| 12 | 12 | "time" | |
| 13 | 13 | ||
| 14 | 14 | "rodent.software/vole/forge/config" | |
| 15 | "rodent.software/vole/forge/repo" | ||
| 15 | 16 | "rodent.software/vole/metadata" | |
| 16 | 17 | ) | |
| 17 | 18 | ||
| @@ -172,7 +173,7 @@ func TestInstanceActivityListsOnlyVisibleRepositories(t *testing.T) { | |||
| 172 | 173 | t.Fatalf("public issue: %v\n%s", err, errs) | |
| 173 | 174 | } | |
| 174 | 175 | ||
| 175 | secret, err := f.srv.Repos.Create("secret", f.ownerID, "private") | ||
| 176 | secret, err := f.srv.Repos.Create("secret", repo.CreateOptions{Owner: f.ownerID, Description: "private"}) | ||
| 176 | 177 | if err != nil { | |
| 177 | 178 | t.Fatal(err) | |
| 178 | 179 | } | |
| @@ -244,7 +245,7 @@ func TestFirstRunOnboardingIsAnInstanceAdminPage(t *testing.T) { | |||
| 244 | 245 | if resp.StatusCode != 200 { | |
| 245 | 246 | t.Fatalf("home = %d", resp.StatusCode) | |
| 246 | 247 | } | |
| 247 | for _, want := range []string{"No repositories yet", "New repository", "Or from the instance directory", "--owner keenan", `href="/-/repos/new"`} { | ||
| 248 | for _, want := range []string{"No repositories yet", "New repository", "Or from the instance directory", "vole admin repo create demo", `href="/-/repos/new"`} { | ||
| 248 | 249 | if !strings.Contains(body, want) { | |
| 249 | 250 | t.Fatalf("first-run page is missing %q:\n%s", want, body) | |
| 250 | 251 | } | |