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/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.

#169

Let the CLI do what the browser does for the same account

merged · by keenan 6d ago · merged into main at 7e0b5950 by keenan 6d ago

keenan opened this 6d ago

What

A contributor can now use the CLI for the same things the browser offers: vole issue new, vole issue comment, vole issue edit on its own issue, and vole change new from its own branch. A maintainer’s key behaves as before.

This is the second half of #167, and it is stacked on that branch: writableMetadata is introduced there for run credentials, and this change calls it for every session instead of only credential sessions. The review diff against 01M6FFY0BARR9YDQ3KK64VQ0MG-run-credential is only the parity work.

Why

refs/heads/vole required maintain because the hook had no per-path authorization for it. That made the same account able to comment in the browser and not with a key — two transports, two permission models. #167 showed the rules were expressible: they are the ACL’s own capabilities. With the checker applied to every session, the shortcut goes, and both transports ask the same questions.

The rules, for a contribute account

Write Allowed
add a comment yes, and the file must name the account
file an issue yes, and the file must name the account
change or close an issue it wrote yes, including labels and assignees
change somebody else’s issue no: that is CanTriage, which the role does not have
open a change from its own branch yes
open a change from another branch no
edit or close a change it opened yes
approve no
write a release file no
remove an issue no
create the issues branch no; a maintainer creates it, from either transport

A maintainer’s key keeps every write on the branch, including writing an imported issue under its original author. The one rule that now applies to it as well is self-approval — which ValidateRequests already refused, so nothing that worked before stops working; it just gets the same answer one step earlier.

Shape

  • Hook (server/hook): writableMetadata runs for every push to the issues branch; the namespace gate no longer treats that branch as maintainer-only; approvals are checked for eligibility for everyone.
  • Tests: the credential tests stay (they now exercise the general path), and key sessions are covered separately — a contributor commenting, filing, closing its own issue, opening its own change; refused on somebody else’s issue, another branch, an approval, and a first push that would create the branch; a maintainer approving somebody else’s change and refused on its own; an expired credential behaving exactly like the account’s key.
  • Docs: CONTRIBUTING, docs/architecture.md, docs/accounts-and-access.md, docs/change-requests.md, and docs/issues.md stop saying contributors use the web because the CLI needs maintain.

Checks

  • go build ./..., go vet ./..., gofmt -l . clean.
  • vole workflow run verify passes against the stacked branch.
  • vole workflow check passes.

Part of #168. Stacked on #167.

Discussion (0)

No discussion yet.