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/polish_test.go +4−3
| @@ -7,6 +7,7 @@ import ( | |||
| 7 | 7 | "time" | |
| 8 | 8 | ||
| 9 | 9 | voleid "rodent.software/vole/core/id" | |
| 10 | "rodent.software/vole/forge/repo" | ||
| 10 | 11 | ) | |
| 11 | 12 | ||
| 12 | 13 | func TestRepositorySearchOnlyFindsVisibleRepositories(t *testing.T) { | |
| @@ -14,7 +15,7 @@ func TestRepositorySearchOnlyFindsVisibleRepositories(t *testing.T) { | |||
| 14 | 15 | f := newFixture(t) | |
| 15 | 16 | f.publish(f.repo) | |
| 16 | 17 | ||
| 17 | notes, err := f.srv.Repos.Create("notes", f.ownerID, "release notes and drafts") | ||
| 18 | notes, err := f.srv.Repos.Create("notes", repo.CreateOptions{Owner: f.ownerID, Description: "release notes and drafts"}) | ||
| 18 | 19 | if err != nil { | |
| 19 | 20 | t.Fatal(err) | |
| 20 | 21 | } | |
| @@ -23,7 +24,7 @@ func TestRepositorySearchOnlyFindsVisibleRepositories(t *testing.T) { | |||
| 23 | 24 | } | |
| 24 | 25 | f.publish("notes") | |
| 25 | 26 | ||
| 26 | secret, err := f.srv.Repos.Create("secret", f.ownerID, "hidden roadmap") | ||
| 27 | secret, err := f.srv.Repos.Create("secret", repo.CreateOptions{Owner: f.ownerID, Description: "hidden roadmap"}) | ||
| 27 | 28 | if err != nil { | |
| 28 | 29 | t.Fatal(err) | |
| 29 | 30 | } | |
| @@ -137,7 +138,7 @@ func TestHomeFeedMergesVisibleRepositories(t *testing.T) { | |||
| 137 | 138 | t.Fatalf("public issues push: %s", errs) | |
| 138 | 139 | } | |
| 139 | 140 | ||
| 140 | secret, err := f.srv.Repos.Create("secret", f.ownerID, "private") | ||
| 141 | secret, err := f.srv.Repos.Create("secret", repo.CreateOptions{Owner: f.ownerID, Description: "private"}) | ||
| 141 | 142 | if err != nil { | |
| 142 | 143 | t.Fatal(err) | |
| 143 | 144 | } | |