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/web/templates/admin_repo_new.html +5−5

@@ -3,7 +3,7 @@
3 3 <div class="page-head">
4 4 <div class="page-head-main">
5 5 <h1>New repository</h1>
6 <p class="page-sub">The owner becomes the repository's first admin. New repositories are private.</p>
6 <p class="page-sub">A repository starts private unless you make it public. Access is granted from its Settings after it exists.</p>
7 7 </div>
8 8 </div>
9 9
@@ -15,10 +15,10 @@
15 15 <label>Name
16 16 <input type="text" name="name" required maxlength="63" autocomplete="off" value="{{.Name}}" placeholder="lowercase-name">
17 17 </label>
18 <label>Owner
19 <select name="owner" required>
20 <option value="">Choose an account…</option>
21 {{range .Accounts}}<option value="{{.Name}}"{{if eq .Name $.Owner}} selected{{end}}>{{.Name}}</option>{{end}}
18 <label>Visibility
19 <select name="visibility">
20 <option value="private"{{if ne .Visibility "public"}} selected{{end}}>Private — only accounts with access</option>
21 <option value="public"{{if eq .Visibility "public"}} selected{{end}}>Public — anyone may read</option>
22 22 </select>
23 23 </label>
24 24 <label>Description