Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/owncloud/client.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Kamm <mail@ckamm.de>2016-04-14 11:03:15 +0300
committerChristian Kamm <mail@ckamm.de>2016-04-14 11:16:37 +0300
commit8d300b049fad26087e5243c3020131273201e4fa (patch)
tree9cc508c6171fea65a44097dd778227cb21a81115 /src/gui/sharedialog.cpp
parent48e594ebbfc5f3ca2105f7d33ffe5fd0e2225d5e (diff)
ShareDialog: Tell a user early if resharing is impossible #4679
Diffstat (limited to 'src/gui/sharedialog.cpp')
-rw-r--r--src/gui/sharedialog.cpp12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/gui/sharedialog.cpp b/src/gui/sharedialog.cpp
index d677c424d..870499370 100644
--- a/src/gui/sharedialog.cpp
+++ b/src/gui/sharedialog.cpp
@@ -160,6 +160,17 @@ void ShareDialog::showSharingUi()
auto theme = Theme::instance();
+ // There's no difference between being unable to reshare and
+ // being unable to reshare with reshare permission.
+ bool canReshare = _maxSharingPermissions & SharePermissionShare;
+
+ if (!canReshare) {
+ auto label = new QLabel(this);
+ label->setText(tr("The file can not be shared because it was shared without sharing permission."));
+ _ui->shareWidgetsLayout->addWidget(label);
+ return;
+ }
+
// We only do user/group sharing from 8.2.0
bool userGroupSharing =
theme->userGroupSharing()
@@ -167,7 +178,6 @@ void ShareDialog::showSharingUi()
bool autoShare = !userGroupSharing;
-
if (userGroupSharing) {
_userGroupWidget = new ShareUserGroupWidget(_accountState->account(), _sharePath, _localPath, _maxSharingPermissions, this);
_ui->shareWidgetsLayout->addWidget(_userGroupWidget);