wsd: never upload using a session that is read-only

Change-Id: Ife0711de46d498e1a9b65c8e0ef7484b37266b32
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
This commit is contained in:
Ashod Nakashian 2023-01-15 18:29:18 -05:00 committed by Ashod Nakashian
parent 5dfbac3e81
commit cca0a561ed

View file

@ -1514,6 +1514,12 @@ void DocumentBroker::uploadToStorageInternal(const std::shared_ptr<ClientSession
LOG_ASSERT_MSG(session, "Must have a valid ClientSession");
const std::string sessionId = session->getId();
if (session->isReadOnly())
{
LOG_WRN("Session [" << sessionId << "] is read-only and cannot upload docKey [" << _docKey
<< ']');
return;
}
LOG_DBG("Uploading to storage docKey [" << _docKey << "] for session [" << sessionId
<< "]. Force: " << force);