[Libreoffice-commits] online.git: 2 commits - discovery.xml wsd/DocumentBroker.cpp

Jan Holesovsky kendy at collabora.com
Wed Jun 14 12:03:42 UTC 2017


 discovery.xml          |    3 +++
 wsd/DocumentBroker.cpp |    6 ++++++
 2 files changed, 9 insertions(+)

New commits:
commit ca1b3e7ec7d3c806edc36396a5de8e5d49c01467
Author: Jan Holesovsky <kendy at collabora.com>
Date:   Wed Jun 14 13:54:51 2017 +0200

    discovery: Add bmp as read-only type too.
    
    Change-Id: I42f21bab6f8d4ba24580f6d6e4a3a1dd5cd57811
    Reviewed-on: https://gerrit.libreoffice.org/38782
    Reviewed-by: Jan Holesovsky <kendy at collabora.com>
    Tested-by: Jan Holesovsky <kendy at collabora.com>

diff --git a/discovery.xml b/discovery.xml
index cb36c4af..a86b7cab 100644
--- a/discovery.xml
+++ b/discovery.xml
@@ -305,6 +305,9 @@
         <app name="application/vnd.sun.xml.report.chart">
             <action name="edit" ext="odc"/>
         </app>
+        <app name="image/bmp">
+            <action name="view" ext="bmp"/>
+        </app>
         <app name="image/png">
             <action name="view" ext="png"/>
         </app>
commit 4f89ce23b27e60c6e8ffd0df676e693d52a56c05
Author: Jan Holesovsky <kendy at collabora.com>
Date:   Wed Jun 14 13:51:53 2017 +0200

    wsd: Honor the hosting/discovery read-only setting in LocalStorage too.
    
    To make the debugging easier...
    
    Change-Id: I7c6e748e72a595a6c3a5942a20874339b8456f19
    Reviewed-on: https://gerrit.libreoffice.org/38781
    Reviewed-by: Jan Holesovsky <kendy at collabora.com>
    Tested-by: Jan Holesovsky <kendy at collabora.com>

diff --git a/wsd/DocumentBroker.cpp b/wsd/DocumentBroker.cpp
index d2c44b63..844bff78 100644
--- a/wsd/DocumentBroker.cpp
+++ b/wsd/DocumentBroker.cpp
@@ -485,6 +485,12 @@ bool DocumentBroker::load(const std::shared_ptr<ClientSession>& session, const s
             std::unique_ptr<LocalStorage::LocalFileInfo> localfileinfo = localStorage->getLocalFileInfo();
             userid = localfileinfo->_userid;
             username = localfileinfo->_username;
+
+            if (LOOLWSD::IsViewFileExtension(localStorage->getFileExtension()))
+            {
+                LOG_DBG("Setting the session as readonly");
+                session->setReadOnly();
+            }
         }
     }
 


More information about the Libreoffice-commits mailing list