unotools/source/config/securityoptions.cxx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
New commits: commit 5ab183c0f2757d8f6a4ebe6476b98c924ee06c48 Author: Noel Grandin <noel.gran...@collabora.co.uk> AuthorDate: Thu Dec 7 15:11:45 2023 +0200 Commit: Michael Stahl <michael.st...@allotropia.de> CommitDate: Mon Dec 11 15:25:20 2023 +0100 tdf#158577 Allow locking down adding new trusted authors regression from commit 6ed8c5a0f19901ab413c6610649326b2475c3a8c Author: Noel Grandin <noelgran...@gmail.com> Date: Sun Jul 25 21:35:05 2021 +0200 use officecfg for security options where I forgot to go back and complete a piece that was initially a little tricky. Change-Id: I2df8529ec7047bdcd9d7f655303fd72eeaa50cc6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160429 Reviewed-by: Samuel Mehrbrodt <samuel.mehrbr...@allotropia.de> Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> (cherry picked from commit c0e438eaceb47932e61b9223e048e4eda3ed7636) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160369 Reviewed-by: Michael Stahl <michael.st...@allotropia.de> diff --git a/unotools/source/config/securityoptions.cxx b/unotools/source/config/securityoptions.cxx index 516ba3017999..850bfeb77f9c 100644 --- a/unotools/source/config/securityoptions.cxx +++ b/unotools/source/config/securityoptions.cxx @@ -78,7 +78,9 @@ bool IsReadOnly( EOption eOption ) bReadonly = officecfg::Office::Common::Security::Scripting::MacroSecurityLevel::isReadOnly(); break; case SvtSecurityOptions::EOption::MacroTrustedAuthors: - bReadonly = false; // TODO? officecfg::Office::Common::Security::Scripting::TrustedAuthors::isReadOnly(); + // the officecfg does not expose isReadOnly for a ConfigurationSet, so we have to code this ourself + bReadonly = + comphelper::detail::ConfigurationWrapper::get().isReadOnly("/org.openoffice.Office.Common/Security/Scripting/TrustedAuthors"); break; case SvtSecurityOptions::EOption::CtrlClickHyperlink: bReadonly = officecfg::Office::Common::Security::Scripting::HyperlinksWithCtrlClick::isReadOnly();