service actor undeletable: domain const, 403, hide delete UI
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user