summaryrefslogtreecommitdiffstats
path: root/apps/files_sharing
diff options
context:
space:
mode:
Diffstat (limited to 'apps/files_sharing')
-rw-r--r--apps/files_sharing/appinfo/info.xml6
-rw-r--r--apps/files_sharing/appinfo/version1
-rw-r--r--apps/files_sharing/css/sharetabview.css14
-rw-r--r--apps/files_sharing/l10n/cs_CZ.js1
-rw-r--r--apps/files_sharing/l10n/cs_CZ.json1
-rw-r--r--apps/files_sharing/l10n/sq.js69
-rw-r--r--apps/files_sharing/l10n/sq.json69
-rw-r--r--apps/files_sharing/lib/connector/publicauth.php108
-rw-r--r--apps/files_sharing/publicwebdav.php74
9 files changed, 125 insertions, 218 deletions
diff --git a/apps/files_sharing/appinfo/info.xml b/apps/files_sharing/appinfo/info.xml
index 28c64cbb1b4..80925dd3d6b 100644
--- a/apps/files_sharing/appinfo/info.xml
+++ b/apps/files_sharing/appinfo/info.xml
@@ -9,14 +9,16 @@ Turning the feature off removes shared files and folders on the server for all s
</description>
<licence>AGPL</licence>
<author>Michael Gapczynski, Bjoern Schiessle</author>
- <requiremin>4.93</requiremin>
<shipped>true</shipped>
<default_enable/>
+ <version>0.8.0</version>
<types>
<filesystem/>
</types>
+ <dependencies>
+ <owncloud min-version="9.0" />
+ </dependencies>
<public>
<files>public.php</files>
- <webdav>publicwebdav.php</webdav>
</public>
</info>
diff --git a/apps/files_sharing/appinfo/version b/apps/files_sharing/appinfo/version
deleted file mode 100644
index 844f6a91acb..00000000000
--- a/apps/files_sharing/appinfo/version
+++ /dev/null
@@ -1 +0,0 @@
-0.6.3
diff --git a/apps/files_sharing/css/sharetabview.css b/apps/files_sharing/css/sharetabview.css
index 1745eba5846..7597004e684 100644
--- a/apps/files_sharing/css/sharetabview.css
+++ b/apps/files_sharing/css/sharetabview.css
@@ -6,7 +6,6 @@
.shareTabView .shareWithLoading {
padding-left: 10px;
- position: relative;
right: 30px;
top: 2px;
}
@@ -73,9 +72,18 @@
}
.shareTabView .icon-loading-small {
- position: absolute;
display: inline-block;
z-index: 1;
background-color: white;
- padding: 2px;
+ padding: 2px 0;
+}
+
+.shareTabView .shareWithList .icon-loading-small,
+.shareTabView .linkShareView .icon-loading-small {
+ position: absolute;
+}
+
+.shareTabView .linkPass .icon-loading-small {
+ margin-top: 9px;
}
+
diff --git a/apps/files_sharing/l10n/cs_CZ.js b/apps/files_sharing/l10n/cs_CZ.js
index 7c52f1c21ff..daa43cc46e8 100644
--- a/apps/files_sharing/l10n/cs_CZ.js
+++ b/apps/files_sharing/l10n/cs_CZ.js
@@ -52,6 +52,7 @@ OC.L10N.register(
"Shared by %2$s" : "%2$s sdílel(a)",
"Shared via public link" : "Sdíleno jako veřejný odkaz",
"Shares" : "Sdílení",
+ "You received %2$s as a remote share from %1$s" : "Obdrželi jste %2$s jako vzdálené sdílení od %1$s",
"Accept" : "Přijmout",
"Decline" : "Zamítnout",
"Share with me through my #ownCloud Federated Cloud ID, see %s" : "Sdílej se mnou pomocí mého #ownCloud sdruženého cloud ID, více na %s",
diff --git a/apps/files_sharing/l10n/cs_CZ.json b/apps/files_sharing/l10n/cs_CZ.json
index 0e139f7bbf5..f1bd6fa4934 100644
--- a/apps/files_sharing/l10n/cs_CZ.json
+++ b/apps/files_sharing/l10n/cs_CZ.json
@@ -50,6 +50,7 @@
"Shared by %2$s" : "%2$s sdílel(a)",
"Shared via public link" : "Sdíleno jako veřejný odkaz",
"Shares" : "Sdílení",
+ "You received %2$s as a remote share from %1$s" : "Obdrželi jste %2$s jako vzdálené sdílení od %1$s",
"Accept" : "Přijmout",
"Decline" : "Zamítnout",
"Share with me through my #ownCloud Federated Cloud ID, see %s" : "Sdílej se mnou pomocí mého #ownCloud sdruženého cloud ID, více na %s",
diff --git a/apps/files_sharing/l10n/sq.js b/apps/files_sharing/l10n/sq.js
index ca2a67f1c9b..30af1cece5d 100644
--- a/apps/files_sharing/l10n/sq.js
+++ b/apps/files_sharing/l10n/sq.js
@@ -1,27 +1,66 @@
OC.L10N.register(
"files_sharing",
{
- "Cancel" : "Anullo",
+ "Server to server sharing is not enabled on this server" : "Ndarja me shërbyesish nuk është e aktivizuar në këtë shërbyes.",
+ "The mountpoint name contains invalid characters." : "Emri i pikës së montimit përmban shenja të pavlefshme.",
+ "Invalid or untrusted SSL certificate" : "Dëshmi SSL e pavlefshme ose e pabesuar",
+ "Storage not valid" : "Depozitë jo e vlefshme",
+ "Shared with you" : "Ndarë me ju",
+ "Shared with others" : "Ndarë me të tjerët",
+ "Shared by link" : "Ndarë me lidhje",
+ "Nothing shared with you yet" : "Ende pa ndarë gjë me ju",
+ "Nothing shared yet" : "Ende pa ndarë gjë ",
+ "Files and folders you share will show up here" : "Këtu do të shfaqen kartelat dhe dosjet që ndani me të tjerët",
+ "No shared links" : "Pa lidhje ndarjesh",
+ "Cancel" : "Anuloje",
+ "You can upload into this folder" : "Mund të ngarkoni te kjo dosje",
+ "No ownCloud installation (7 or higher) found at {remote}" : "Te {remote} s’u gjet instalim ownCloud (7 ose më sipër)",
+ "Invalid ownCloud url" : "URL ownCloud e pavlefshme",
"Shared by" : "Ndarë nga",
"Sharing" : "Ndarje",
- "A file or folder has been <strong>shared</strong>" : "Një skedar ose dosje është <strong>ndarë</strong>",
- "You shared %1$s with %2$s" : "Ju ndatë %1$s me %2$s",
- "You shared %1$s with group %2$s" : "Ju ndatë %1$s me grupin %2$s",
+ "A file or folder has been <strong>shared</strong>" : "U <strong>nda me të tjerë</strong> një kartelë ose dosje",
+ "A public shared file or folder was <strong>downloaded</strong>" : "<strong>U shkarkua</strong> një kartelë ose dosje e ndarë me të tjerët publikisht",
+ "Public shared folder %1$s was downloaded" : "U shkarkua dosja e ndarë publikisht %1$s",
+ "Public shared file %1$s was downloaded" : "U shkarkua kartela e ndarë publikisht %1$s",
+ "You shared %1$s with %2$s" : "Ndatë %1$s me %2$s",
+ "You shared %1$s with group %2$s" : "Ndatë %1$s me grupin %2$s",
+ "%2$s shared %1$s with %3$s" : "%2$s ndau %1$s me %3$s",
+ "%2$s shared %1$s with group %3$s" : "%2$s ndau %1$s me grupin %3$s",
+ "%2$s shared %1$s via link" : "%2$s ndau %1$s përmes një lidhjeje",
"%2$s shared %1$s with you" : "%2$s ndau %1$s me ju",
- "You shared %1$s via link" : "Ju ndatë %1$s me lidhje",
- "Shares" : "ndarjet",
+ "You shared %1$s via link" : "E ndatë %1$s përmes një lidhjeje",
+ "Downloaded via public link" : "Shkarkuar përmes një lidhjeje publike",
+ "Shared with %2$s" : "U nda me %2$s",
+ "Shared with group %2$s" : "U nda me grupin %2$s ",
+ "Shared with %3$s by %2$s" : "U nda me %3$s nga %2$s",
+ "Shared with group %3$s by %2$s" : "U nda me grupin %3$s nga %2$s",
+ "Shared via link by %2$s" : "U nda përmes një lidhje nga %2$s",
+ "Shared by %2$s" : "U nda nga %2$s",
+ "Shared via public link" : "U nda përmes një lidhje publike",
+ "Shares" : "Ndarje",
+ "You received %2$s as a remote share from %1$s" : "%2$s e morët si një ndarje të largët prej %1$s",
+ "Accept" : "Pranoje",
+ "Decline" : "Hidhe poshtë",
"This share is password-protected" : "Kjo pjesë është e mbrojtur me fjalëkalim",
- "The password is wrong. Try again." : "Kodi është i gabuar. Provojeni përsëri.",
- "Password" : "Kodi",
- "Name" : "Emri",
- "Sorry, this link doesn’t seem to work anymore." : "Ju kërkojmë ndjesë, kjo lidhje duket sikur nuk punon më.",
+ "The password is wrong. Try again." : "Fjalëkalimi është i gabuar. Riprovoni.",
+ "Password" : "Fjalëkalim",
+ "No entries found in this folder" : "S’u gjetën zëra në këtë dosje",
+ "Name" : "Emër",
+ "Sorry, this link doesn’t seem to work anymore." : "Na ndjeni, kjo lidhje duket se nuk funksionon më.",
"Reasons might be:" : "Arsyet mund të jenë:",
- "the item was removed" : "elementi është eliminuar",
+ "the item was removed" : "objekti është hequr",
"the link expired" : "lidhja ka skaduar",
- "sharing is disabled" : "ndarja është çaktivizuar",
- "For more info, please ask the person who sent this link." : "Për më shumë informacione, ju lutem pyesni personin që iu dërgoi këtë lidhje.",
+ "sharing is disabled" : "ndarjet janë çaktivizuar",
+ "For more info, please ask the person who sent this link." : "Për më shumë të dhëna, ju lutemi, pyetni personin që ju dërgoi këtë lidhje.",
+ "Add to your ownCloud" : "Shtojeni te ownCloud-i juaj",
"Download" : "Shkarko",
- "Direct link" : "Lidhje direkte",
- "Open documentation" : "Hapni dokumentimin"
+ "Download %s" : "Shkarko %s",
+ "Direct link" : "Lidhje e drejtpërdrejtë",
+ "Open documentation" : "Hap dokumentimin",
+ "Your Federated Cloud ID:" : "ID-ja juaj Federated Cloud:",
+ "Share it:" : "Ndajeni:",
+ "Add to your website" : "Shtojeni te sajti juaj",
+ "Share with me via ownCloud" : "Ndani me mua përmes ownCloud-it",
+ "HTML Code:" : "Kod HTML:"
},
"nplurals=2; plural=(n != 1);");
diff --git a/apps/files_sharing/l10n/sq.json b/apps/files_sharing/l10n/sq.json
index 8118f9033bd..00af3567c58 100644
--- a/apps/files_sharing/l10n/sq.json
+++ b/apps/files_sharing/l10n/sq.json
@@ -1,25 +1,64 @@
{ "translations": {
- "Cancel" : "Anullo",
+ "Server to server sharing is not enabled on this server" : "Ndarja me shërbyesish nuk është e aktivizuar në këtë shërbyes.",
+ "The mountpoint name contains invalid characters." : "Emri i pikës së montimit përmban shenja të pavlefshme.",
+ "Invalid or untrusted SSL certificate" : "Dëshmi SSL e pavlefshme ose e pabesuar",
+ "Storage not valid" : "Depozitë jo e vlefshme",
+ "Shared with you" : "Ndarë me ju",
+ "Shared with others" : "Ndarë me të tjerët",
+ "Shared by link" : "Ndarë me lidhje",
+ "Nothing shared with you yet" : "Ende pa ndarë gjë me ju",
+ "Nothing shared yet" : "Ende pa ndarë gjë ",
+ "Files and folders you share will show up here" : "Këtu do të shfaqen kartelat dhe dosjet që ndani me të tjerët",
+ "No shared links" : "Pa lidhje ndarjesh",
+ "Cancel" : "Anuloje",
+ "You can upload into this folder" : "Mund të ngarkoni te kjo dosje",
+ "No ownCloud installation (7 or higher) found at {remote}" : "Te {remote} s’u gjet instalim ownCloud (7 ose më sipër)",
+ "Invalid ownCloud url" : "URL ownCloud e pavlefshme",
"Shared by" : "Ndarë nga",
"Sharing" : "Ndarje",
- "A file or folder has been <strong>shared</strong>" : "Një skedar ose dosje është <strong>ndarë</strong>",
- "You shared %1$s with %2$s" : "Ju ndatë %1$s me %2$s",
- "You shared %1$s with group %2$s" : "Ju ndatë %1$s me grupin %2$s",
+ "A file or folder has been <strong>shared</strong>" : "U <strong>nda me të tjerë</strong> një kartelë ose dosje",
+ "A public shared file or folder was <strong>downloaded</strong>" : "<strong>U shkarkua</strong> një kartelë ose dosje e ndarë me të tjerët publikisht",
+ "Public shared folder %1$s was downloaded" : "U shkarkua dosja e ndarë publikisht %1$s",
+ "Public shared file %1$s was downloaded" : "U shkarkua kartela e ndarë publikisht %1$s",
+ "You shared %1$s with %2$s" : "Ndatë %1$s me %2$s",
+ "You shared %1$s with group %2$s" : "Ndatë %1$s me grupin %2$s",
+ "%2$s shared %1$s with %3$s" : "%2$s ndau %1$s me %3$s",
+ "%2$s shared %1$s with group %3$s" : "%2$s ndau %1$s me grupin %3$s",
+ "%2$s shared %1$s via link" : "%2$s ndau %1$s përmes një lidhjeje",
"%2$s shared %1$s with you" : "%2$s ndau %1$s me ju",
- "You shared %1$s via link" : "Ju ndatë %1$s me lidhje",
- "Shares" : "ndarjet",
+ "You shared %1$s via link" : "E ndatë %1$s përmes një lidhjeje",
+ "Downloaded via public link" : "Shkarkuar përmes një lidhjeje publike",
+ "Shared with %2$s" : "U nda me %2$s",
+ "Shared with group %2$s" : "U nda me grupin %2$s ",
+ "Shared with %3$s by %2$s" : "U nda me %3$s nga %2$s",
+ "Shared with group %3$s by %2$s" : "U nda me grupin %3$s nga %2$s",
+ "Shared via link by %2$s" : "U nda përmes një lidhje nga %2$s",
+ "Shared by %2$s" : "U nda nga %2$s",
+ "Shared via public link" : "U nda përmes një lidhje publike",
+ "Shares" : "Ndarje",
+ "You received %2$s as a remote share from %1$s" : "%2$s e morët si një ndarje të largët prej %1$s",
+ "Accept" : "Pranoje",
+ "Decline" : "Hidhe poshtë",
"This share is password-protected" : "Kjo pjesë është e mbrojtur me fjalëkalim",
- "The password is wrong. Try again." : "Kodi është i gabuar. Provojeni përsëri.",
- "Password" : "Kodi",
- "Name" : "Emri",
- "Sorry, this link doesn’t seem to work anymore." : "Ju kërkojmë ndjesë, kjo lidhje duket sikur nuk punon më.",
+ "The password is wrong. Try again." : "Fjalëkalimi është i gabuar. Riprovoni.",
+ "Password" : "Fjalëkalim",
+ "No entries found in this folder" : "S’u gjetën zëra në këtë dosje",
+ "Name" : "Emër",
+ "Sorry, this link doesn’t seem to work anymore." : "Na ndjeni, kjo lidhje duket se nuk funksionon më.",
"Reasons might be:" : "Arsyet mund të jenë:",
- "the item was removed" : "elementi është eliminuar",
+ "the item was removed" : "objekti është hequr",
"the link expired" : "lidhja ka skaduar",
- "sharing is disabled" : "ndarja është çaktivizuar",
- "For more info, please ask the person who sent this link." : "Për më shumë informacione, ju lutem pyesni personin që iu dërgoi këtë lidhje.",
+ "sharing is disabled" : "ndarjet janë çaktivizuar",
+ "For more info, please ask the person who sent this link." : "Për më shumë të dhëna, ju lutemi, pyetni personin që ju dërgoi këtë lidhje.",
+ "Add to your ownCloud" : "Shtojeni te ownCloud-i juaj",
"Download" : "Shkarko",
- "Direct link" : "Lidhje direkte",
- "Open documentation" : "Hapni dokumentimin"
+ "Download %s" : "Shkarko %s",
+ "Direct link" : "Lidhje e drejtpërdrejtë",
+ "Open documentation" : "Hap dokumentimin",
+ "Your Federated Cloud ID:" : "ID-ja juaj Federated Cloud:",
+ "Share it:" : "Ndajeni:",
+ "Add to your website" : "Shtojeni te sajti juaj",
+ "Share with me via ownCloud" : "Ndani me mua përmes ownCloud-it",
+ "HTML Code:" : "Kod HTML:"
},"pluralForm" :"nplurals=2; plural=(n != 1);"
} \ No newline at end of file
diff --git a/apps/files_sharing/lib/connector/publicauth.php b/apps/files_sharing/lib/connector/publicauth.php
deleted file mode 100644
index 4ac355180fc..00000000000
--- a/apps/files_sharing/lib/connector/publicauth.php
+++ /dev/null
@@ -1,108 +0,0 @@
-<?php
-/**
- * @author Björn Schießle <schiessle@owncloud.com>
- * @author Lukas Reschke <lukas@owncloud.com>
- * @author Morris Jobke <hey@morrisjobke.de>
- * @author Robin Appelman <icewind@owncloud.com>
- * @author Thomas Müller <thomas.mueller@tmit.eu>
- * @author Vincent Petry <pvince81@owncloud.com>
- *
- * @copyright Copyright (c) 2015, ownCloud, Inc.
- * @license AGPL-3.0
- *
- * This code is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License, version 3,
- * as published by the Free Software Foundation.
- *
- * 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 Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License, version 3,
- * along with this program. If not, see <http://www.gnu.org/licenses/>
- *
- */
-
-namespace OCA\Files_Sharing\Connector;
-
-class PublicAuth extends \Sabre\DAV\Auth\Backend\AbstractBasic {
-
- /**
- * @var \OCP\IConfig
- */
- private $config;
-
- private $share;
-
- /**
- * @param \OCP\IConfig $config
- */
- public function __construct($config) {
- $this->config = $config;
- }
-
- /**
- * Validates a username and password
- *
- * This method should return true or false depending on if login
- * succeeded.
- *
- * @param string $username
- * @param string $password
- *
- * @return bool
- */
- protected function validateUserPass($username, $password) {
- $linkItem = \OCP\Share::getShareByToken($username, false);
- \OC_User::setIncognitoMode(true);
- $this->share = $linkItem;
- if (!$linkItem) {
- return false;
- }
-
- // check if the share is password protected
- if (isset($linkItem['share_with'])) {
- if ($linkItem['share_type'] == \OCP\Share::SHARE_TYPE_LINK) {
- // Check Password
- $newHash = '';
- if(\OC::$server->getHasher()->verify($password, $linkItem['share_with'], $newHash)) {
- /**
- * FIXME: Migrate old hashes to new hash format
- * Due to the fact that there is no reasonable functionality to update the password
- * of an existing share no migration is yet performed there.
- * The only possibility is to update the existing share which will result in a new
- * share ID and is a major hack.
- *
- * In the future the migration should be performed once there is a proper method
- * to update the share's password. (for example `$share->updatePassword($password)`
- *
- * @link https://github.com/owncloud/core/issues/10671
- */
- if(!empty($newHash)) {
-
- }
- return true;
- } else if (\OC::$server->getSession()->exists('public_link_authenticated')
- && \OC::$server->getSession()->get('public_link_authenticated') === $linkItem['id']) {
- return true;
- } else {
- return false;
- }
- } else if ($linkItem['share_type'] == \OCP\Share::SHARE_TYPE_REMOTE) {
- return true;
- } else {
- return false;
- }
- } else {
- return true;
- }
- }
-
- /**
- * @return array
- */
- public function getShare() {
- return $this->share;
- }
-}
diff --git a/apps/files_sharing/publicwebdav.php b/apps/files_sharing/publicwebdav.php
deleted file mode 100644
index 7d96c8e8c97..00000000000
--- a/apps/files_sharing/publicwebdav.php
+++ /dev/null
@@ -1,74 +0,0 @@
-<?php
-/**
- * @author Joas Schilling <nickvergessen@owncloud.com>
- * @author Morris Jobke <hey@morrisjobke.de>
- * @author Robin Appelman <icewind@owncloud.com>
- * @author Vincent Petry <pvince81@owncloud.com>
- *
- * @copyright Copyright (c) 2015, ownCloud, Inc.
- * @license AGPL-3.0
- *
- * This code is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License, version 3,
- * as published by the Free Software Foundation.
- *
- * 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 Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License, version 3,
- * along with this program. If not, see <http://www.gnu.org/licenses/>
- *
- */
-
-// load needed apps
-$RUNTIME_APPTYPES = array('filesystem', 'authentication', 'logging');
-
-OC_App::loadApps($RUNTIME_APPTYPES);
-
-OC_Util::obEnd();
-
-// Backends
-$authBackend = new OCA\Files_Sharing\Connector\PublicAuth(\OC::$server->getConfig());
-
-$serverFactory = new \OC\Connector\Sabre\ServerFactory(
- \OC::$server->getConfig(),
- \OC::$server->getLogger(),
- \OC::$server->getDatabaseConnection(),
- \OC::$server->getUserSession(),
- \OC::$server->getMountManager(),
- \OC::$server->getTagManager(),
- \OC::$server->getEventDispatcher()
-);
-
-$requestUri = \OC::$server->getRequest()->getRequestUri();
-
-$server = $serverFactory->createServer($baseuri, $requestUri, $authBackend, function () use ($authBackend) {
- $isAjax = (isset($_SERVER['HTTP_X_REQUESTED_WITH']) && $_SERVER['HTTP_X_REQUESTED_WITH'] === 'XMLHttpRequest');
- if (OCA\Files_Sharing\Helper::isOutgoingServer2serverShareEnabled() === false && !$isAjax) {
- // this is what is thrown when trying to access a non-existing share
- throw new \Sabre\DAV\Exception\NotAuthenticated();
- }
-
- $share = $authBackend->getShare();
- $rootShare = \OCP\Share::resolveReShare($share);
- $owner = $rootShare['uid_owner'];
- $isWritable = $share['permissions'] & (\OCP\Constants::PERMISSION_UPDATE | \OCP\Constants::PERMISSION_CREATE);
- $fileId = $share['file_source'];
-
- if (!$isWritable) {
- \OC\Files\Filesystem::addStorageWrapper('readonly', function ($mountPoint, $storage) {
- return new \OC\Files\Storage\Wrapper\PermissionsMask(array('storage' => $storage, 'mask' => \OCP\Constants::PERMISSION_READ + \OCP\Constants::PERMISSION_SHARE));
- });
- }
-
- OC_Util::setupFS($owner);
- $ownerView = \OC\Files\Filesystem::getView();
- $path = $ownerView->getPath($fileId);
-
- return new \OC\Files\View($ownerView->getAbsolutePath($path));
-});
-
-// And off we go!
-$server->exec();