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.
Split repository settings into tabs
e189a23e457b6aa01a35a4586586713cdc2d426d · Keenan Nemetz · 1d ago · parent 87ebcc5a
Split repository settings into tabs One page held four audiences and ten forms. Each part is now its own tab: General for the repository's own fields, Access for the instance-admin rules, Secrets for the values jobs read, and Danger for rename and delete. A tab is offered only to the accounts that may use it, and a viewer with one tab gets no row at all. The Access and Secrets tabs, and the failures on each, keep their own URLs so a redirect and an error land where the form was; the Access and Secrets fragments survive as deep links.
server/secret_test.go +3−3
| @@ -147,7 +147,7 @@ func TestSecretsOnTheSettingsPage(t *testing.T) { | |||
| 147 | 147 | ||
| 148 | 148 | // The owner is a repository admin, and an admin is a maintainer, so the | |
| 149 | 149 | // section is theirs too. | |
| 150 | resp, body := f.browserGet(t, "/r/"+f.repo+"/settings", cookie) | ||
| 150 | resp, body := f.browserGet(t, "/r/"+f.repo+"/settings?tab=secrets", cookie) | ||
| 151 | 151 | if resp.StatusCode != 200 || !strings.Contains(body, `id="secrets"`) { | |
| 152 | 152 | t.Fatalf("settings page has no secrets section: %d\n%s", resp.StatusCode, body) | |
| 153 | 153 | } | |
| @@ -166,7 +166,7 @@ func TestSecretsOnTheSettingsPage(t *testing.T) { | |||
| 166 | 166 | t.Fatalf("save redirected to %q", loc) | |
| 167 | 167 | } | |
| 168 | 168 | ||
| 169 | resp, body = f.browserGet(t, "/r/"+f.repo+"/settings?secret_saved=PRIVATE_KEY+v1", cookie) | ||
| 169 | resp, body = f.browserGet(t, "/r/"+f.repo+"/settings?tab=secrets&secret_saved=PRIVATE_KEY+v1", cookie) | ||
| 170 | 170 | if resp.StatusCode != 200 { | |
| 171 | 171 | t.Fatalf("settings after save = %d", resp.StatusCode) | |
| 172 | 172 | } | |
| @@ -221,7 +221,7 @@ func TestAMaintainerSeesTheSettingsTabForSecrets(t *testing.T) { | |||
| 221 | 221 | t.Fatalf("a maintainer cannot see the secrets section:\n%s", body) | |
| 222 | 222 | } | |
| 223 | 223 | // The parts of the page only an admin owns must not be offered. | |
| 224 | for _, adminOnly := range []string{"Default branch", "Danger zone", `id="access"`} { | ||
| 224 | for _, adminOnly := range []string{"Default branch", "Rename repository", "Delete repository", `id="access"`} { | ||
| 225 | 225 | if strings.Contains(body, adminOnly) { | |
| 226 | 226 | t.Fatalf("a maintainer was offered %q:\n%s", adminOnly, body) | |
| 227 | 227 | } | |