[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-2-0' - wsd/ClientSession.cpp
Pranav Kant
pranavk at collabora.co.uk
Mon Dec 19 12:59:43 UTC 2016
wsd/ClientSession.cpp | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
New commits:
commit 3040fe83ca964bcbc03bbe72f1f76035dcb3fd01
Author: Pranav Kant <pranavk at collabora.co.uk>
Date: Tue Dec 13 14:46:34 2016 +0530
wsd: Use EnableOwnerTermination property for ownertermination
We want document owners (sessions with their WOPI UserId =
OwnerId) close the document (for all sessions) only if
EnableOwnerTermination property is specified. Note that
EnableOwnerTermination is an extension to WOPI, and not part of
original WOPI standard.
Change-Id: I7237d172c4c54477572bc132336910250af075a3
(cherry picked from commit 348653a73ceb72a2892530ca79c7db897d33248f)
Reviewed-on: https://gerrit.libreoffice.org/32170
Reviewed-by: Michael Meeks <michael.meeks at collabora.com>
Tested-by: Michael Meeks <michael.meeks at collabora.com>
diff --git a/wsd/ClientSession.cpp b/wsd/ClientSession.cpp
index 202114f..000459b 100644
--- a/wsd/ClientSession.cpp
+++ b/wsd/ClientSession.cpp
@@ -185,8 +185,9 @@ bool ClientSession::_handleInput(const char *buffer, int length)
}
else if (tokens[0] == "closedocument")
{
- // If this session is the owner of the file, let it close all sessions
- if (_isDocumentOwner)
+ // If this session is the owner of the file & 'EnableOwnerTermination' feature
+ // is turned on by WOPI, let it close all sessions
+ if (_isDocumentOwner && _wopiFileInfo && _wopiFileInfo->_enableOwnerTermination)
{
LOG_DBG("Session [" + getId() + "] requested owner termination");
docBroker->closeDocument("ownertermination");
More information about the Libreoffice-commits
mailing list