diff options
-rw-r--r-- | apps/dav/lib/Connector/Sabre/SharesPlugin.php | 3 | ||||
-rw-r--r-- | apps/files_sharing/js/share.js | 13 | ||||
-rw-r--r-- | apps/sharebymail/appinfo/info.xml | 6 | ||||
-rw-r--r-- | lib/private/Share20/ProviderFactory.php | 4 |
4 files changed, 23 insertions, 3 deletions
diff --git a/apps/dav/lib/Connector/Sabre/SharesPlugin.php b/apps/dav/lib/Connector/Sabre/SharesPlugin.php index 33e79364758..4df8c9f85a5 100644 --- a/apps/dav/lib/Connector/Sabre/SharesPlugin.php +++ b/apps/dav/lib/Connector/Sabre/SharesPlugin.php @@ -120,7 +120,8 @@ class SharesPlugin extends \Sabre\DAV\ServerPlugin { \OCP\Share::SHARE_TYPE_USER, \OCP\Share::SHARE_TYPE_GROUP, \OCP\Share::SHARE_TYPE_LINK, - \OCP\Share::SHARE_TYPE_REMOTE + \OCP\Share::SHARE_TYPE_REMOTE, + \OCP\Share::SHARE_TYPE_EMAIL, ]; foreach ($requestedShareTypes as $requestedShareType) { // one of each type is enough to find out about the types diff --git a/apps/files_sharing/js/share.js b/apps/files_sharing/js/share.js index 073cc77e5aa..01c2ccfb863 100644 --- a/apps/files_sharing/js/share.js +++ b/apps/files_sharing/js/share.js @@ -114,6 +114,8 @@ shareType = parseInt(shareType, 10); if (shareType === OC.Share.SHARE_TYPE_LINK) { hasLink = true; + } else if (shareType === OC.Share.SHARE_TYPE_EMAIL) { + hasLink = true; } else if (shareType === OC.Share.SHARE_TYPE_USER) { hasShares = true; } else if (shareType === OC.Share.SHARE_TYPE_GROUP) { @@ -159,8 +161,17 @@ shareTab.on('sharesChanged', function(shareModel) { var fileInfoModel = shareModel.fileInfoModel; var $tr = fileList.findFileEl(fileInfoModel.get('name')); + + // We count email shares as link share + var hasLinkShare = shareModel.hasLinkShare(); + shareModel.get('shares').forEach(function (share) { + if (share.share_type === OC.Share.SHARE_TYPE_EMAIL) { + hasLinkShare = true; + } + }); + OCA.Sharing.Util._updateFileListDataAttributes(fileList, $tr, shareModel); - if (!OCA.Sharing.Util._updateFileActionIcon($tr, shareModel.hasUserShares(), shareModel.hasLinkShare())) { + if (!OCA.Sharing.Util._updateFileActionIcon($tr, shareModel.hasUserShares(), hasLinkShare)) { // remove icon, if applicable OC.Share.markFileAsShared($tr, false, false); } diff --git a/apps/sharebymail/appinfo/info.xml b/apps/sharebymail/appinfo/info.xml index 1b3aa01bc67..56977fcf285 100644 --- a/apps/sharebymail/appinfo/info.xml +++ b/apps/sharebymail/appinfo/info.xml @@ -5,7 +5,7 @@ <description>Share provider which allows you to share files by mail</description> <licence>AGPL</licence> <author>Bjoern Schiessle</author> - <version>1.0.0</version> + <version>1.0.1</version> <namespace>ShareByMail</namespace> <category>other</category> <dependencies> @@ -13,6 +13,10 @@ </dependencies> <default_enable/> + <types> + <filesystem/> + </types> + <activity> <providers> <provider>OCA\ShareByMail\Activity</provider> diff --git a/lib/private/Share20/ProviderFactory.php b/lib/private/Share20/ProviderFactory.php index fe9dc0cdfb2..3f277a852b3 100644 --- a/lib/private/Share20/ProviderFactory.php +++ b/lib/private/Share20/ProviderFactory.php @@ -206,6 +206,10 @@ class ProviderFactory implements IProviderFactory { } public function getAllProviders() { + $shareByMail = $this->getShareByMailProvider(); + if ($shareByMail !== null) { + return [$this->defaultShareProvider(), $this->federatedShareProvider(), $shareByMail]; + } return [$this->defaultShareProvider(), $this->federatedShareProvider()]; } } |