diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2023-12-07 15:11:45 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2023-12-08 09:47:54 +0100 |
commit | c0e438eaceb47932e61b9223e048e4eda3ed7636 (patch) | |
tree | ecc0bb9699289fd85a4677c66d89b571e94317fa /unotools/source/config/securityoptions.cxx | |
parent | cb18b12953c8ad9d58af82f779be1046fea77834 (diff) |
tdf#158577 Allow locking down adding new trusted authors
regression from
commit 6ed8c5a0f19901ab413c6610649326b2475c3a8c
Author: Noel Grandin <noelgrandin@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.mehrbrodt@allotropia.de>
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'unotools/source/config/securityoptions.cxx')
-rw-r--r-- | unotools/source/config/securityoptions.cxx | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/unotools/source/config/securityoptions.cxx b/unotools/source/config/securityoptions.cxx index 3197c60797d5..1c2070ab95fc 100644 --- a/unotools/source/config/securityoptions.cxx +++ b/unotools/source/config/securityoptions.cxx @@ -90,7 +90,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(u"/org.openoffice.Office.Common/Security/Scripting/TrustedAuthors"_ustr); break; case SvtSecurityOptions::EOption::CtrlClickHyperlink: bReadonly = officecfg::Office::Common::Security::Scripting::HyperlinksWithCtrlClick::isReadOnly(); |