2015-10-29 13:09:10 +03:00
|
|
|
/*
|
|
|
|
* Copyright (C) by Roeland Jago Douma <rullzer@owncloud.com>
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
2016-10-25 12:00:07 +03:00
|
|
|
* the Free Software Foundation; either version 2 of the License, or
|
|
|
|
* (at your option) any later version.
|
2015-10-29 13:09:10 +03:00
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful, but
|
|
|
|
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
|
|
|
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
|
|
* for more details.
|
|
|
|
*/
|
|
|
|
|
2016-09-14 16:31:05 +03:00
|
|
|
#include "sharemanager.h"
|
2015-10-29 13:09:10 +03:00
|
|
|
#include "ocssharejob.h"
|
|
|
|
#include "account.h"
|
|
|
|
|
|
|
|
#include <QUrl>
|
2017-04-26 12:38:10 +03:00
|
|
|
#include <QJsonDocument>
|
|
|
|
#include <QJsonObject>
|
|
|
|
#include <QJsonArray>
|
2015-10-29 13:09:10 +03:00
|
|
|
|
|
|
|
namespace OCC {
|
|
|
|
|
2016-09-14 16:31:05 +03:00
|
|
|
Share::Share(AccountPtr account,
|
|
|
|
const QString &id,
|
|
|
|
const QString &path,
|
2015-10-31 15:39:08 +03:00
|
|
|
const ShareType shareType,
|
|
|
|
const Permissions permissions,
|
2015-11-05 00:00:35 +03:00
|
|
|
const QSharedPointer<Sharee> shareWith)
|
2015-10-29 16:27:49 +03:00
|
|
|
: _account(account)
|
2015-10-29 13:09:10 +03:00
|
|
|
, _id(id)
|
|
|
|
, _path(path)
|
|
|
|
, _shareType(shareType)
|
2015-10-31 15:39:08 +03:00
|
|
|
, _permissions(permissions)
|
|
|
|
, _shareWith(shareWith)
|
2015-10-29 13:09:10 +03:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2015-12-08 14:58:56 +03:00
|
|
|
AccountPtr Share::account() const
|
|
|
|
{
|
|
|
|
return _account;
|
|
|
|
}
|
|
|
|
|
2015-10-29 15:48:53 +03:00
|
|
|
QString Share::getId() const
|
2015-10-29 13:09:10 +03:00
|
|
|
{
|
|
|
|
return _id;
|
|
|
|
}
|
|
|
|
|
2015-10-29 23:47:47 +03:00
|
|
|
Share::ShareType Share::getShareType() const
|
2015-10-29 13:09:10 +03:00
|
|
|
{
|
|
|
|
return _shareType;
|
|
|
|
}
|
|
|
|
|
2015-11-05 00:00:35 +03:00
|
|
|
QSharedPointer<Sharee> Share::getShareWith() const
|
|
|
|
{
|
|
|
|
return _shareWith;
|
|
|
|
}
|
|
|
|
|
2015-10-31 15:39:08 +03:00
|
|
|
void Share::setPermissions(Permissions permissions)
|
|
|
|
{
|
2015-11-11 15:28:20 +03:00
|
|
|
OcsShareJob *job = new OcsShareJob(_account);
|
2017-09-20 11:14:48 +03:00
|
|
|
connect(job, &OcsShareJob::shareJobFinished, this, &Share::slotPermissionsSet);
|
|
|
|
connect(job, &OcsJob::ocsError, this, &Share::slotOcsError);
|
2015-10-31 15:39:08 +03:00
|
|
|
job->setPermissions(getId(), permissions);
|
|
|
|
}
|
|
|
|
|
2017-04-26 12:38:10 +03:00
|
|
|
void Share::slotPermissionsSet(const QJsonDocument &, const QVariant &value)
|
2015-10-31 15:39:08 +03:00
|
|
|
{
|
|
|
|
_permissions = (Permissions)value.toInt();
|
|
|
|
emit permissionsSet();
|
|
|
|
}
|
|
|
|
|
2015-10-29 23:47:47 +03:00
|
|
|
Share::Permissions Share::getPermissions() const
|
2015-10-29 13:09:10 +03:00
|
|
|
{
|
|
|
|
return _permissions;
|
|
|
|
}
|
|
|
|
|
|
|
|
void Share::deleteShare()
|
|
|
|
{
|
2015-11-11 15:28:20 +03:00
|
|
|
OcsShareJob *job = new OcsShareJob(_account);
|
2017-09-20 11:14:48 +03:00
|
|
|
connect(job, &OcsShareJob::shareJobFinished, this, &Share::slotDeleted);
|
|
|
|
connect(job, &OcsJob::ocsError, this, &Share::slotOcsError);
|
2015-10-29 13:09:10 +03:00
|
|
|
job->deleteShare(getId());
|
|
|
|
}
|
|
|
|
|
2015-10-29 18:56:23 +03:00
|
|
|
void Share::slotDeleted()
|
2015-10-29 13:09:10 +03:00
|
|
|
{
|
|
|
|
emit shareDeleted();
|
|
|
|
}
|
|
|
|
|
2015-10-29 18:56:23 +03:00
|
|
|
void Share::slotOcsError(int statusCode, const QString &message)
|
|
|
|
{
|
2016-09-14 16:31:05 +03:00
|
|
|
emit serverError(statusCode, message);
|
2015-10-29 18:56:23 +03:00
|
|
|
}
|
|
|
|
|
2015-10-29 15:48:53 +03:00
|
|
|
QUrl LinkShare::getLink() const
|
2015-10-29 13:09:10 +03:00
|
|
|
{
|
|
|
|
return _url;
|
|
|
|
}
|
|
|
|
|
2017-05-02 13:58:01 +03:00
|
|
|
QUrl LinkShare::getDirectDownloadLink() const
|
|
|
|
{
|
|
|
|
QUrl url = _url;
|
|
|
|
url.setPath(url.path() + "/download");
|
|
|
|
return url;
|
|
|
|
}
|
|
|
|
|
2015-10-29 15:48:53 +03:00
|
|
|
QDate LinkShare::getExpireDate() const
|
2015-10-29 13:09:10 +03:00
|
|
|
{
|
|
|
|
return _expireDate;
|
|
|
|
}
|
|
|
|
|
2015-10-29 15:48:53 +03:00
|
|
|
bool LinkShare::isPasswordSet() const
|
2015-10-29 13:09:10 +03:00
|
|
|
{
|
|
|
|
return _passwordSet;
|
|
|
|
}
|
|
|
|
|
|
|
|
LinkShare::LinkShare(AccountPtr account,
|
|
|
|
const QString &id,
|
|
|
|
const QString &path,
|
2017-04-12 12:09:20 +03:00
|
|
|
const QString &name,
|
|
|
|
const QString &token,
|
2015-10-29 23:47:47 +03:00
|
|
|
Permissions permissions,
|
2015-10-29 13:09:10 +03:00
|
|
|
bool passwordSet,
|
|
|
|
const QUrl &url,
|
2015-10-29 16:27:49 +03:00
|
|
|
const QDate &expireDate)
|
2015-10-29 23:47:47 +03:00
|
|
|
: Share(account, id, path, Share::TypeLink, permissions)
|
2017-04-05 10:38:46 +03:00
|
|
|
, _name(name)
|
2017-04-12 12:09:20 +03:00
|
|
|
, _token(token)
|
2015-10-29 13:09:10 +03:00
|
|
|
, _passwordSet(passwordSet)
|
|
|
|
, _expireDate(expireDate)
|
|
|
|
, _url(url)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2017-06-15 16:38:22 +03:00
|
|
|
bool LinkShare::getPublicUpload() const
|
2015-10-29 13:47:14 +03:00
|
|
|
{
|
2017-06-15 16:38:22 +03:00
|
|
|
return _permissions & SharePermissionCreate;
|
2015-10-29 13:47:14 +03:00
|
|
|
}
|
|
|
|
|
2017-06-15 16:38:22 +03:00
|
|
|
bool LinkShare::getShowFileListing() const
|
2015-10-29 13:09:10 +03:00
|
|
|
{
|
2017-06-15 16:38:22 +03:00
|
|
|
return _permissions & SharePermissionRead;
|
2015-10-29 13:09:10 +03:00
|
|
|
}
|
|
|
|
|
2017-04-05 10:38:46 +03:00
|
|
|
QString LinkShare::getName() const
|
|
|
|
{
|
|
|
|
return _name;
|
|
|
|
}
|
|
|
|
|
2017-04-12 12:09:20 +03:00
|
|
|
void LinkShare::setName(const QString &name)
|
|
|
|
{
|
|
|
|
OcsShareJob *job = new OcsShareJob(_account);
|
2017-09-20 11:14:48 +03:00
|
|
|
connect(job, &OcsShareJob::shareJobFinished, this, &LinkShare::slotNameSet);
|
|
|
|
connect(job, &OcsJob::ocsError, this, &LinkShare::slotOcsError);
|
2017-04-12 12:09:20 +03:00
|
|
|
job->setName(getId(), name);
|
|
|
|
}
|
|
|
|
|
|
|
|
QString LinkShare::getToken() const
|
|
|
|
{
|
|
|
|
return _token;
|
|
|
|
}
|
|
|
|
|
2015-10-29 13:09:10 +03:00
|
|
|
void LinkShare::setPassword(const QString &password)
|
|
|
|
{
|
2015-11-11 15:28:20 +03:00
|
|
|
OcsShareJob *job = new OcsShareJob(_account);
|
2017-09-20 11:14:48 +03:00
|
|
|
connect(job, &OcsShareJob::shareJobFinished, this, &LinkShare::slotPasswordSet);
|
|
|
|
connect(job, &OcsJob::ocsError, this, &LinkShare::slotSetPasswordError);
|
2015-10-29 13:09:10 +03:00
|
|
|
job->setPassword(getId(), password);
|
|
|
|
}
|
|
|
|
|
2017-04-26 12:38:10 +03:00
|
|
|
void LinkShare::slotPasswordSet(const QJsonDocument &, const QVariant &value)
|
2015-10-29 13:09:10 +03:00
|
|
|
{
|
|
|
|
_passwordSet = value.toString() == "";
|
|
|
|
emit passwordSet();
|
|
|
|
}
|
|
|
|
|
|
|
|
void LinkShare::setExpireDate(const QDate &date)
|
|
|
|
{
|
2015-11-11 15:28:20 +03:00
|
|
|
OcsShareJob *job = new OcsShareJob(_account);
|
2017-09-20 11:14:48 +03:00
|
|
|
connect(job, &OcsShareJob::shareJobFinished, this, &LinkShare::slotExpireDateSet);
|
|
|
|
connect(job, &OcsJob::ocsError, this, &LinkShare::slotOcsError);
|
2015-10-29 13:09:10 +03:00
|
|
|
job->setExpireDate(getId(), date);
|
|
|
|
}
|
|
|
|
|
2017-04-26 12:38:10 +03:00
|
|
|
void LinkShare::slotExpireDateSet(const QJsonDocument &reply, const QVariant &value)
|
2015-10-29 13:09:10 +03:00
|
|
|
{
|
2017-04-26 12:38:10 +03:00
|
|
|
auto data = reply.object().value("ocs").toObject().value("data").toObject();
|
2016-04-19 12:22:32 +03:00
|
|
|
|
|
|
|
/*
|
|
|
|
* If the reply provides a data back (more REST style)
|
|
|
|
* they use this date.
|
|
|
|
*/
|
2017-04-26 12:38:10 +03:00
|
|
|
if (data.value("expiration").isString()) {
|
2016-04-19 12:22:32 +03:00
|
|
|
_expireDate = QDate::fromString(data.value("expiration").toString(), "yyyy-MM-dd 00:00:00");
|
|
|
|
} else {
|
|
|
|
_expireDate = value.toDate();
|
|
|
|
}
|
2015-10-29 13:09:10 +03:00
|
|
|
emit expireDateSet();
|
|
|
|
}
|
|
|
|
|
2016-01-22 13:56:05 +03:00
|
|
|
void LinkShare::slotSetPasswordError(int statusCode, const QString &message)
|
|
|
|
{
|
|
|
|
emit passwordSetError(statusCode, message);
|
|
|
|
}
|
|
|
|
|
2017-04-26 12:38:10 +03:00
|
|
|
void LinkShare::slotNameSet(const QJsonDocument &, const QVariant &value)
|
2017-04-12 12:09:20 +03:00
|
|
|
{
|
|
|
|
_name = value.toString();
|
|
|
|
emit nameSet();
|
|
|
|
}
|
|
|
|
|
2015-10-29 13:09:10 +03:00
|
|
|
ShareManager::ShareManager(AccountPtr account, QObject *parent)
|
|
|
|
: QObject(parent)
|
|
|
|
, _account(account)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
void ShareManager::createLinkShare(const QString &path,
|
2017-04-05 10:38:46 +03:00
|
|
|
const QString &name,
|
2015-10-29 13:09:10 +03:00
|
|
|
const QString &password)
|
|
|
|
{
|
2015-11-11 15:28:20 +03:00
|
|
|
OcsShareJob *job = new OcsShareJob(_account);
|
2017-09-20 11:14:48 +03:00
|
|
|
connect(job, &OcsShareJob::shareJobFinished, this, &ShareManager::slotLinkShareCreated);
|
|
|
|
connect(job, &OcsJob::ocsError, this, &ShareManager::slotOcsError);
|
2017-04-05 10:38:46 +03:00
|
|
|
job->createLinkShare(path, name, password);
|
2015-10-29 13:09:10 +03:00
|
|
|
}
|
|
|
|
|
2017-04-26 12:38:10 +03:00
|
|
|
void ShareManager::slotLinkShareCreated(const QJsonDocument &reply)
|
2015-10-29 13:09:10 +03:00
|
|
|
{
|
|
|
|
QString message;
|
|
|
|
int code = OcsShareJob::getJsonReturnCode(reply, message);
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Before we had decent sharing capabilities on the server a 403 "generally"
|
2015-10-29 15:39:29 +03:00
|
|
|
* meant that a share was password protected
|
2015-10-29 13:09:10 +03:00
|
|
|
*/
|
|
|
|
if (code == 403) {
|
2016-01-19 16:03:13 +03:00
|
|
|
emit linkShareRequiresPassword(message);
|
2015-10-29 15:31:36 +03:00
|
|
|
return;
|
2016-09-14 16:31:05 +03:00
|
|
|
}
|
2015-10-29 13:09:10 +03:00
|
|
|
|
|
|
|
//Parse share
|
2017-04-26 12:38:10 +03:00
|
|
|
auto data = reply.object().value("ocs").toObject().value("data").toObject();
|
2015-10-29 13:09:10 +03:00
|
|
|
QSharedPointer<LinkShare> share(parseLinkShare(data));
|
|
|
|
|
|
|
|
emit linkShareCreated(share);
|
|
|
|
}
|
|
|
|
|
2016-01-21 16:10:37 +03:00
|
|
|
|
2015-10-31 15:39:08 +03:00
|
|
|
void ShareManager::createShare(const QString &path,
|
|
|
|
const Share::ShareType shareType,
|
|
|
|
const QString shareWith,
|
|
|
|
const Share::Permissions permissions)
|
|
|
|
{
|
2016-01-21 16:10:37 +03:00
|
|
|
auto job = new OcsShareJob(_account);
|
2017-09-20 11:14:48 +03:00
|
|
|
connect(job, &OcsJob::ocsError, this, &ShareManager::slotOcsError);
|
2017-10-17 18:29:48 +03:00
|
|
|
connect(job, &OcsShareJob::shareJobFinished, this,
|
|
|
|
[=](const QJsonDocument &reply) {
|
|
|
|
// Find existing share permissions (if this was shared with us)
|
|
|
|
Share::Permissions existingPermissions = SharePermissionDefault;
|
|
|
|
foreach (const QJsonValue &element, reply.object()["ocs"].toObject()["data"].toArray()) {
|
|
|
|
auto map = element.toObject();
|
|
|
|
if (map["file_target"] == path)
|
|
|
|
existingPermissions = Share::Permissions(map["permissions"].toInt());
|
|
|
|
}
|
|
|
|
|
|
|
|
// Limit the permissions we request for a share to the ones the item
|
|
|
|
// was shared with initially.
|
|
|
|
auto perm = permissions;
|
|
|
|
if (permissions == SharePermissionDefault) {
|
|
|
|
perm = existingPermissions;
|
|
|
|
} else if (existingPermissions != SharePermissionDefault) {
|
|
|
|
perm &= existingPermissions;
|
|
|
|
}
|
|
|
|
|
|
|
|
OcsShareJob *job = new OcsShareJob(_account);
|
|
|
|
connect(job, &OcsShareJob::shareJobFinished, this, &ShareManager::slotShareCreated);
|
|
|
|
connect(job, &OcsJob::ocsError, this, &ShareManager::slotOcsError);
|
|
|
|
job->createShare(path, shareType, shareWith, permissions);
|
|
|
|
});
|
2016-01-21 16:10:37 +03:00
|
|
|
job->getSharedWithMe();
|
|
|
|
}
|
|
|
|
|
2015-10-31 15:39:08 +03:00
|
|
|
|
2017-04-26 12:38:10 +03:00
|
|
|
void ShareManager::slotShareCreated(const QJsonDocument &reply)
|
2015-10-31 15:39:08 +03:00
|
|
|
{
|
|
|
|
//Parse share
|
2017-04-26 12:38:10 +03:00
|
|
|
auto data = reply.object().value("ocs").toObject().value("data").toObject();
|
2015-10-31 15:39:08 +03:00
|
|
|
QSharedPointer<Share> share(parseShare(data));
|
|
|
|
|
|
|
|
emit shareCreated(share);
|
|
|
|
}
|
|
|
|
|
2015-10-29 13:09:10 +03:00
|
|
|
void ShareManager::fetchShares(const QString &path)
|
|
|
|
{
|
2015-11-11 15:28:20 +03:00
|
|
|
OcsShareJob *job = new OcsShareJob(_account);
|
2017-09-20 11:14:48 +03:00
|
|
|
connect(job, &OcsShareJob::shareJobFinished, this, &ShareManager::slotSharesFetched);
|
|
|
|
connect(job, &OcsJob::ocsError, this, &ShareManager::slotOcsError);
|
2015-10-29 13:09:10 +03:00
|
|
|
job->getShares(path);
|
|
|
|
}
|
|
|
|
|
2017-04-26 12:38:10 +03:00
|
|
|
void ShareManager::slotSharesFetched(const QJsonDocument &reply)
|
2015-10-29 13:09:10 +03:00
|
|
|
{
|
2017-04-26 12:38:10 +03:00
|
|
|
auto tmpShares = reply.object().value("ocs").toObject().value("data").toArray();
|
2015-10-29 13:09:10 +03:00
|
|
|
const QString versionString = _account->serverVersion();
|
2017-05-09 15:24:11 +03:00
|
|
|
qCDebug(lcSharing) << versionString << "Fetched" << tmpShares.count() << "shares";
|
2015-10-29 13:09:10 +03:00
|
|
|
|
|
|
|
QList<QSharedPointer<Share>> shares;
|
|
|
|
|
2015-10-29 16:00:28 +03:00
|
|
|
foreach (const auto &share, tmpShares) {
|
2017-04-26 12:38:10 +03:00
|
|
|
auto data = share.toObject();
|
2015-10-29 13:09:10 +03:00
|
|
|
|
|
|
|
auto shareType = data.value("share_type").toInt();
|
|
|
|
|
2015-10-29 16:27:49 +03:00
|
|
|
QSharedPointer<Share> newShare;
|
2015-10-29 13:09:10 +03:00
|
|
|
|
2015-10-29 23:47:47 +03:00
|
|
|
if (shareType == Share::TypeLink) {
|
2015-10-29 13:09:10 +03:00
|
|
|
newShare = parseLinkShare(data);
|
|
|
|
} else {
|
2015-10-31 15:39:08 +03:00
|
|
|
newShare = parseShare(data);
|
2015-10-29 13:09:10 +03:00
|
|
|
}
|
|
|
|
|
2016-09-14 16:31:05 +03:00
|
|
|
shares.append(QSharedPointer<Share>(newShare));
|
2015-10-29 13:09:10 +03:00
|
|
|
}
|
|
|
|
|
2017-05-09 15:24:11 +03:00
|
|
|
qCDebug(lcSharing) << "Sending " << shares.count() << "shares";
|
2015-10-29 13:09:10 +03:00
|
|
|
emit sharesFetched(shares);
|
|
|
|
}
|
|
|
|
|
2017-04-26 12:38:10 +03:00
|
|
|
QSharedPointer<LinkShare> ShareManager::parseLinkShare(const QJsonObject &data)
|
2017-04-12 12:09:20 +03:00
|
|
|
{
|
2015-10-29 13:09:10 +03:00
|
|
|
QUrl url;
|
|
|
|
|
|
|
|
// From ownCloud server 8.2 the url field is always set for public shares
|
|
|
|
if (data.contains("url")) {
|
|
|
|
url = QUrl(data.value("url").toString());
|
2017-03-14 17:57:57 +03:00
|
|
|
} else if (_account->serverVersionInt() >= Account::makeServerVersion(8, 0, 0)) {
|
2015-10-29 13:09:10 +03:00
|
|
|
// From ownCloud server version 8 on, a different share link scheme is used.
|
2017-02-23 16:54:17 +03:00
|
|
|
url = QUrl(Utility::concatUrlPath(_account->url(), QLatin1String("index.php/s/") + data.value("token").toString())).toString();
|
2015-10-29 13:09:10 +03:00
|
|
|
} else {
|
|
|
|
QList<QPair<QString, QString>> queryArgs;
|
|
|
|
queryArgs.append(qMakePair(QString("service"), QString("files")));
|
|
|
|
queryArgs.append(qMakePair(QString("t"), data.value("token").toString()));
|
2016-10-25 13:04:22 +03:00
|
|
|
url = QUrl(Utility::concatUrlPath(_account->url(), QLatin1String("public.php"), queryArgs).toString());
|
2015-10-29 13:09:10 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
QDate expireDate;
|
2017-04-26 12:38:10 +03:00
|
|
|
if (data.value("expiration").isString()) {
|
2015-10-29 13:09:10 +03:00
|
|
|
expireDate = QDate::fromString(data.value("expiration").toString(), "yyyy-MM-dd 00:00:00");
|
|
|
|
}
|
|
|
|
|
2015-10-29 16:27:49 +03:00
|
|
|
return QSharedPointer<LinkShare>(new LinkShare(_account,
|
2017-05-18 13:41:28 +03:00
|
|
|
data.value("id").toVariant().toString(), // "id" used to be an integer, support both
|
2015-10-29 16:27:49 +03:00
|
|
|
data.value("path").toString(),
|
2017-04-12 12:09:20 +03:00
|
|
|
data.value("name").toString(),
|
|
|
|
data.value("token").toString(),
|
2015-10-29 23:47:47 +03:00
|
|
|
(Share::Permissions)data.value("permissions").toInt(),
|
2017-04-26 12:38:10 +03:00
|
|
|
data.value("share_with").isString(), // has password?
|
2015-10-29 16:27:49 +03:00
|
|
|
url,
|
|
|
|
expireDate));
|
2015-10-29 13:09:10 +03:00
|
|
|
}
|
|
|
|
|
2017-04-26 12:38:10 +03:00
|
|
|
QSharedPointer<Share> ShareManager::parseShare(const QJsonObject &data)
|
2015-11-05 00:00:35 +03:00
|
|
|
{
|
|
|
|
QSharedPointer<Sharee> sharee(new Sharee(data.value("share_with").toString(),
|
|
|
|
data.value("share_with_displayname").toString(),
|
|
|
|
(Sharee::Type)data.value("share_type").toInt()));
|
2016-09-14 16:31:05 +03:00
|
|
|
|
2015-10-31 15:39:08 +03:00
|
|
|
return QSharedPointer<Share>(new Share(_account,
|
2017-05-18 13:41:28 +03:00
|
|
|
data.value("id").toVariant().toString(), // "id" used to be an integer, support both
|
2015-10-31 15:39:08 +03:00
|
|
|
data.value("path").toString(),
|
|
|
|
(Share::ShareType)data.value("share_type").toInt(),
|
|
|
|
(Share::Permissions)data.value("permissions").toInt(),
|
2015-11-05 00:00:35 +03:00
|
|
|
sharee));
|
2015-10-31 15:39:08 +03:00
|
|
|
}
|
|
|
|
|
2015-10-29 18:56:23 +03:00
|
|
|
void ShareManager::slotOcsError(int statusCode, const QString &message)
|
|
|
|
{
|
2016-01-21 16:10:37 +03:00
|
|
|
emit serverError(statusCode, message);
|
2015-10-29 18:56:23 +03:00
|
|
|
}
|
2015-10-29 13:09:10 +03:00
|
|
|
}
|