mirror of
https://github.com/nextcloud/desktop.git
synced 2025-10-26 11:17:43 +00:00
parent
debd612089
commit
d13b451a4b
@ -1118,10 +1118,7 @@ void ownCloudGui::slotShowShareDialog(const QString &sharePath, const QString &l
|
||||
//
|
||||
// The correct value will be found with a propfind from ShareDialog.
|
||||
// (we want to show the dialog directly, not wait for the propfind first)
|
||||
SharePermissions maxSharingPermissions =
|
||||
SharePermissionRead
|
||||
| SharePermissionUpdate | SharePermissionCreate | SharePermissionDelete
|
||||
| SharePermissionShare;
|
||||
SharePermissions maxSharingPermissions = static_cast<SharePermissions>(accountState->account()->capabilities().defaultPermissions());
|
||||
if (!resharingAllowed) {
|
||||
maxSharingPermissions = SharePermission(0);
|
||||
}
|
||||
|
||||
@ -17,6 +17,13 @@
|
||||
#include <QVariantMap>
|
||||
#include <QDebug>
|
||||
|
||||
namespace {
|
||||
QString FileSharingKey()
|
||||
{
|
||||
return QStringLiteral("files_sharing");
|
||||
}
|
||||
}
|
||||
|
||||
namespace OCC {
|
||||
|
||||
|
||||
@ -85,6 +92,11 @@ bool Capabilities::shareResharing() const
|
||||
return _capabilities["files_sharing"].toMap()["resharing"].toBool();
|
||||
}
|
||||
|
||||
int Capabilities::defaultPermissions() const
|
||||
{
|
||||
return _capabilities.value(FileSharingKey()).toMap().value("default_permissions", 1).toInt();
|
||||
}
|
||||
|
||||
bool Capabilities::notificationsAvailable() const
|
||||
{
|
||||
// We require the OCS style API in 9.x, can't deal with the REST one only found in 8.2
|
||||
|
||||
@ -43,6 +43,10 @@ public:
|
||||
bool sharePublicLinkEnforceExpireDate() const;
|
||||
bool sharePublicLinkMultiple() const;
|
||||
bool shareResharing() const;
|
||||
|
||||
// TODO: return SharePermission
|
||||
int defaultPermissions() const;
|
||||
|
||||
bool chunkingNg() const;
|
||||
QString zsyncSupportedVersion() const;
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user