Loading
feat(roles): expose each role's stable machine key on ListRoles
What
Adds a key field to RoleInfo (the ListRoles RPC's wire type) and to the domain Role type, so a caller gets each role's stable machine identifier (e.g. artifact_admin) alongside its id and name.
Why
Every role YAML definition already carries a key (RoleDef::key), used internally to resolve inherits, but it was dropped before reaching Role or the wire. Callers were left hardcoding a role's UUID instead of referencing it by a stable name the way they reference their own roles internally.
Changes
RoleInfoproto message gainsstring key = 3.Rolegainspub key: String;resolve_rolesnow carriesRoleDef::keyonto it.list_roles()setskeyon the outgoingRoleInfo.- Test fixtures across
glaz-rolesandglaz-engineupdated to constructRolewith akey.
Testing
-
cargo test --workspacepasses -
cargo clippy --workspace --all-targetsis clean -
cargo fmt --all --checkis clean
Author checklist
- Title follows Conventional Commits and breaking changes are flagged
- Docs / comments updated where behaviour changed
- No unrelated changes swept in