service actor undeletable: domain const, 403, hide delete UI

This commit is contained in:
2026-10-26 03:15:27 +01:00
parent 3861d99e1f
commit 9d0166f5cb
12 changed files with 85 additions and 4 deletions

View File

@@ -12,6 +12,12 @@ pub async fn execute(
target: UserId,
password: &str,
) -> Result<(), DomainError> {
if target.is_service_actor() {
return Err(DomainError::Forbidden(
"the instance service account cannot be deleted".into(),
));
}
let actor_user = deps
.user
.find_by_id(&actor)