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.

#178

Answer whoami --role from the repository's rules

merged · by keenan 6d ago · merged into main at eec0e603 by keenan 6d ago

keenan opened this 6d ago

Why

A role is per repository, so vole whoami cannot print one role without first knowing which repository is meant. The default answer stays the account name because scripts such as -a "$(./vole whoami)" depend on it; the role is an explicit question.

What changed

vole whoami --role prints the effective role the key holds on the repository named by the remote:

vole whoami          # keenan
vole whoami --role   # admin
  • The client sends the current remote’s repository path to the server’s vole-whoami verb.
  • The server resolves the repository’s ACL: its default and per-account rules, with the instance-wide role applied where the repository is public.
  • A private repository the account cannot read is reported as not found, the same as a fetch, rather than revealing the repository or a role.
  • A run credential may ask only about its own repository.
  • The default vole whoami response is unchanged.

The CLI help, AGENTS.md, CONTRIBUTING.md, and the account, CLI and getting-started docs point at the new query.

Verification

  • go test -tags sqlite_fts5 ./...
  • New TestWhoAmIRoleAnswersFromTheInstance covers the repository owner, a maintainer, a private repository hidden from a stranger, and the public default role.
  • python3 scripts/check-links.py
  • ./vole workflow check

Discussion (0)

No discussion yet.