summaryrefslogtreecommitdiff
path: root/wsd
diff options
context:
space:
mode:
authorSzymon Kłos <szymon.klos@collabora.com>2018-12-12 11:05:31 +0100
committerAndras Timar <andras.timar@collabora.com>2018-12-15 14:50:30 +0100
commitf6266188822ffc2c300932cdbf2f4681f6cb4321 (patch)
tree4a85fe9bcda5e0bd3c5057b7543acb0fcebfb178 /wsd
parentabfb9c8ffacc6525cb68f7242e36120ad66fc24e (diff)
WOPI: Added HideUserList to CheckFileInfo
Change-Id: Id0f9597d52fb339162a9ce4f622aa39694d1a25e
Diffstat (limited to 'wsd')
-rw-r--r--wsd/DocumentBroker.cpp1
-rw-r--r--wsd/Storage.cpp4
-rw-r--r--wsd/Storage.hpp8
3 files changed, 10 insertions, 3 deletions
diff --git a/wsd/DocumentBroker.cpp b/wsd/DocumentBroker.cpp
index 531cf9e74..2ea017bc2 100644
--- a/wsd/DocumentBroker.cpp
+++ b/wsd/DocumentBroker.cpp
@@ -552,6 +552,7 @@ bool DocumentBroker::load(const std::shared_ptr<ClientSession>& session, const s
wopiInfo->set("UserCanNotWriteRelative", wopifileinfo->getUserCanNotWriteRelative());
wopiInfo->set("EnableInsertRemoteImage", wopifileinfo->getEnableInsertRemoteImage());
wopiInfo->set("EnableShare", wopifileinfo->getEnableShare());
+ wopiInfo->set("HideUserList", wopifileinfo->_hideUserList);
if (wopifileinfo->getHideChangeTrackingControls() != WopiStorage::WOPIFileInfo::TriState::Unset)
wopiInfo->set("HideChangeTrackingControls", wopifileinfo->getHideChangeTrackingControls() == WopiStorage::WOPIFileInfo::TriState::True);
diff --git a/wsd/Storage.cpp b/wsd/Storage.cpp
index 11c658b65..ef5c11d4b 100644
--- a/wsd/Storage.cpp
+++ b/wsd/Storage.cpp
@@ -498,6 +498,7 @@ std::unique_ptr<WopiStorage::WOPIFileInfo> WopiStorage::getWOPIFileInfo(const Au
bool userCanNotWriteRelative = true;
bool enableInsertRemoteImage = false;
bool enableShare = false;
+ bool hideUserList = false;
WOPIFileInfo::TriState disableChangeTrackingRecord = WOPIFileInfo::TriState::Unset;
WOPIFileInfo::TriState disableChangeTrackingShow = WOPIFileInfo::TriState::Unset;
WOPIFileInfo::TriState hideChangeTrackingControls = WOPIFileInfo::TriState::Unset;
@@ -578,6 +579,7 @@ std::unique_ptr<WopiStorage::WOPIFileInfo> WopiStorage::getWOPIFileInfo(const Au
JsonUtil::findJSONValue(object, "UserCanNotWriteRelative", userCanNotWriteRelative);
JsonUtil::findJSONValue(object, "EnableInsertRemoteImage", enableInsertRemoteImage);
JsonUtil::findJSONValue(object, "EnableShare", enableShare);
+ JsonUtil::findJSONValue(object, "HideUserList", hideUserList);
bool booleanFlag = false;
if (JsonUtil::findJSONValue(object, "DisableChangeTrackingRecord", booleanFlag))
disableChangeTrackingRecord = (booleanFlag ? WOPIFileInfo::TriState::True : WOPIFileInfo::TriState::False);
@@ -606,7 +608,7 @@ std::unique_ptr<WopiStorage::WOPIFileInfo> WopiStorage::getWOPIFileInfo(const Au
postMessageOrigin, hidePrintOption, hideSaveOption, hideExportOption,
enableOwnerTermination, disablePrint, disableExport, disableCopy,
disableInactiveMessages, userCanNotWriteRelative, enableInsertRemoteImage, enableShare,
- disableChangeTrackingShow, disableChangeTrackingRecord,
+ hideUserList, disableChangeTrackingShow, disableChangeTrackingRecord,
hideChangeTrackingControls, callDuration}));
}
diff --git a/wsd/Storage.hpp b/wsd/Storage.hpp
index 77a2f675b..2b926eb97 100644
--- a/wsd/Storage.hpp
+++ b/wsd/Storage.hpp
@@ -324,6 +324,7 @@ public:
const bool userCanNotWriteRelative,
const bool enableInsertRemoteImage,
const bool enableShare,
+ const bool hideUserList,
const TriState disableChangeTrackingShow,
const TriState disableChangeTrackingRecord,
const TriState hideChangeTrackingControls,
@@ -345,6 +346,7 @@ public:
_userCanNotWriteRelative(userCanNotWriteRelative),
_enableInsertRemoteImage(enableInsertRemoteImage),
_enableShare(enableShare),
+ _hideUserList(hideUserList),
_disableChangeTrackingShow(disableChangeTrackingShow),
_disableChangeTrackingRecord(disableChangeTrackingRecord),
_hideChangeTrackingControls(hideChangeTrackingControls),
@@ -432,10 +434,12 @@ public:
bool _disableInactiveMessages;
/// If set to false, users can access the save-as functionality
bool _userCanNotWriteRelative;
- /// if set to true, users can access the insert remote image functionality
+ /// If set to true, users can access the insert remote image functionality
bool _enableInsertRemoteImage;
- /// if set to true, users can access the file share functionality
+ /// If set to true, users can access the file share functionality
bool _enableShare;
+ /// If set to true, user list on the status bar will be hidden
+ bool _hideUserList;
/// If we should disable change-tracking visibility by default (meaningful at loading).
TriState _disableChangeTrackingShow;
/// If we should disable change-tracking ability by default (meaningful at loading).