vole
Clone
Read only, no credentials:
https://rodent.software/git/vole.git
Write over SSH with a registered key:
git clone ssh://git@0.0.0.0:2222/vole.git
A free and open-source forge that lives in your Git repo.
Merge change request 01M70WES5ZZDJ6RP226WB11BBZ: Let people rename and remove their own passkeys
keenan · 1h ago
4b8c9e1d
| 1 | package role |
| 2 | |
| 3 | import "testing" |
| 4 | |
| 5 | func TestParseAndOrder(t *testing.T) { |
| 6 | t.Parallel() |
| 7 | for in, want := range map[string]Role{ |
| 8 | "": None, |
| 9 | "none": None, |
| 10 | "read": Read, |
| 11 | "contrib": Contribute, |
| 12 | "contributor": Contribute, |
| 13 | "contribute": Contribute, |
| 14 | "write": Maintain, |
| 15 | "maintainer": Maintain, |
| 16 | "maintain": Maintain, |
| 17 | "owner": Admin, |
| 18 | "admin": Admin, |
| 19 | } { |
| 20 | got, err := Parse(in) |
| 21 | if err != nil || got != want { |
| 22 | t.Errorf("Parse(%q) = %v, %v; want %v", in, got, err, want) |
| 23 | } |
| 24 | } |
| 25 | if _, err := Parse("wizard"); err == nil { |
| 26 | t.Fatal("Parse accepted an unknown role") |
| 27 | } |
| 28 | if !Admin.AtLeast(Maintain) || Contribute.AtLeast(Maintain) || !Maintain.AtLeast(Maintain) { |
| 29 | t.Fatal("role ordering is not minimum-role ordering") |
| 30 | } |
| 31 | } |
| 32 |