auth: warn on unknown [[oper]] privilege names instead of silently dropping them
All checks were successful
CI / check (push) Successful in 3m53s
All checks were successful
CI / check (push) Successful in 3m53s
This commit is contained in:
parent
cfe05481d6
commit
1fb3615b7e
4 changed files with 76 additions and 14 deletions
|
|
@ -187,6 +187,9 @@ async fn main() -> Result<()> {
|
|||
// Channel for services-initiated actions to reach the uplink (drained by the link loop).
|
||||
let (irc_tx, irc_rx) = tokio::sync::mpsc::unbounded_channel();
|
||||
engine.lock().await.set_irc_out(irc_tx);
|
||||
for (account, name) in cfg.oper_priv_warnings() {
|
||||
tracing::warn!(%account, privilege = %name, valid = %echo_api::Priv::valid_names(), "unknown privilege in [[oper]] — ignored (typo?)");
|
||||
}
|
||||
engine.lock().await.set_opers(cfg.opers());
|
||||
engine.lock().await.set_config_path(path.clone());
|
||||
engine.lock().await.set_sid(cfg.server.sid.clone());
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue