If the initiator or the recipient is not the current user,
show the list of sharees without any options to edit it.
Minor change: updates api to v2.
Signed-off-by: Camila San <hello@camila.codes>
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);
}
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);
}
setVerb("GET");
addParam(QString::fromLatin1("path"), path);
+ addParam(QString::fromLatin1("reshares"), QString("true"));
addPassStatusCode(404);
start();
_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();
}