mirror of
https://github.com/nextcloud/desktop.git
synced 2024-11-26 23:28:14 +03:00
Share UI: Hide 'can share' if capability missing #4231
This commit is contained in:
parent
1a519ac1fb
commit
cec4b803cf
3 changed files with 14 additions and 0 deletions
|
@ -35,6 +35,11 @@ Share::Share(AccountPtr account,
|
|||
|
||||
}
|
||||
|
||||
AccountPtr Share::account() const
|
||||
{
|
||||
return _account;
|
||||
}
|
||||
|
||||
QString Share::getId() const
|
||||
{
|
||||
return _id;
|
||||
|
|
|
@ -66,6 +66,11 @@ public:
|
|||
const Permissions permissions = PermissionDefault,
|
||||
const QSharedPointer<Sharee> shareWith = QSharedPointer<Sharee>(NULL));
|
||||
|
||||
/**
|
||||
* The account the share is defined on.
|
||||
*/
|
||||
AccountPtr account() const;
|
||||
|
||||
/*
|
||||
* Get the id
|
||||
*/
|
||||
|
|
|
@ -246,6 +246,10 @@ ShareWidget::ShareWidget(QSharedPointer<Share> share,
|
|||
|
||||
_ui->deleteShareButton->setIcon(QIcon::fromTheme(QLatin1String("user-trash"),
|
||||
QIcon(QLatin1String(":/client/resources/delete.png"))));
|
||||
|
||||
if (!share->account()->capabilities().shareResharing()) {
|
||||
_ui->permissionShare->hide();
|
||||
}
|
||||
}
|
||||
|
||||
void ShareWidget::on_deleteShareButton_clicked()
|
||||
|
|
Loading…
Reference in a new issue