Skip to content

conf: small fixes to (Un)redacting the site config

Administrator requested to merge ao/redacted-site-conf-format into main

Created by: sashaostrikov

During my work on 1-click export I noticed that these slight changes can be made to site config redacting code.

This commit fixes an issue of adding an entry of "auth.providers": null to site config after redacting it in case of initial "auth.provider" absence.

This commit also adds formatting of a site config after (un)redacting it. Previously, if site config being (un)redacted was not pretty-printed before that, it ended up being partially formatted: only the parts of config being edited were formatted because of jsonc.Edit function specific, while the "untouched" parts of config were not formatted.

Test plan

Unit tests changed, new test added.

Merge request reports

Loading