[Pkg-owncloud-commits] [owncloud-client] 89/470: Do not send reshare permissions when creating a federated share
Sandro Knauß
hefee-guest at moszumanska.debian.org
Thu May 12 16:24:48 UTC 2016
This is an automated email from the git hooks/post-receive script.
hefee-guest pushed a commit to branch master
in repository owncloud-client.
commit e4ec09dd874bd84e913d7e22c801b691537d4297
Author: Roeland Jago Douma <rullzer at owncloud.com>
Date: Mon Feb 22 11:44:13 2016 +0100
Do not send reshare permissions when creating a federated share
See https://github.com/owncloud/core/issues/22122#issuecomment-185637344
---
src/gui/shareusergroupwidget.cpp | 26 ++++++++++++++++++++++++--
1 file changed, 24 insertions(+), 2 deletions(-)
diff --git a/src/gui/shareusergroupwidget.cpp b/src/gui/shareusergroupwidget.cpp
index 00d4d73..ea3bbf7 100644
--- a/src/gui/shareusergroupwidget.cpp
+++ b/src/gui/shareusergroupwidget.cpp
@@ -232,8 +232,21 @@ void ShareUserGroupWidget::slotCompleterActivated(const QModelIndex & index)
return;
}
- _manager->createShare(_sharePath, Share::ShareType(sharee->type()),
- sharee->shareWith(), Share::PermissionDefault);
+ /*
+ * Don't send the reshare permissions for federataed shares
+ * https://github.com/owncloud/core/issues/22122#issuecomment-185637344
+ */
+ if (sharee->type() == Sharee::Federated) {
+ int permissions = Share::PermissionRead | Share::PermissionUpdate;
+ if (!_isFile) {
+ permissions |= Share::PermissionCreate | Share::PermissionDelete;
+ }
+ _manager->createShare(_sharePath, Share::ShareType(sharee->type()),
+ sharee->shareWith(), Share::Permission(permissions));
+ } else {
+ _manager->createShare(_sharePath, Share::ShareType(sharee->type()),
+ sharee->shareWith(), Share::PermissionDefault);
+ }
_ui->shareeLineEdit->setEnabled(false);
_ui->shareeLineEdit->setText(QString());
@@ -297,6 +310,15 @@ ShareWidget::ShareWidget(QSharedPointer<Share> share,
connect(_ui->permissionShare, SIGNAL(clicked(bool)), SLOT(slotPermissionsChanged()));
connect(_ui->permissionsEdit, SIGNAL(clicked(bool)), SLOT(slotEditPermissionsChanged()));
+ /*
+ * We don't show permssion share for federated shares
+ * https://github.com/owncloud/core/issues/22122#issuecomment-185637344
+ */
+ if (share->getShareType() == Share::TypeRemote) {
+ _ui->permissionShare->setVisible(false);
+ _ui->permissionToolButton->setVisible(false);
+ }
+
connect(share.data(), SIGNAL(permissionsSet()), SLOT(slotPermissionsSet()));
connect(share.data(), SIGNAL(shareDeleted()), SLOT(slotShareDeleted()));
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud-client.git
More information about the Pkg-owncloud-commits
mailing list