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:
authorOlivier Goffart <ogoffart@woboq.com>2015-11-19 14:00:53 +0300
committerOlivier Goffart <ogoffart@woboq.com>2015-11-19 14:00:53 +0300
commit575fc9acbdfb90c493d0568f354224d1af6fac25 (patch)
tree59312727e6f49aa3b9f3f4d45b350fb237000134 /src/gui/sharedialog.cpp
parentd58155013041fa58336753f80a82e9296153299d (diff)
ShareDialog: show an error if the sharing API is disabled (#4126)
Diffstat (limited to 'src/gui/sharedialog.cpp')
-rw-r--r--src/gui/sharedialog.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/gui/sharedialog.cpp b/src/gui/sharedialog.cpp
index a433d2dec..d5963fcf9 100644
--- a/src/gui/sharedialog.cpp
+++ b/src/gui/sharedialog.cpp
@@ -76,6 +76,11 @@ ShareDialog::ShareDialog(AccountPtr account, const QString &sharePath, const QSt
this->setWindowTitle(tr("%1 Sharing").arg(Theme::instance()->appNameGUI()));
+ if (!account->capabilities().shareAPI()) {
+ _ui->shareWidgetsLayout->addWidget(new QLabel(tr("The server does not allow sharing")));
+ return;
+ }
+
bool autoShare = true;
// We only do user/group sharing from 8.2.0
@@ -120,7 +125,9 @@ void ShareDialog::getShares()
job->start();
}
- _linkWidget->getShares();
+ if (_linkWidget) {
+ _linkWidget->getShares();
+ }
if (_userGroupWidget != NULL) {
_userGroupWidget->getShares();
}