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@collabora.com>
Tested-by: Jan Holesovsky <kendy@collabora.com>
This commit is contained in:
Jan Holesovsky 2017-06-14 13:51:53 +02:00
parent b833f9c935
commit 4f89ce23b2

View file

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