Fix Registry: Changing the type of an existing account from user to group panics
This commit is contained in:
@@ -15,6 +15,7 @@ If you are upgrading from v0.16.x, replace the binary (or run `docker pull`). If
|
|||||||
- OIDC: `ECDSA` private key support for `SEC1` format.
|
- OIDC: `ECDSA` private key support for `SEC1` format.
|
||||||
- PostgreSQL: Include error chain in error messages.
|
- PostgreSQL: Include error chain in error messages.
|
||||||
- Prometheus: event counters are exported with incorrect metric names.
|
- Prometheus: event counters are exported with incorrect metric names.
|
||||||
|
- Registry: Changing the type of an existing account from `user` to `group` panics.
|
||||||
|
|
||||||
## [0.16.11] - 2026-06-25
|
## [0.16.11] - 2026-06-25
|
||||||
|
|
||||||
|
|||||||
@@ -245,7 +245,14 @@ pub(crate) async fn validate_account(
|
|||||||
|
|
||||||
true
|
true
|
||||||
}
|
}
|
||||||
_ => unreachable!(),
|
(Account::User(_), AccountUpdate::Update(Account::Group(_)))
|
||||||
|
| (Account::Group(_), AccountUpdate::Update(Account::User(_))) => {
|
||||||
|
return Ok(Err(SetError::invalid_properties()
|
||||||
|
.with_property(Property::Type)
|
||||||
|
.with_description(
|
||||||
|
"Cannot change the type of an existing account.",
|
||||||
|
)));
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
let mut result = if validate_permissions {
|
let mut result = if validate_permissions {
|
||||||
|
|||||||
Reference in New Issue
Block a user