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

@@ -345,7 +345,7 @@ func newFixtureWith(t *testing.T, tweak func(*config.Config)) *fixture {
345 345 srv.Close()
346 346 })
347 347
348 m, err := srv.Repos.Create(f.repo, owner.Name, "demo repo")
348 m, err := srv.Repos.Create(f.repo, repo.CreateOptions{Owner: owner.Name, Description: "demo repo"})
349 349 if err != nil {
350 350 t.Fatal(err)
351 351 }
@@ -386,7 +386,7 @@ func (f *fixture) instanceRepo(t *testing.T, files map[string][]byte) {
386 386 f.cfg.InstanceRepo = name
387 387 }
388 388 if _, err := f.srv.Repos.Meta(name); err != nil {
389 m, err := f.srv.Repos.Create(name, f.ownerID, "instance customization")
389 m, err := f.srv.Repos.Create(name, repo.CreateOptions{Owner: f.ownerID, Description: "instance customization"})
390 390 if err != nil {
391 391 t.Fatalf("create instance repo: %v", err)
392 392 }