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.

Add instance-wide roles and refine access UI

5b814e9958090cfd1fa826efb2d375bf613547c1 · Keenan Nemetz · 14d ago · parent 9579c1f9

Add instance-wide roles and refine access UI

Instance roles now live on accounts, apply to public repositories, and the Admin role is the unified instance-admin permission with access to every repository. Repository ACLs can raise an instance role but not lower it.

Adds role assignment to the users UI and CLI, open-registration role config, a reusable role picker, and separates adding a repository account from saving access rules.

server/admin_test.go +9

@@ -9,6 +9,8 @@ import (
9 9 "path/filepath"
10 10 "strings"
11 11 "testing"
12
13 "github.com/rodent-software/vole/forge/access"
12 14 )
13 15
14 16 // adminSSH runs one `vole-admin` command over the SSH listener and returns
@@ -75,6 +77,13 @@ func TestRemoteAdminManagesUsersAndRepos(t *testing.T) {
75 77 if !strings.Contains(out, "enrollment") {
76 78 t.Fatalf("user create --no-key did not print an enrollment link: %s", out)
77 79 }
80 out, errOut, err = f.adminSSH(f.keyPath, nil, "user", "role", "bob", "contribute")
81 if err != nil {
82 t.Fatalf("user role: %v\nstdout: %s\nstderr: %s", err, out, errOut)
83 }
84 if a, err := f.srv.Identity.Find("bob"); err != nil || a.Role != access.Contribute {
85 t.Fatalf("remote role did not land: %+v, %v", a, err)
86 }
78 87
79 88 pub, _ := keypair(t, filepath.Join(f.cfg.DataDir, "id_alice"))
80 89 out, errOut, err = f.adminSSH(f.keyPath, []byte(pub), "user", "create", "alice")