Sign in

Search issue titles and bodies, change requests and comments. Private repositories you cannot read are not included.

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/load_test.go +3−2

@@ -43,6 +43,7 @@ import (
43 43 "rodent.software/vole/core/git"
44 44 "rodent.software/vole/core/lfs"
45 45 "rodent.software/vole/forge/config"
46 "rodent.software/vole/forge/repo"
46 47 "rodent.software/vole/metadata"
47 48 )
48 49
@@ -447,7 +448,7 @@ func seedLoadRepo(t *testing.T, f *fixture) loadSeed {
447 448 // route's cost actually differs.
448 449 func seedSmallRepo(t *testing.T, f *fixture, name string) {
449 450 t.Helper()
450 m, err := f.srv.Repos.Create(name, f.ownerID, "small load repository")
451 m, err := f.srv.Repos.Create(name, repo.CreateOptions{Owner: f.ownerID, Description: "small load repository"})
451 452 if err != nil {
452 453 t.Fatal(err)
453 454 }
@@ -481,7 +482,7 @@ func seedSmallRepo(t *testing.T, f *fixture, name string) {
481 482 // history walk is not trivial.
482 483 func seedLargeRepo(t *testing.T, f *fixture, name string) {
483 484 t.Helper()
484 m, err := f.srv.Repos.Create(name, f.ownerID, "large load repository")
485 m, err := f.srv.Repos.Create(name, repo.CreateOptions{Owner: f.ownerID, Description: "large load repository"})
485 486 if err != nil {
486 487 t.Fatal(err)
487 488 }