On an install from before rc.32, nobody holds sysPasskeyGet/Create/Update/Destroy, not even the default administrator. The default roles were stored as explicit lists at install, and granted_permissions.rs never added the passkey permissions on upgrade. It also had no way to grant anything to the user role. So passkeys can't be listed or added anywhere, and an admin can't fix it by hand ("You are not authorized to grant permissions").
Change
New User audience in granted_permissions.rs: it grants to the default user role and leaves out the group role. The four passkey permissions go to the user, tenant administrator and administrator roles, once, recorded and respecting a role that disables them, as for the other fork permissions.
fork_defaults_reach_upgraded_installs (unit test): fails when DefaultPermissions gives a fork-added permission (SysAiExplain and later, i.e. after the last upstream import) to the user, tenant or administrator role and the upgrade grants don't carry it. grants_match_the_defaults checks the reverse.
passkey_tests gets an upgraded-install case:
strip the permissions from the stored roles, then check a new account is refused;
run the start-up defaults, then check each role has them back, a new account can list its passkeys, and the group role gets none;
remove one again, then check it isn't granted twice.
Checked locally
cargo test -p common --lib manager::: 39 passed.
passkey_tests (RocksDb, its own netns): passed, the new case included.
ai_explain_tests fails at line 87, before its upgrade section: a real model's answer came back instead of the stub's. This change doesn't touch the AI path, but I didn't check whether the same happens on main.
Release note for the next RC: passkeys now work on installs upgraded from before rc.32, with no action needed.
Fixes #478 (forum t/339).
On an install from before rc.32, nobody holds `sysPasskeyGet/Create/Update/Destroy`, not even the default administrator. The default roles were stored as explicit lists at install, and `granted_permissions.rs` never added the passkey permissions on upgrade. It also had no way to grant anything to the user role. So passkeys can't be listed or added anywhere, and an admin can't fix it by hand ("You are not authorized to grant permissions").
**Change**
- New `User` audience in `granted_permissions.rs`: it grants to the default user role and leaves out the group role. The four passkey permissions go to the user, tenant administrator and administrator roles, once, recorded and respecting a role that disables them, as for the other fork permissions.
- `fork_defaults_reach_upgraded_installs` (unit test): fails when `DefaultPermissions` gives a fork-added permission (`SysAiExplain` and later, i.e. after the last upstream import) to the user, tenant or administrator role and the upgrade grants don't carry it. `grants_match_the_defaults` checks the reverse.
- `passkey_tests` gets an upgraded-install case:
- strip the permissions from the stored roles, then check a new account is refused;
- run the start-up defaults, then check each role has them back, a new account can list its passkeys, and the group role gets none;
- remove one again, then check it isn't granted twice.
**Checked locally**
- `cargo test -p common --lib manager::`: 39 passed.
- `passkey_tests` (RocksDb, its own netns): passed, the new case included.
- fork checks (name, notice, context, privacy, expr-schema, unittests), `cargo fmt --check`: clean.
- `ai_explain_tests` fails at line 87, before its upgrade section: a real model's answer came back instead of the stub's. This change doesn't touch the AI path, but I didn't check whether the same happens on main.
Release note for the next RC: passkeys now work on installs upgraded from before rc.32, with no action needed.
jcoffey-dev
added this to the 27.1 milestone 2026-11-19 16:46:50 +00:00
An install from before rc.32 stored its default roles without
sysPasskeyGet/Create/Update/Destroy, and granted_permissions.rs never
added them, so nobody on an upgraded install could list or add a passkey.
An administrator couldn't fix it by hand either: you can't grant a
permission you don't hold.
- Add a User audience that grants to the default user role (not the
group role), and grant the four passkey permissions to the user,
tenant administrator and administrator roles, once, as for the
other fork permissions.
- fork_defaults_reach_upgraded_installs: fails when DefaultPermissions
gives a fork-added permission (SysAiExplain and later) to the user,
tenant or administrator role and the upgrade grants don't carry it.
- passkey_tests: strips the permissions from the stored roles, checks a
new account is refused, runs the start-up defaults, and checks every
role has them back, a new account can list its passkeys, the group
role gets none, and a removed one isn't granted twice.
Fixes#478
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Fixes #478 (forum t/339).
On an install from before rc.32, nobody holds
sysPasskeyGet/Create/Update/Destroy, not even the default administrator. The default roles were stored as explicit lists at install, andgranted_permissions.rsnever added the passkey permissions on upgrade. It also had no way to grant anything to the user role. So passkeys can't be listed or added anywhere, and an admin can't fix it by hand ("You are not authorized to grant permissions").Change
Useraudience ingranted_permissions.rs: it grants to the default user role and leaves out the group role. The four passkey permissions go to the user, tenant administrator and administrator roles, once, recorded and respecting a role that disables them, as for the other fork permissions.fork_defaults_reach_upgraded_installs(unit test): fails whenDefaultPermissionsgives a fork-added permission (SysAiExplainand later, i.e. after the last upstream import) to the user, tenant or administrator role and the upgrade grants don't carry it.grants_match_the_defaultschecks the reverse.passkey_testsgets an upgraded-install case:Checked locally
cargo test -p common --lib manager::: 39 passed.passkey_tests(RocksDb, its own netns): passed, the new case included.cargo fmt --check: clean.ai_explain_testsfails at line 87, before its upgrade section: a real model's answer came back instead of the stub's. This change doesn't touch the AI path, but I didn't check whether the same happens on main.Release note for the next RC: passkeys now work on installs upgraded from before rc.32, with no action needed.