Repository navigation
v1.42.4
Report mail for a read-only token, broken by v1.42.2 (#109, @metehan25).
Fixed
- A read-only token could no longer mail a report, and the only way back was a token with every write right. v1.42.2 counted
save_to_fileandemail_toofreport_generateas writes (a read-only token could otherwise write files and send mail); that was meant against tokens that should not deliver reports, not against the ones that are there to do it. A token now has two switches of its own, in the admin portal under Tokens and inconfig.toml, independent of its read-only setting:allow_report(defaulttrue):report_generateat all. The report reads with the token's own read rights, as before; turned off, the token cannot generate reports.allow_report_email(defaultfalse):email_to, to[reporting.email].allowed_recipientsonly (checked on every send, as before), sent without a confirmation. It gives no other write: a read-only token stays read-only for every other tool, andsave_to_filestill needs a token that may write.
Both are checked server-side on every call. A token that may write delivers as before.
- Report generation, report mail and refused deliveries are written to the audit log (
report.generated,report.emailed,report.refused,report.email_refused: the token, the report type, host group, period, the recipients), never the report itself or a credential. An edit form opened before the update leaves both switches as they are.