Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/desktop.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCamila <hello@camila.codes>2021-08-24 15:47:36 +0300
committerMatthieu Gallien (Rebase PR Action) <matthieu_gallien@yahoo.fr>2021-09-27 11:53:45 +0300
commit8f847906c690b82f3e05690f23940740c122d158 (patch)
treeaa3cb705a3efd6999c7dd78430acd61f7e1f2bbd /src/gui/owncloudgui.cpp
parentc521ca09498f7fb04f7c6f7b209de8fa259d2547 (diff)
Check server capabilities for file sharing default permissions.
Signed-off-by: Camila <hello@camila.codes>
Diffstat (limited to 'src/gui/owncloudgui.cpp')
-rw-r--r--src/gui/owncloudgui.cpp14
1 files changed, 1 insertions, 13 deletions
diff --git a/src/gui/owncloudgui.cpp b/src/gui/owncloudgui.cpp
index f4aeef11a..3941d9b0f 100644
--- a/src/gui/owncloudgui.cpp
+++ b/src/gui/owncloudgui.cpp
@@ -631,19 +631,7 @@ void ownCloudGui::slotShowShareDialog(const QString &sharePath, const QString &l
}
}
- // As a first approximation, set the set of permissions that can be granted
- // either to everything (resharing allowed) or nothing (no resharing).
- //
- // 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;
- if (!resharingAllowed) {
- maxSharingPermissions = {};
- }
-
+ auto maxSharingPermissions = resharingAllowed? SharePermissions(accountState->account()->capabilities().shareDefaultPermissions()) : SharePermissions({});
ShareDialog *w = nullptr;
if (_shareDialogs.contains(localPath) && _shareDialogs[localPath]) {