unotools/source/config/securityoptions.cxx |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

New commits:
commit c0e438eaceb47932e61b9223e048e4eda3ed7636
Author:     Noel Grandin <[email protected]>
AuthorDate: Thu Dec 7 15:11:45 2023 +0200
Commit:     Noel Grandin <[email protected]>
CommitDate: Fri Dec 8 09:47:54 2023 +0100

    tdf#158577 Allow locking down adding new trusted authors
    
    regression from
        commit 6ed8c5a0f19901ab413c6610649326b2475c3a8c
        Author: Noel Grandin <[email protected]>
        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 <[email protected]>
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <[email protected]>

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();

Reply via email to