OperServ: OPER — runtime operator management

OPER ADD <account> <priv[,priv]> / DEL <account> / LIST grants or revokes
services-operator privileges (auspex, suspend, admin) at runtime, without
editing config and restarting. Runtime grants are event-sourced (Global,
so they federate and survive restart) and UNIONED with the declarative
[[oper]] config at the engine, so either source makes an account an
operator; a config oper can't be revoked here. Admin-only.

Factored the privilege-name parsing into Privs::from_names (+ names/union)
so config loading and runtime grants share one definition.
This commit is contained in:
Jean Chevronnet 2026-07-14 01:33:30 +00:00
parent e45eab2cd6
commit a67409e0d3
No known key found for this signature in database
7 changed files with 217 additions and 17 deletions

View file

@ -172,7 +172,9 @@ fn to_wire(entry: &LogEntry) -> Option<ReplicationEvent> {
| Event::AccountOperNoteSet { .. }
| Event::ChannelOperNoteSet { .. }
| Event::NewsAdded { .. }
| Event::NewsDeleted { .. } => return None,
| Event::NewsDeleted { .. }
| Event::OperGranted { .. }
| Event::OperRevoked { .. } => return None,
};
Some(ReplicationEvent { origin: entry.origin().to_string(), seq: entry.seq(), lamport: entry.lamport(), kind: Some(kind) })
}