mirror of
https://github.com/nextcloud/desktop.git
synced 2024-11-23 21:46:03 +03:00
ShareDialog: show an error if the sharing API is disabled (#4126)
This commit is contained in:
parent
d581550130
commit
575fc9acbd
1 changed files with 8 additions and 1 deletions
|
@ -76,6 +76,11 @@ ShareDialog::ShareDialog(AccountPtr account, const QString &sharePath, const QSt
|
||||||
|
|
||||||
this->setWindowTitle(tr("%1 Sharing").arg(Theme::instance()->appNameGUI()));
|
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;
|
bool autoShare = true;
|
||||||
|
|
||||||
// We only do user/group sharing from 8.2.0
|
// We only do user/group sharing from 8.2.0
|
||||||
|
@ -120,7 +125,9 @@ void ShareDialog::getShares()
|
||||||
job->start();
|
job->start();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (_linkWidget) {
|
||||||
_linkWidget->getShares();
|
_linkWidget->getShares();
|
||||||
|
}
|
||||||
if (_userGroupWidget != NULL) {
|
if (_userGroupWidget != NULL) {
|
||||||
_userGroupWidget->getShares();
|
_userGroupWidget->getShares();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue