Sign in

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

vole
Clone

Read only, no credentials:

https://rodent.software/vole.git

Write over SSH with a registered key:

git clone ssh://git@rodent.software:2222/vole.git

A free and open-source forge that lives in your Git repo.

Let instance admins create repositories

455835e7b5d329ca64c96234dfffc7b6702f370e · Keenan Nemetz · 15d ago · parent 395554f4

Let instance admins create repositories

The Admin section gains a New repository form: name, owner, and description. Creation uses the same store method as the CLI, seeds the owner as repo admin, updates the index, is audited, and lands on the new repository's access editor. This completes the instance-admin slice in the UI plan.

server/web/templates/admin_repo_new.html +37

@@ -0,0 +1,37 @@
1 {{define "admin_repo_new"}}
2 {{template "header" .}}
3 <div class="page-head">
4 <div class="page-head-main">
5 <h1>New repository</h1>
6 <p class="page-sub">The owner becomes the repository's first admin. New repositories are private.</p>
7 </div>
8 <div class="page-head-actions">
9 <a class="button secondary" href="/admin">{{icon "book-open"}}All repositories</a>
10 </div>
11 </div>
12
13 {{if .Error}}<div class="flash bad">{{.Error}}</div>{{end}}
14
15 <form method="post" action="/admin/repos" class="form-block">
16 <input type="hidden" name="csrf" value="{{.CSRF}}">
17 <div class="card form-card">
18 <label>Name
19 <input type="text" name="name" required maxlength="63" autocomplete="off" value="{{.Name}}" placeholder="lowercase-name">
20 </label>
21 <label>Owner
22 <select name="owner" required>
23 <option value="">Choose an account…</option>
24 {{range .Accounts}}<option value="{{.Name}}"{{if eq .Name $.Owner}} selected{{end}}>{{.Label}} @{{.Name}}</option>{{end}}
25 </select>
26 </label>
27 <label>Description
28 <input type="text" name="description" maxlength="500" value="{{.Description}}" placeholder="What is this repository for?">
29 </label>
30 </div>
31 <div class="form-actions">
32 <a class="button secondary" href="/admin">Cancel</a>
33 <button type="submit">{{icon "plus"}}Create repository</button>
34 </div>
35 </form>
36 {{template "footer" .}}
37 {{end}}