mirror of
https://github.com/nextcloud/desktop.git
synced 2024-10-23 21:05:44 +03:00
Merge pull request #1247 from nextcloud/backport/reshare
Adds parameter to retrieve shares with its reshares.
This commit is contained in:
commit
1dca017537
4 changed files with 12 additions and 2 deletions
|
@ -21,7 +21,7 @@ namespace OCC {
|
|||
OcsShareeJob::OcsShareeJob(AccountPtr account)
|
||||
: OcsJob(account)
|
||||
{
|
||||
setPath("ocs/v1.php/apps/files_sharing/api/v1/sharees");
|
||||
setPath("ocs/v2.php/apps/files_sharing/api/v1/sharees");
|
||||
connect(this, &OcsJob::jobFinished, this, &OcsShareeJob::jobDone);
|
||||
}
|
||||
|
||||
|
|
|
@ -24,7 +24,7 @@ namespace OCC {
|
|||
OcsShareJob::OcsShareJob(AccountPtr account)
|
||||
: OcsJob(account)
|
||||
{
|
||||
setPath("ocs/v1.php/apps/files_sharing/api/v1/shares");
|
||||
setPath("ocs/v2.php/apps/files_sharing/api/v1/shares");
|
||||
connect(this, &OcsJob::jobFinished, this, &OcsShareJob::jobDone);
|
||||
}
|
||||
|
||||
|
@ -33,6 +33,7 @@ void OcsShareJob::getShares(const QString &path)
|
|||
setVerb("GET");
|
||||
|
||||
addParam(QString::fromLatin1("path"), path);
|
||||
addParam(QString::fromLatin1("reshares"), QString("true"));
|
||||
addPassStatusCode(404);
|
||||
|
||||
start();
|
||||
|
|
|
@ -271,6 +271,7 @@ void ShareDialog::showSharingUi()
|
|||
auto label = new QLabel(this);
|
||||
label->setText(tr("The file can not be shared because it was shared without sharing permission."));
|
||||
label->setWordWrap(true);
|
||||
_ui->verticalLayout->insertWidget(1, label);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -202,6 +202,7 @@ void ShareUserGroupWidget::slotSharesFetched(const QList<QSharedPointer<Share>>
|
|||
connect(s, &ShareUserLine::visualDeletionDone, this, &ShareUserGroupWidget::getShares);
|
||||
s->setBackgroundRole(layout->count() % 2 == 0 ? QPalette::Base : QPalette::AlternateBase);
|
||||
layout->addWidget(s);
|
||||
s->setVisible(true);
|
||||
|
||||
x++;
|
||||
if (x <= 3) {
|
||||
|
@ -420,6 +421,13 @@ ShareUserLine::ShareUserLine(QSharedPointer<Share> share,
|
|||
_permissionReshare->setVisible(false);
|
||||
}
|
||||
|
||||
//If the initiator is not you. And the recipient is not you. Show it without any options.
|
||||
if(share->account()->id() != share->getId() && share->account()->davUser() != share->getShareWith()->shareWith()){
|
||||
_ui->permissionsEdit->hide();
|
||||
_ui->permissionToolButton->hide();
|
||||
_ui->deleteShareButton->hide();
|
||||
}
|
||||
|
||||
loadAvatar();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue