diff options
53 files changed, 663 insertions, 84 deletions
diff --git a/apps/dav/lib/carddav/addressbook.php b/apps/dav/lib/carddav/addressbook.php index ca3f5ba0ef6..be57a2d90a1 100644 --- a/apps/dav/lib/carddav/addressbook.php +++ b/apps/dav/lib/carddav/addressbook.php @@ -161,4 +161,11 @@ class AddressBook extends \Sabre\CardDAV\AddressBook implements IShareable { } parent::delete(); } + + public function getContactsGroups() { + /** @var CardDavBackend $cardDavBackend */ + $cardDavBackend = $this->carddavBackend; + + return $cardDavBackend->collectCardProperties($this->getResourceId(), 'CATEGORIES'); + } } diff --git a/apps/dav/lib/carddav/carddavbackend.php b/apps/dav/lib/carddav/carddavbackend.php index c4f29b39d0d..aa2490ab11a 100644 --- a/apps/dav/lib/carddav/carddavbackend.php +++ b/apps/dav/lib/carddav/carddavbackend.php @@ -29,6 +29,7 @@ use OCP\DB\QueryBuilder\IQueryBuilder; use OCA\DAV\DAV\Sharing\Backend; use OCA\DAV\DAV\Sharing\IShareable; use OCP\IDBConnection; +use PDO; use Sabre\CardDAV\Backend\BackendInterface; use Sabre\CardDAV\Backend\SyncSupport; use Sabre\CardDAV\Plugin; @@ -762,6 +763,25 @@ class CardDavBackend implements BackendInterface, SyncSupport { } /** + * @param int $bookId + * @param string $name + * @return array + */ + public function collectCardProperties($bookId, $name) { + $query = $this->db->getQueryBuilder(); + $result = $query->selectDistinct('value') + ->from($this->dbCardsPropertiesTable) + ->where($query->expr()->eq('name', $query->createNamedParameter($name))) + ->andWhere($query->expr()->eq('addressbookid', $query->createNamedParameter($bookId))) + ->execute(); + + $all = $result->fetchAll(PDO::FETCH_COLUMN); + $result->closeCursor(); + + return $all; + } + + /** * get URI from a given contact * * @param int $id diff --git a/apps/dav/lib/carddav/plugin.php b/apps/dav/lib/carddav/plugin.php index 4acc1037b52..d94dce1db0e 100644 --- a/apps/dav/lib/carddav/plugin.php +++ b/apps/dav/lib/carddav/plugin.php @@ -21,10 +21,19 @@ namespace OCA\DAV\CardDAV; +use OCA\DAV\CardDAV\Xml\Groups; +use Sabre\DAV\INode; +use Sabre\DAV\PropFind; +use Sabre\DAV\Server; use Sabre\HTTP\URLUtil; class Plugin extends \Sabre\CardDAV\Plugin { + function initialize(Server $server) { + $server->on('propFind', [$this, 'propFind']); + parent::initialize($server); + } + /** * Returns the addressbook home for a given principal * @@ -33,15 +42,34 @@ class Plugin extends \Sabre\CardDAV\Plugin { */ protected function getAddressbookHomeForPrincipal($principal) { - if (strrpos($principal, 'principals/users', -strlen($principal)) !== FALSE) { + if (strrpos($principal, 'principals/users', -strlen($principal)) !== false) { list(, $principalId) = URLUtil::splitPath($principal); return self::ADDRESSBOOK_ROOT . '/users/' . $principalId; } - if (strrpos($principal, 'principals/system', -strlen($principal)) !== FALSE) { + if (strrpos($principal, 'principals/system', -strlen($principal)) !== false) { list(, $principalId) = URLUtil::splitPath($principal); return self::ADDRESSBOOK_ROOT . '/system/' . $principalId; } throw new \LogicException('This is not supposed to happen'); } + + /** + * Adds all CardDAV-specific properties + * + * @param PropFind $propFind + * @param INode $node + * @return void + */ + function propFind(PropFind $propFind, INode $node) { + + $ns = '{http://owncloud.org/ns}'; + + if ($node instanceof AddressBook) { + + $propFind->handle($ns . 'groups', function () use ($node) { + return new Groups($node->getContactsGroups()); + }); + } + } } diff --git a/apps/dav/lib/carddav/xml/groups.php b/apps/dav/lib/carddav/xml/groups.php new file mode 100644 index 00000000000..b39615db033 --- /dev/null +++ b/apps/dav/lib/carddav/xml/groups.php @@ -0,0 +1,45 @@ +<?php +/** + * @author Thomas Müller <thomas.mueller@tmit.eu> + * + * @copyright Copyright (c) 2016, 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\DAV\CardDAV\Xml; + +use Sabre\Xml\XmlSerializable; +use Sabre\Xml\Element; +use Sabre\Xml\Writer; + +class Groups implements XmlSerializable { + const NS_OWNCLOUD = 'http://owncloud.org/ns'; + + /** @var string[] of TYPE:CHECKSUM */ + private $groups; + + /** + * @param string $groups + */ + public function __construct($groups) { + $this->groups = $groups; + } + + function xmlSerialize(Writer $writer) { + foreach ($this->groups as $group) { + $writer->writeElement('{' . self::NS_OWNCLOUD . '}group', $group); + } + } +} diff --git a/apps/dav/lib/connector/sabre/objecttree.php b/apps/dav/lib/connector/sabre/objecttree.php index a1796136c4e..505a42d4746 100644 --- a/apps/dav/lib/connector/sabre/objecttree.php +++ b/apps/dav/lib/connector/sabre/objecttree.php @@ -136,7 +136,7 @@ class ObjectTree extends \Sabre\DAV\Tree { $mount = $this->fileView->getMount($path); $storage = $mount->getStorage(); $internalPath = $mount->getInternalPath($absPath); - if ($storage) { + if ($storage && $storage->file_exists($internalPath)) { /** * @var \OC\Files\Storage\Storage $storage */ diff --git a/apps/dav/tests/unit/carddav/carddavbackendtest.php b/apps/dav/tests/unit/carddav/carddavbackendtest.php index 86bc26b4c0d..f7e59b3fda9 100644 --- a/apps/dav/tests/unit/carddav/carddavbackendtest.php +++ b/apps/dav/tests/unit/carddav/carddavbackendtest.php @@ -609,4 +609,21 @@ class CardDavBackendTest extends TestCase { $this->assertEmpty($this->backend->getContact('uri')); } + public function testCollectCardProperties() { + $query = $this->db->getQueryBuilder(); + $query->insert($this->dbCardsPropertiesTable) + ->values( + [ + 'addressbookid' => $query->createNamedParameter(666), + 'cardid' => $query->createNamedParameter(777), + 'name' => $query->createNamedParameter('FN'), + 'value' => $query->createNamedParameter('John Doe'), + 'preferred' => $query->createNamedParameter(0) + ] + ) + ->execute(); + + $result = $this->backend->collectCardProperties(666, 'FN'); + $this->assertEquals(['John Doe'], $result); + } } diff --git a/apps/files_external/l10n/sq.js b/apps/files_external/l10n/sq.js index bab6a24df7f..35f43b52a35 100644 --- a/apps/files_external/l10n/sq.js +++ b/apps/files_external/l10n/sq.js @@ -68,9 +68,9 @@ OC.L10N.register( "Rackspace" : "Rackspace", "API key" : "Kyç API", "Global Credentails" : "Kredenciale Globale", - "Log-in credentials, save in database" : "Kredenciale hyrjesh, ruaje në bazën e të dhënave", + "Log-in credentials, save in database" : "Kredenciale hyrjesh, ruaji në bazën e të dhënave", "Username and password" : "Emër përdoruesi dhe fjalëkalim", - "Log-in credentials, save in session" : "Kredenciale hyrjesh, ruaje në sesion", + "Log-in credentials, save in session" : "Kredenciale hyrjesh, ruaji për sesion", "User entered, store in database" : "Përdoruesi u dha, ruajeni në bazën e të dhënave", "RSA public key" : "Kyç publik RSA ", "Public key" : "Kyç publik", diff --git a/apps/files_external/l10n/sq.json b/apps/files_external/l10n/sq.json index 7c132ddd855..53b91d57c75 100644 --- a/apps/files_external/l10n/sq.json +++ b/apps/files_external/l10n/sq.json @@ -66,9 +66,9 @@ "Rackspace" : "Rackspace", "API key" : "Kyç API", "Global Credentails" : "Kredenciale Globale", - "Log-in credentials, save in database" : "Kredenciale hyrjesh, ruaje në bazën e të dhënave", + "Log-in credentials, save in database" : "Kredenciale hyrjesh, ruaji në bazën e të dhënave", "Username and password" : "Emër përdoruesi dhe fjalëkalim", - "Log-in credentials, save in session" : "Kredenciale hyrjesh, ruaje në sesion", + "Log-in credentials, save in session" : "Kredenciale hyrjesh, ruaji për sesion", "User entered, store in database" : "Përdoruesi u dha, ruajeni në bazën e të dhënave", "RSA public key" : "Kyç publik RSA ", "Public key" : "Kyç publik", diff --git a/apps/files_external/lib/smb.php b/apps/files_external/lib/smb.php index 50bd56f28ad..b93e6e5b805 100644 --- a/apps/files_external/lib/smb.php +++ b/apps/files_external/lib/smb.php @@ -30,6 +30,7 @@ namespace OC\Files\Storage; use Icewind\SMB\Exception\Exception; +use Icewind\SMB\Exception\ForbiddenException; use Icewind\SMB\Exception\NotFoundException; use Icewind\SMB\NativeServer; use Icewind\SMB\Server; @@ -159,6 +160,8 @@ class SMB extends Common { } } catch (NotFoundException $e) { return false; + } catch (ForbiddenException $e) { + return false; } } @@ -239,6 +242,8 @@ class SMB extends Common { return false; } catch (NotFoundException $e) { return false; + } catch (ForbiddenException $e) { + return false; } } @@ -257,6 +262,8 @@ class SMB extends Common { return true; } catch (NotFoundException $e) { return false; + } catch (ForbiddenException $e) { + return false; } } @@ -270,7 +277,13 @@ class SMB extends Common { } public function opendir($path) { - $files = $this->getFolderContents($path); + try { + $files = $this->getFolderContents($path); + } catch (NotFoundException $e) { + return false; + } catch (ForbiddenException $e) { + return false; + } $names = array_map(function ($info) { /** @var \Icewind\SMB\IFileInfo $info */ return $info->getName(); @@ -283,6 +296,8 @@ class SMB extends Common { return $this->getFileInfo($path)->isDirectory() ? 'dir' : 'file'; } catch (NotFoundException $e) { return false; + } catch (ForbiddenException $e) { + return false; } } @@ -302,6 +317,8 @@ class SMB extends Common { return true; } catch (NotFoundException $e) { return false; + } catch (ForbiddenException $e) { + return false; } } diff --git a/apps/files_sharing/js/share.js b/apps/files_sharing/js/share.js index f8d89828f4d..0a01c5af0ad 100644 --- a/apps/files_sharing/js/share.js +++ b/apps/files_sharing/js/share.js @@ -122,6 +122,10 @@ } }); + fileList.$el.on('changeDirectory', function() { + OCA.Sharing.sharesLoaded = false; + }); + fileActions.registerAction({ name: 'Share', displayName: '', diff --git a/apps/files_sharing/l10n/fi_FI.js b/apps/files_sharing/l10n/fi_FI.js index 80be56de9db..68b41feb46c 100644 --- a/apps/files_sharing/l10n/fi_FI.js +++ b/apps/files_sharing/l10n/fi_FI.js @@ -44,6 +44,7 @@ OC.L10N.register( "%2$s shared %1$s with group %3$s" : "%2$s jakoi kohteen %1$s ryhmän %3$s kanssa", "%2$s shared %1$s via link" : "%2$s jakoi kohteen %1$s linkin kautta", "You shared %1$s via link" : "Jaoit kohteen %1$s linkin kautta", + "Your public link for %1$s expired" : "Julkinen linkkisi kohteelle %1$s vanhentui", "%2$s shared %1$s with you" : "%2$s jakoi kohteen %1$s kanssasi", "Downloaded via public link" : "Lataa julkista linkkiä käyttäen", "Shared with %2$s" : "Jaettu käyttäjän %2$s kanssa", @@ -52,6 +53,10 @@ OC.L10N.register( "Shared with group %3$s by %2$s" : "Jaettu ryhmän %3$s kanssa käyttäjän %2$s toimesta", "Shared via link by %2$s" : "Jaettu linkin kautta käyttäjän %2$s toimesta", "Shared via public link" : "Jaettu julkisen linkin kautta", + "Removed public link" : "Julkinen linkki poistettu", + "%2$s removed public link" : "%2$s poisti julkisen linkin", + "Public link expired" : "Julkinen linkki vanhentui", + "Public link of %2$s expired" : "Kohteen %2$s julkinen linkki vanhentui", "Shared by %2$s" : "Jakanut %2$s", "Shares" : "Jaot", "You received \"/%2$s\" as a remote share from %1$s" : "Vastaanotit kohteen \"/%2$s\" etäjakona käyttäjältä %1$s", diff --git a/apps/files_sharing/l10n/fi_FI.json b/apps/files_sharing/l10n/fi_FI.json index dd2d64e9943..e1834ab3c0e 100644 --- a/apps/files_sharing/l10n/fi_FI.json +++ b/apps/files_sharing/l10n/fi_FI.json @@ -42,6 +42,7 @@ "%2$s shared %1$s with group %3$s" : "%2$s jakoi kohteen %1$s ryhmän %3$s kanssa", "%2$s shared %1$s via link" : "%2$s jakoi kohteen %1$s linkin kautta", "You shared %1$s via link" : "Jaoit kohteen %1$s linkin kautta", + "Your public link for %1$s expired" : "Julkinen linkkisi kohteelle %1$s vanhentui", "%2$s shared %1$s with you" : "%2$s jakoi kohteen %1$s kanssasi", "Downloaded via public link" : "Lataa julkista linkkiä käyttäen", "Shared with %2$s" : "Jaettu käyttäjän %2$s kanssa", @@ -50,6 +51,10 @@ "Shared with group %3$s by %2$s" : "Jaettu ryhmän %3$s kanssa käyttäjän %2$s toimesta", "Shared via link by %2$s" : "Jaettu linkin kautta käyttäjän %2$s toimesta", "Shared via public link" : "Jaettu julkisen linkin kautta", + "Removed public link" : "Julkinen linkki poistettu", + "%2$s removed public link" : "%2$s poisti julkisen linkin", + "Public link expired" : "Julkinen linkki vanhentui", + "Public link of %2$s expired" : "Kohteen %2$s julkinen linkki vanhentui", "Shared by %2$s" : "Jakanut %2$s", "Shares" : "Jaot", "You received \"/%2$s\" as a remote share from %1$s" : "Vastaanotit kohteen \"/%2$s\" etäjakona käyttäjältä %1$s", diff --git a/apps/files_sharing/l10n/fr.js b/apps/files_sharing/l10n/fr.js index 6dae6754464..e99dffcdcac 100644 --- a/apps/files_sharing/l10n/fr.js +++ b/apps/files_sharing/l10n/fr.js @@ -11,6 +11,7 @@ OC.L10N.register( "Shared with you" : "Partagés avec vous", "Shared with others" : "Partagés avec d'autres", "Shared by link" : "Partagés par lien", + "Federated sharing" : "Federated sharing", "Nothing shared with you yet" : "Aucun fichier n'est partagé avec vous pour l'instant", "Files and folders others share with you will show up here" : "Les fichiers et dossiers partagés avec vous apparaîtront ici", "Nothing shared yet" : "Rien n'est partagé pour l'instant", @@ -39,18 +40,35 @@ OC.L10N.register( "Public shared file %1$s was downloaded" : "Le fichier public %1$s a été téléchargé", "You shared %1$s with %2$s" : "Vous avez partagé %1$s avec %2$s", "%2$s shared %1$s with %3$s" : "%2$s a partagé %1$s avec %3$s", + "You removed the share of %2$s for %1$s" : "Vous avez supprimé le partage de %2$s pour %1$s", + "%2$s removed the share of %3$s for %1$s" : "%2$s a supprimé votre partage de %3$s pour %1$s", "You shared %1$s with group %2$s" : "Vous avez partagé %1$s avec le groupe %2$s", "%2$s shared %1$s with group %3$s" : "%2$s partagé %1$s avec le groupe %3$s", + "You removed the share of group %2$s for %1$s" : "Vous avez supprimé le partage du groupe %2$s pour %1$s", + "%2$s removed the share of group %3$s for %1$s" : "%2$s a supprimé le partage du groupe %3$s pour %1$s", "%2$s shared %1$s via link" : "%2$s a partagé %1$s par lien", "You shared %1$s via link" : "Vous avez partagé %1$s par lien public", + "You removed the public link for %1$s" : "Vous avez supprimé le lien public pour %1$s", + "%2$s removed the public link for %1$s" : "%2$s a supprimé le lien public pour %1$s", + "Your public link for %1$s expired" : "Le lien public pour %1$s a expiré", + "The public link of %2$s for %1$s expired" : "Le lien public de %2$s pour %1$s a expiré", "%2$s shared %1$s with you" : "%2$s a partagé %1$s avec vous", + "%2$s removed the share for %1$s" : "%2$s a supprimé le partage pour %1$s", "Downloaded via public link" : "Téléchargé par lien public", "Shared with %2$s" : "Partagé avec %2$s", "Shared with %3$s by %2$s" : "Partagé avec %3$s par %2$s", + "Removed share for %2$s" : "Partage supprimé pour %2$s", + "%2$s removed share for %3$s" : "%2$s a supprimé le partage pour %3$s", "Shared with group %2$s" : "Partagé avec le groupe %2$s", "Shared with group %3$s by %2$s" : "Partagé avec le groupe %3$s par %2$s", + "Removed share of group %2$s" : "Partage supprimé du groupe %2$s", + "%2$s removed share of group %3$s" : "%2$s a supprimé le partage du groupe %3$s", "Shared via link by %2$s" : "Partagé via lien par %2$s", "Shared via public link" : "Partagé par lien public", + "Removed public link" : "Lien public supprimé", + "%2$s removed public link" : "%2$s a supprimé le lien public", + "Public link expired" : "Lien public expiré", + "Public link of %2$s expired" : "Le lien public de %2$s a expiré", "Shared by %2$s" : "Partagé par %2$s", "Shares" : "Partages", "You received \"/%2$s\" as a remote share from %1$s" : "L'utilisateur %1$s a partagé la ressource distante %2$s avec vous", diff --git a/apps/files_sharing/l10n/fr.json b/apps/files_sharing/l10n/fr.json index abe88912cc6..c0c7b85bf96 100644 --- a/apps/files_sharing/l10n/fr.json +++ b/apps/files_sharing/l10n/fr.json @@ -9,6 +9,7 @@ "Shared with you" : "Partagés avec vous", "Shared with others" : "Partagés avec d'autres", "Shared by link" : "Partagés par lien", + "Federated sharing" : "Federated sharing", "Nothing shared with you yet" : "Aucun fichier n'est partagé avec vous pour l'instant", "Files and folders others share with you will show up here" : "Les fichiers et dossiers partagés avec vous apparaîtront ici", "Nothing shared yet" : "Rien n'est partagé pour l'instant", @@ -37,18 +38,35 @@ "Public shared file %1$s was downloaded" : "Le fichier public %1$s a été téléchargé", "You shared %1$s with %2$s" : "Vous avez partagé %1$s avec %2$s", "%2$s shared %1$s with %3$s" : "%2$s a partagé %1$s avec %3$s", + "You removed the share of %2$s for %1$s" : "Vous avez supprimé le partage de %2$s pour %1$s", + "%2$s removed the share of %3$s for %1$s" : "%2$s a supprimé votre partage de %3$s pour %1$s", "You shared %1$s with group %2$s" : "Vous avez partagé %1$s avec le groupe %2$s", "%2$s shared %1$s with group %3$s" : "%2$s partagé %1$s avec le groupe %3$s", + "You removed the share of group %2$s for %1$s" : "Vous avez supprimé le partage du groupe %2$s pour %1$s", + "%2$s removed the share of group %3$s for %1$s" : "%2$s a supprimé le partage du groupe %3$s pour %1$s", "%2$s shared %1$s via link" : "%2$s a partagé %1$s par lien", "You shared %1$s via link" : "Vous avez partagé %1$s par lien public", + "You removed the public link for %1$s" : "Vous avez supprimé le lien public pour %1$s", + "%2$s removed the public link for %1$s" : "%2$s a supprimé le lien public pour %1$s", + "Your public link for %1$s expired" : "Le lien public pour %1$s a expiré", + "The public link of %2$s for %1$s expired" : "Le lien public de %2$s pour %1$s a expiré", "%2$s shared %1$s with you" : "%2$s a partagé %1$s avec vous", + "%2$s removed the share for %1$s" : "%2$s a supprimé le partage pour %1$s", "Downloaded via public link" : "Téléchargé par lien public", "Shared with %2$s" : "Partagé avec %2$s", "Shared with %3$s by %2$s" : "Partagé avec %3$s par %2$s", + "Removed share for %2$s" : "Partage supprimé pour %2$s", + "%2$s removed share for %3$s" : "%2$s a supprimé le partage pour %3$s", "Shared with group %2$s" : "Partagé avec le groupe %2$s", "Shared with group %3$s by %2$s" : "Partagé avec le groupe %3$s par %2$s", + "Removed share of group %2$s" : "Partage supprimé du groupe %2$s", + "%2$s removed share of group %3$s" : "%2$s a supprimé le partage du groupe %3$s", "Shared via link by %2$s" : "Partagé via lien par %2$s", "Shared via public link" : "Partagé par lien public", + "Removed public link" : "Lien public supprimé", + "%2$s removed public link" : "%2$s a supprimé le lien public", + "Public link expired" : "Lien public expiré", + "Public link of %2$s expired" : "Le lien public de %2$s a expiré", "Shared by %2$s" : "Partagé par %2$s", "Shares" : "Partages", "You received \"/%2$s\" as a remote share from %1$s" : "L'utilisateur %1$s a partagé la ressource distante %2$s avec vous", diff --git a/apps/files_sharing/l10n/he.js b/apps/files_sharing/l10n/he.js index 4f03da8aed6..b0be1d34c97 100644 --- a/apps/files_sharing/l10n/he.js +++ b/apps/files_sharing/l10n/he.js @@ -40,18 +40,35 @@ OC.L10N.register( "Public shared file %1$s was downloaded" : "קובץ שיתוף ציבורי %1$s הורד", "You shared %1$s with %2$s" : "שיתפת %1$s עם %2$s", "%2$s shared %1$s with %3$s" : "%2$s שיתף/שיתפה %1$s עם %3$s", + "You removed the share of %2$s for %1$s" : "הסרת את השיתוף של %2$s עבור %1$s", + "%2$s removed the share of %3$s for %1$s" : "%2$s הסיר/ה את השיתוף של %3$s עבור %1$s", "You shared %1$s with group %2$s" : "שיתפת %1$s עם קבוצת %2$s", "%2$s shared %1$s with group %3$s" : "%2$s שיתף/שיתפה %1$s עם קבוצה %3$s", + "You removed the share of group %2$s for %1$s" : "הסרת את השיתוף לקבוצה %2$s עבור %1$s", + "%2$s removed the share of group %3$s for %1$s" : "%2$s הסיר/ה את השיתוף לקבוצה %3$s עבור %1$s", "%2$s shared %1$s via link" : "%2$s שיתף/שיתפה %1$s על ידי קישור", "You shared %1$s via link" : "שיתפת %1$s על בסיס קישור", + "You removed the public link for %1$s" : "הסרת את הקישור הציבורי של %1$s", + "%2$s removed the public link for %1$s" : "%2$s הסיר/ה את הקישור הציבורי של %1$s", + "Your public link for %1$s expired" : "הקישור הציבורי של %1$s פג תוקף", + "The public link of %2$s for %1$s expired" : "הקישור הציבורי של %2$s עבור %1$s פג תוקף", "%2$s shared %1$s with you" : "%2$s שיתפו %1$s אתך", + "%2$s removed the share for %1$s" : "%2$s הסיר/ה את השיתוף של %1$s", "Downloaded via public link" : "הורד על בסיס קישור ציבורי", "Shared with %2$s" : "שיתף/שיתפה עם %2$s", "Shared with %3$s by %2$s" : "שיתף/שיתפה עם %3$s על ידי %2$s", + "Removed share for %2$s" : "הסיר/ה שיתוף של %2$s", + "%2$s removed share for %3$s" : "%2$s הסיר/ה שיתוף של %3$s", "Shared with group %2$s" : "שיתף/שיתפה עם קבוצה %2$s", "Shared with group %3$s by %2$s" : "שיתף/שיתפה עם קבוצה %3$s על ידי %2$s", + "Removed share of group %2$s" : "הסיר/ה שיתוף של קבוצה %2$s", + "%2$s removed share of group %3$s" : "%2$s הסיר/ה שיתוף של קבוצה %3$s", "Shared via link by %2$s" : "שיתף/שיתפה על בסיס קישור על ידי %2$s", "Shared via public link" : "משותף על בסיס קישור ציבורי", + "Removed public link" : "הסיר/ה קישור ציבורי", + "%2$s removed public link" : "%2$s הסיר/ה קישור ציבורי", + "Public link expired" : "קישור ציבורי פג תוקף", + "Public link of %2$s expired" : "קישור ציבורי של %2$s פג תוקף", "Shared by %2$s" : "שיתף/שיתפה על ידי %2$s", "Shares" : "שיתופים", "You received \"/%2$s\" as a remote share from %1$s" : "קבלת \"/%2$s\" כשיתוף חיצוני מאת %1$s", diff --git a/apps/files_sharing/l10n/he.json b/apps/files_sharing/l10n/he.json index f9e770772fe..de1cfff07b5 100644 --- a/apps/files_sharing/l10n/he.json +++ b/apps/files_sharing/l10n/he.json @@ -38,18 +38,35 @@ "Public shared file %1$s was downloaded" : "קובץ שיתוף ציבורי %1$s הורד", "You shared %1$s with %2$s" : "שיתפת %1$s עם %2$s", "%2$s shared %1$s with %3$s" : "%2$s שיתף/שיתפה %1$s עם %3$s", + "You removed the share of %2$s for %1$s" : "הסרת את השיתוף של %2$s עבור %1$s", + "%2$s removed the share of %3$s for %1$s" : "%2$s הסיר/ה את השיתוף של %3$s עבור %1$s", "You shared %1$s with group %2$s" : "שיתפת %1$s עם קבוצת %2$s", "%2$s shared %1$s with group %3$s" : "%2$s שיתף/שיתפה %1$s עם קבוצה %3$s", + "You removed the share of group %2$s for %1$s" : "הסרת את השיתוף לקבוצה %2$s עבור %1$s", + "%2$s removed the share of group %3$s for %1$s" : "%2$s הסיר/ה את השיתוף לקבוצה %3$s עבור %1$s", "%2$s shared %1$s via link" : "%2$s שיתף/שיתפה %1$s על ידי קישור", "You shared %1$s via link" : "שיתפת %1$s על בסיס קישור", + "You removed the public link for %1$s" : "הסרת את הקישור הציבורי של %1$s", + "%2$s removed the public link for %1$s" : "%2$s הסיר/ה את הקישור הציבורי של %1$s", + "Your public link for %1$s expired" : "הקישור הציבורי של %1$s פג תוקף", + "The public link of %2$s for %1$s expired" : "הקישור הציבורי של %2$s עבור %1$s פג תוקף", "%2$s shared %1$s with you" : "%2$s שיתפו %1$s אתך", + "%2$s removed the share for %1$s" : "%2$s הסיר/ה את השיתוף של %1$s", "Downloaded via public link" : "הורד על בסיס קישור ציבורי", "Shared with %2$s" : "שיתף/שיתפה עם %2$s", "Shared with %3$s by %2$s" : "שיתף/שיתפה עם %3$s על ידי %2$s", + "Removed share for %2$s" : "הסיר/ה שיתוף של %2$s", + "%2$s removed share for %3$s" : "%2$s הסיר/ה שיתוף של %3$s", "Shared with group %2$s" : "שיתף/שיתפה עם קבוצה %2$s", "Shared with group %3$s by %2$s" : "שיתף/שיתפה עם קבוצה %3$s על ידי %2$s", + "Removed share of group %2$s" : "הסיר/ה שיתוף של קבוצה %2$s", + "%2$s removed share of group %3$s" : "%2$s הסיר/ה שיתוף של קבוצה %3$s", "Shared via link by %2$s" : "שיתף/שיתפה על בסיס קישור על ידי %2$s", "Shared via public link" : "משותף על בסיס קישור ציבורי", + "Removed public link" : "הסיר/ה קישור ציבורי", + "%2$s removed public link" : "%2$s הסיר/ה קישור ציבורי", + "Public link expired" : "קישור ציבורי פג תוקף", + "Public link of %2$s expired" : "קישור ציבורי של %2$s פג תוקף", "Shared by %2$s" : "שיתף/שיתפה על ידי %2$s", "Shares" : "שיתופים", "You received \"/%2$s\" as a remote share from %1$s" : "קבלת \"/%2$s\" כשיתוף חיצוני מאת %1$s", diff --git a/apps/files_sharing/l10n/it.js b/apps/files_sharing/l10n/it.js index 1705be1b229..93adc336604 100644 --- a/apps/files_sharing/l10n/it.js +++ b/apps/files_sharing/l10n/it.js @@ -11,6 +11,7 @@ OC.L10N.register( "Shared with you" : "Condivisi con te", "Shared with others" : "Condivisi con altri", "Shared by link" : "Condivisi tramite collegamento", + "Federated sharing" : "Condivisione federata", "Nothing shared with you yet" : "Non è stato condiviso ancora niente con te", "Files and folders others share with you will show up here" : "I file e le cartelle che altri condividono con te saranno mostrati qui", "Nothing shared yet" : "Ancora nessuna condivisione", @@ -39,20 +40,38 @@ OC.L10N.register( "Public shared file %1$s was downloaded" : "Il file condiviso pubblicamente %1$s è stato scaricato", "You shared %1$s with %2$s" : "Hai condiviso %1$s con %2$s", "%2$s shared %1$s with %3$s" : "%2$s ha condiviso %1$s con %3$s", + "You removed the share of %2$s for %1$s" : "Hai rimosso la condivisione di %2$s per %1$s", + "%2$s removed the share of %3$s for %1$s" : "%2$s ha rimosso la condivisione di %3$s per %1$s", "You shared %1$s with group %2$s" : "Hai condiviso %1$s con il gruppo %2$s", "%2$s shared %1$s with group %3$s" : "%2$s ha condiviso %1$s con il gruppo %3$s", + "You removed the share of group %2$s for %1$s" : "Hai rimosso la condivisione del gruppo %2$s per %1$s", + "%2$s removed the share of group %3$s for %1$s" : "%2$s ha rimosso la condivisione del gruppo %3$s per %1$s", "%2$s shared %1$s via link" : "%2$s ha condiviso %1$s tramite collegamento", "You shared %1$s via link" : "Hai condiviso %1$s tramite collegamento", + "You removed the public link for %1$s" : "Hai rimosso il collegamento pubblico per %1$s", + "%2$s removed the public link for %1$s" : "%2$s ha rimosso il collegamento pubblico per %1$s", + "Your public link for %1$s expired" : "il tuo collegamento pubblico per %1$s è scaduto", + "The public link of %2$s for %1$s expired" : "il collegamento pubblico di %2$s per %1$s è scaduto", "%2$s shared %1$s with you" : "%2$s ha condiviso %1$s con te", + "%2$s removed the share for %1$s" : "%2$s ha rimosso la condivisione per %1$s", "Downloaded via public link" : "Scaricata tramite collegamento pubblico", "Shared with %2$s" : "Condivisa con %2$s", "Shared with %3$s by %2$s" : "Condivisa con %3$s da %2$s", + "Removed share for %2$s" : "Condivisione rimossa per %2$s", + "%2$s removed share for %3$s" : "%2$s ha rimosso la condivisione per %3$s", "Shared with group %2$s" : "Condivisa con il gruppo %2$s", "Shared with group %3$s by %2$s" : "Condivisa con il gruppo %3$s da %2$s", + "Removed share of group %2$s" : "Condivisione rimossa del gruppo %2$s", + "%2$s removed share of group %3$s" : "%2$s ha rimosso la condivisione del gruppo %3$s", "Shared via link by %2$s" : "Condivisa tramite collegamento da %2$s", "Shared via public link" : "Condivisa tramite collegamento pubblico", + "Removed public link" : "Collegamento pubblico rimosso", + "%2$s removed public link" : "%2$s ha rimosso il collegamento pubblico", + "Public link expired" : "Collegamento pubblico scaduto", + "Public link of %2$s expired" : "il collegamento pubblico di %2$s è scaduto", "Shared by %2$s" : "Condivisa da %2$s", "Shares" : "Condivisioni", + "You received \"/%2$s\" as a remote share from %1$s" : "Hai ricevuto \"/%2$s\" come condivisione remota da %1$s", "Accept" : "Accetta", "Decline" : "Rifiuta", "Share with me through my #ownCloud Federated Cloud ID, see %s" : "Condividi con me attraverso il mio ID di cloud federata #ownCloud, vedi %s", diff --git a/apps/files_sharing/l10n/it.json b/apps/files_sharing/l10n/it.json index 7060c4cb452..d95f35be0a9 100644 --- a/apps/files_sharing/l10n/it.json +++ b/apps/files_sharing/l10n/it.json @@ -9,6 +9,7 @@ "Shared with you" : "Condivisi con te", "Shared with others" : "Condivisi con altri", "Shared by link" : "Condivisi tramite collegamento", + "Federated sharing" : "Condivisione federata", "Nothing shared with you yet" : "Non è stato condiviso ancora niente con te", "Files and folders others share with you will show up here" : "I file e le cartelle che altri condividono con te saranno mostrati qui", "Nothing shared yet" : "Ancora nessuna condivisione", @@ -37,20 +38,38 @@ "Public shared file %1$s was downloaded" : "Il file condiviso pubblicamente %1$s è stato scaricato", "You shared %1$s with %2$s" : "Hai condiviso %1$s con %2$s", "%2$s shared %1$s with %3$s" : "%2$s ha condiviso %1$s con %3$s", + "You removed the share of %2$s for %1$s" : "Hai rimosso la condivisione di %2$s per %1$s", + "%2$s removed the share of %3$s for %1$s" : "%2$s ha rimosso la condivisione di %3$s per %1$s", "You shared %1$s with group %2$s" : "Hai condiviso %1$s con il gruppo %2$s", "%2$s shared %1$s with group %3$s" : "%2$s ha condiviso %1$s con il gruppo %3$s", + "You removed the share of group %2$s for %1$s" : "Hai rimosso la condivisione del gruppo %2$s per %1$s", + "%2$s removed the share of group %3$s for %1$s" : "%2$s ha rimosso la condivisione del gruppo %3$s per %1$s", "%2$s shared %1$s via link" : "%2$s ha condiviso %1$s tramite collegamento", "You shared %1$s via link" : "Hai condiviso %1$s tramite collegamento", + "You removed the public link for %1$s" : "Hai rimosso il collegamento pubblico per %1$s", + "%2$s removed the public link for %1$s" : "%2$s ha rimosso il collegamento pubblico per %1$s", + "Your public link for %1$s expired" : "il tuo collegamento pubblico per %1$s è scaduto", + "The public link of %2$s for %1$s expired" : "il collegamento pubblico di %2$s per %1$s è scaduto", "%2$s shared %1$s with you" : "%2$s ha condiviso %1$s con te", + "%2$s removed the share for %1$s" : "%2$s ha rimosso la condivisione per %1$s", "Downloaded via public link" : "Scaricata tramite collegamento pubblico", "Shared with %2$s" : "Condivisa con %2$s", "Shared with %3$s by %2$s" : "Condivisa con %3$s da %2$s", + "Removed share for %2$s" : "Condivisione rimossa per %2$s", + "%2$s removed share for %3$s" : "%2$s ha rimosso la condivisione per %3$s", "Shared with group %2$s" : "Condivisa con il gruppo %2$s", "Shared with group %3$s by %2$s" : "Condivisa con il gruppo %3$s da %2$s", + "Removed share of group %2$s" : "Condivisione rimossa del gruppo %2$s", + "%2$s removed share of group %3$s" : "%2$s ha rimosso la condivisione del gruppo %3$s", "Shared via link by %2$s" : "Condivisa tramite collegamento da %2$s", "Shared via public link" : "Condivisa tramite collegamento pubblico", + "Removed public link" : "Collegamento pubblico rimosso", + "%2$s removed public link" : "%2$s ha rimosso il collegamento pubblico", + "Public link expired" : "Collegamento pubblico scaduto", + "Public link of %2$s expired" : "il collegamento pubblico di %2$s è scaduto", "Shared by %2$s" : "Condivisa da %2$s", "Shares" : "Condivisioni", + "You received \"/%2$s\" as a remote share from %1$s" : "Hai ricevuto \"/%2$s\" come condivisione remota da %1$s", "Accept" : "Accetta", "Decline" : "Rifiuta", "Share with me through my #ownCloud Federated Cloud ID, see %s" : "Condividi con me attraverso il mio ID di cloud federata #ownCloud, vedi %s", diff --git a/apps/files_sharing/l10n/ja.js b/apps/files_sharing/l10n/ja.js index 31767cef350..7c121ca1997 100644 --- a/apps/files_sharing/l10n/ja.js +++ b/apps/files_sharing/l10n/ja.js @@ -39,14 +39,19 @@ OC.L10N.register( "Public shared file %1$s was downloaded" : "公開共有ファイル %1$s がダウンロードされました", "You shared %1$s with %2$s" : "あなたは %1$s を %2$s と共有しました", "%2$s shared %1$s with %3$s" : "%2$s は %1$s を %3$s と共有しました", + "You removed the share of %2$s for %1$s" : "%1$sとの%2$sの共有を削除しました", + "%2$s removed the share of %3$s for %1$s" : "%2$sは%1$sとの%3$sの共有を削除しました", "You shared %1$s with group %2$s" : "あなたは %1$s をグループ %2$s と共有しました", "%2$s shared %1$s with group %3$s" : "%2$s は %1$s をグループ %3$s と共有しました", + "You removed the share of group %2$s for %1$s" : "%1$sとのグループ%2$sの共有を削除しました", "%2$s shared %1$s via link" : "%2$s はリンク経由で %1$s を共有しました", "You shared %1$s via link" : "リンク経由で %1$s を共有しています", + "The public link of %2$s for %1$s expired" : "%1$sへの公開リンク%2$sの期限が切れました", "%2$s shared %1$s with you" : "%2$s は %1$s をあなたと共有しました", "Downloaded via public link" : "公開リンクからダウンロードしました", "Shared with %2$s" : "%2$s と共有しました", "Shared with %3$s by %2$s" : "%3$s と %2$s で共有しました", + "Removed share for %2$s" : " %2$sとの共有を削除しました", "Shared with group %2$s" : "%2$s グループと共有しました", "Shared with group %3$s by %2$s" : "%3$s グループと %2$s で共有しました", "Shared via link by %2$s" : "リンク経由で %2$s が共有しました", diff --git a/apps/files_sharing/l10n/ja.json b/apps/files_sharing/l10n/ja.json index 0ae592acf66..5bb3a9ccbd9 100644 --- a/apps/files_sharing/l10n/ja.json +++ b/apps/files_sharing/l10n/ja.json @@ -37,14 +37,19 @@ "Public shared file %1$s was downloaded" : "公開共有ファイル %1$s がダウンロードされました", "You shared %1$s with %2$s" : "あなたは %1$s を %2$s と共有しました", "%2$s shared %1$s with %3$s" : "%2$s は %1$s を %3$s と共有しました", + "You removed the share of %2$s for %1$s" : "%1$sとの%2$sの共有を削除しました", + "%2$s removed the share of %3$s for %1$s" : "%2$sは%1$sとの%3$sの共有を削除しました", "You shared %1$s with group %2$s" : "あなたは %1$s をグループ %2$s と共有しました", "%2$s shared %1$s with group %3$s" : "%2$s は %1$s をグループ %3$s と共有しました", + "You removed the share of group %2$s for %1$s" : "%1$sとのグループ%2$sの共有を削除しました", "%2$s shared %1$s via link" : "%2$s はリンク経由で %1$s を共有しました", "You shared %1$s via link" : "リンク経由で %1$s を共有しています", + "The public link of %2$s for %1$s expired" : "%1$sへの公開リンク%2$sの期限が切れました", "%2$s shared %1$s with you" : "%2$s は %1$s をあなたと共有しました", "Downloaded via public link" : "公開リンクからダウンロードしました", "Shared with %2$s" : "%2$s と共有しました", "Shared with %3$s by %2$s" : "%3$s と %2$s で共有しました", + "Removed share for %2$s" : " %2$sとの共有を削除しました", "Shared with group %2$s" : "%2$s グループと共有しました", "Shared with group %3$s by %2$s" : "%3$s グループと %2$s で共有しました", "Shared via link by %2$s" : "リンク経由で %2$s が共有しました", diff --git a/apps/files_sharing/l10n/pt_PT.js b/apps/files_sharing/l10n/pt_PT.js index 19c2685ebe2..e9cf412bc53 100644 --- a/apps/files_sharing/l10n/pt_PT.js +++ b/apps/files_sharing/l10n/pt_PT.js @@ -40,18 +40,35 @@ OC.L10N.register( "Public shared file %1$s was downloaded" : "Foi transferido o ficheiro %1$s partilhado publicamente", "You shared %1$s with %2$s" : "Partilhou %1$s com %2$s", "%2$s shared %1$s with %3$s" : "%2$s partilhou %1$s com %3$s", + "You removed the share of %2$s for %1$s" : "Removeu a partilha de %2$s para %1$s", + "%2$s removed the share of %3$s for %1$s" : "%2$s removeu a partilha de %3$s para %1$s", "You shared %1$s with group %2$s" : "Partilhou %1$s com o grupo %2$s", "%2$s shared %1$s with group %3$s" : "%2$s partilhou %1$s com o grupo %3$s", + "You removed the share of group %2$s for %1$s" : "Removeu a partilha do grupo %2$s para %1$s", + "%2$s removed the share of group %3$s for %1$s" : "%2$s removeu a partilha do grupo %3$s para %1$s", "%2$s shared %1$s via link" : "%2$s partilhou %1$s via hiperligação", "You shared %1$s via link" : "Partilhou %1$s através de uma hiperligação", + "You removed the public link for %1$s" : "Removeu o link público de %1$s", + "%2$s removed the public link for %1$s" : "%2$s removeu o link público de %1$s", + "Your public link for %1$s expired" : "O seu link público de %1$s expirou", + "The public link of %2$s for %1$s expired" : "O link público de %2$s para %1$s expirou", "%2$s shared %1$s with you" : "%2$s partilhou %1$s consigo", + "%2$s removed the share for %1$s" : "%2$s removeu a partilha para %1$s", "Downloaded via public link" : "Transferido via hiperligação pública", "Shared with %2$s" : "Partilhado com %2$s", "Shared with %3$s by %2$s" : "Partilhado com %3$s por %2$s", + "Removed share for %2$s" : "Partilha removida para %2$s", + "%2$s removed share for %3$s" : "%2$s removeu a partilha para %3$s", "Shared with group %2$s" : "Partilhado com o grupo %2$s", "Shared with group %3$s by %2$s" : "Partilhado com o grupo %3$s por %2$s", + "Removed share of group %2$s" : "Partilha removida do grupo %2$s", + "%2$s removed share of group %3$s" : "%2$s removeu a partilha do grupo %3$s", "Shared via link by %2$s" : "Partilhado via hiperligação por %2$s", "Shared via public link" : "Partilhado via hiperligação pública", + "Removed public link" : "Removeu link público", + "%2$s removed public link" : "%2$s removeu link público", + "Public link expired" : "Link público expirou", + "Public link of %2$s expired" : "Link público de %2$s expirou", "Shared by %2$s" : "Partilhado por %2$s", "Shares" : "Partilhas", "You received \"/%2$s\" as a remote share from %1$s" : "Recebeu \"/%2$s\" como uma partilha remota de %1$s", diff --git a/apps/files_sharing/l10n/pt_PT.json b/apps/files_sharing/l10n/pt_PT.json index bc1aeb6aeff..f311ef6bb33 100644 --- a/apps/files_sharing/l10n/pt_PT.json +++ b/apps/files_sharing/l10n/pt_PT.json @@ -38,18 +38,35 @@ "Public shared file %1$s was downloaded" : "Foi transferido o ficheiro %1$s partilhado publicamente", "You shared %1$s with %2$s" : "Partilhou %1$s com %2$s", "%2$s shared %1$s with %3$s" : "%2$s partilhou %1$s com %3$s", + "You removed the share of %2$s for %1$s" : "Removeu a partilha de %2$s para %1$s", + "%2$s removed the share of %3$s for %1$s" : "%2$s removeu a partilha de %3$s para %1$s", "You shared %1$s with group %2$s" : "Partilhou %1$s com o grupo %2$s", "%2$s shared %1$s with group %3$s" : "%2$s partilhou %1$s com o grupo %3$s", + "You removed the share of group %2$s for %1$s" : "Removeu a partilha do grupo %2$s para %1$s", + "%2$s removed the share of group %3$s for %1$s" : "%2$s removeu a partilha do grupo %3$s para %1$s", "%2$s shared %1$s via link" : "%2$s partilhou %1$s via hiperligação", "You shared %1$s via link" : "Partilhou %1$s através de uma hiperligação", + "You removed the public link for %1$s" : "Removeu o link público de %1$s", + "%2$s removed the public link for %1$s" : "%2$s removeu o link público de %1$s", + "Your public link for %1$s expired" : "O seu link público de %1$s expirou", + "The public link of %2$s for %1$s expired" : "O link público de %2$s para %1$s expirou", "%2$s shared %1$s with you" : "%2$s partilhou %1$s consigo", + "%2$s removed the share for %1$s" : "%2$s removeu a partilha para %1$s", "Downloaded via public link" : "Transferido via hiperligação pública", "Shared with %2$s" : "Partilhado com %2$s", "Shared with %3$s by %2$s" : "Partilhado com %3$s por %2$s", + "Removed share for %2$s" : "Partilha removida para %2$s", + "%2$s removed share for %3$s" : "%2$s removeu a partilha para %3$s", "Shared with group %2$s" : "Partilhado com o grupo %2$s", "Shared with group %3$s by %2$s" : "Partilhado com o grupo %3$s por %2$s", + "Removed share of group %2$s" : "Partilha removida do grupo %2$s", + "%2$s removed share of group %3$s" : "%2$s removeu a partilha do grupo %3$s", "Shared via link by %2$s" : "Partilhado via hiperligação por %2$s", "Shared via public link" : "Partilhado via hiperligação pública", + "Removed public link" : "Removeu link público", + "%2$s removed public link" : "%2$s removeu link público", + "Public link expired" : "Link público expirou", + "Public link of %2$s expired" : "Link público de %2$s expirou", "Shared by %2$s" : "Partilhado por %2$s", "Shares" : "Partilhas", "You received \"/%2$s\" as a remote share from %1$s" : "Recebeu \"/%2$s\" como uma partilha remota de %1$s", diff --git a/apps/files_sharing/l10n/sq.js b/apps/files_sharing/l10n/sq.js index db8b17b0708..8ffc9dba389 100644 --- a/apps/files_sharing/l10n/sq.js +++ b/apps/files_sharing/l10n/sq.js @@ -40,18 +40,35 @@ OC.L10N.register( "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", "%2$s shared %1$s with %3$s" : "%2$s ndau %1$s me %3$s", + "You removed the share of %2$s for %1$s" : "Hoqët ndarjen e %2$s për %1$s", + "%2$s removed the share of %3$s for %1$s" : "%2$s hoqi ndarjen e %3$s për %1$s", "You shared %1$s with group %2$s" : "Ndatë %1$s me grupin %2$s", "%2$s shared %1$s with group %3$s" : "%2$s ndau %1$s me grupin %3$s", + "You removed the share of group %2$s for %1$s" : "Hoqët ndarjen e grupit %2$s për %1$s", + "%2$s removed the share of group %3$s for %1$s" : "%2$s hoqi ndarjen e grupit %3$s për %1$s", "%2$s shared %1$s via link" : "%2$s ndau %1$s përmes një lidhjeje", "You shared %1$s via link" : "Ndatë %1$s përmes një lidhjeje", + "You removed the public link for %1$s" : "Hoqët lidhjen publike për %1$s", + "%2$s removed the public link for %1$s" : "%2$s hoqi lidhjen publike për %1$s", + "Your public link for %1$s expired" : "Lidhja juaj publike për %1$s skadoi", + "The public link of %2$s for %1$s expired" : "Lidhja publike e %2$s për %1$s skadoi", "%2$s shared %1$s with you" : "%2$s ndau %1$s me ju", + "%2$s removed the share for %1$s" : "%2$s hoqi ndarjen për %1$s", "Downloaded via public link" : "Shkarkuar përmes një lidhjeje publike", "Shared with %2$s" : "U nda me %2$s", "Shared with %3$s by %2$s" : "U nda me %3$s nga %2$s", + "Removed share for %2$s" : "Hoqi ndarjen për %2$s", + "%2$s removed share for %3$s" : "%2$s hoqi ndarjen për %3$s", "Shared with group %2$s" : "U nda me grupin %2$s", "Shared with group %3$s by %2$s" : "U nda me grupin %3$s nga %2$s", + "Removed share of group %2$s" : "Hoqi ndarjen e grupit %2$s", + "%2$s removed share of group %3$s" : "%2$s hoqi ndarjen e grupit %3$s", "Shared via link by %2$s" : "U nda përmes një lidhje nga %2$s", "Shared via public link" : "U nda përmes një lidhje publike", + "Removed public link" : "Hoqi lidhje publike", + "%2$s removed public link" : "%2$s hoqi lidhje publike", + "Public link expired" : "Lidhja publike skadoi", + "Public link of %2$s expired" : "Lidhja publike e %2$s skadoi", "Shared by %2$s" : "U nda nga %2$s", "Shares" : "Ndarje", "You received \"/%2$s\" as a remote share from %1$s" : "Ju erdhi \"/%2$s\" si ndarje e largët prej %1$s", diff --git a/apps/files_sharing/l10n/sq.json b/apps/files_sharing/l10n/sq.json index 77a6b378be1..70b2a3ff20d 100644 --- a/apps/files_sharing/l10n/sq.json +++ b/apps/files_sharing/l10n/sq.json @@ -38,18 +38,35 @@ "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", "%2$s shared %1$s with %3$s" : "%2$s ndau %1$s me %3$s", + "You removed the share of %2$s for %1$s" : "Hoqët ndarjen e %2$s për %1$s", + "%2$s removed the share of %3$s for %1$s" : "%2$s hoqi ndarjen e %3$s për %1$s", "You shared %1$s with group %2$s" : "Ndatë %1$s me grupin %2$s", "%2$s shared %1$s with group %3$s" : "%2$s ndau %1$s me grupin %3$s", + "You removed the share of group %2$s for %1$s" : "Hoqët ndarjen e grupit %2$s për %1$s", + "%2$s removed the share of group %3$s for %1$s" : "%2$s hoqi ndarjen e grupit %3$s për %1$s", "%2$s shared %1$s via link" : "%2$s ndau %1$s përmes një lidhjeje", "You shared %1$s via link" : "Ndatë %1$s përmes një lidhjeje", + "You removed the public link for %1$s" : "Hoqët lidhjen publike për %1$s", + "%2$s removed the public link for %1$s" : "%2$s hoqi lidhjen publike për %1$s", + "Your public link for %1$s expired" : "Lidhja juaj publike për %1$s skadoi", + "The public link of %2$s for %1$s expired" : "Lidhja publike e %2$s për %1$s skadoi", "%2$s shared %1$s with you" : "%2$s ndau %1$s me ju", + "%2$s removed the share for %1$s" : "%2$s hoqi ndarjen për %1$s", "Downloaded via public link" : "Shkarkuar përmes një lidhjeje publike", "Shared with %2$s" : "U nda me %2$s", "Shared with %3$s by %2$s" : "U nda me %3$s nga %2$s", + "Removed share for %2$s" : "Hoqi ndarjen për %2$s", + "%2$s removed share for %3$s" : "%2$s hoqi ndarjen për %3$s", "Shared with group %2$s" : "U nda me grupin %2$s", "Shared with group %3$s by %2$s" : "U nda me grupin %3$s nga %2$s", + "Removed share of group %2$s" : "Hoqi ndarjen e grupit %2$s", + "%2$s removed share of group %3$s" : "%2$s hoqi ndarjen e grupit %3$s", "Shared via link by %2$s" : "U nda përmes një lidhje nga %2$s", "Shared via public link" : "U nda përmes një lidhje publike", + "Removed public link" : "Hoqi lidhje publike", + "%2$s removed public link" : "%2$s hoqi lidhje publike", + "Public link expired" : "Lidhja publike skadoi", + "Public link of %2$s expired" : "Lidhja publike e %2$s skadoi", "Shared by %2$s" : "U nda nga %2$s", "Shares" : "Ndarje", "You received \"/%2$s\" as a remote share from %1$s" : "Ju erdhi \"/%2$s\" si ndarje e largët prej %1$s", diff --git a/apps/files_sharing/lib/migration.php b/apps/files_sharing/lib/migration.php index e7346385510..31a76687d40 100644 --- a/apps/files_sharing/lib/migration.php +++ b/apps/files_sharing/lib/migration.php @@ -55,32 +55,30 @@ class Migration { */ public function removeReShares() { - while(true) { - $reShares = $this->getReShares(1000); + $stmt = $this->getReShares(); - if (empty($reShares)) { - break; - } + $owners = []; + while($share = $stmt->fetch()) { - // Update the cache - foreach($reShares as $reShare) { - $this->shareCache[$reShare['id']] = $reShare; - } + $this->shareCache[$share['id']] = $share; - $owners = []; - foreach ($reShares as $share) { - $owners[$share['id']] = [ + $owners[$share['id']] = [ 'owner' => $this->findOwner($share), - 'initiator' => $share['uid_owner'] - ]; - } - $this->updateOwners($owners); + 'initiator' => $share['uid_owner'], + 'type' => $share['share_type'], + ]; - //Clear the cache of the shares we just updated so we have more room - foreach($owners as $id => $owner) { - unset($this->shareCache[$id]); + if (count($owners) === 1000) { + $this->updateOwners($owners); + $owners = []; } } + + $stmt->closeCursor(); + + if (count($owners)) { + $this->updateOwners($owners); + } } /** @@ -99,7 +97,8 @@ class Migration { foreach ($shares as $share) { $owners[$share['id']] = [ 'owner' => $share['uid_owner'], - 'initiator' => $share['uid_owner'] + 'initiator' => $share['uid_owner'], + 'type' => $share['share_type'], ]; } $this->updateOwners($owners); @@ -130,11 +129,11 @@ class Migration { * Get $n re-shares from the database * * @param int $n The max number of shares to fetch - * @return array + * @return \Doctrine\DBAL\Driver\Statement */ - private function getReShares($n = 1000) { + private function getReShares() { $query = $this->connection->getQueryBuilder(); - $query->select(['id', 'parent', 'uid_owner']) + $query->select(['id', 'parent', 'uid_owner', 'share_type']) ->from($this->table) ->where($query->expr()->in( 'share_type', @@ -156,9 +155,10 @@ class Migration { ) )) ->andWhere($query->expr()->isNotNull('parent')) - ->orderBy('id', 'asc') - ->setMaxResults($n); - $result = $query->execute(); + ->orderBy('id', 'asc'); + return $query->execute(); + + $shares = $result->fetchAll(); $result->closeCursor(); @@ -178,7 +178,7 @@ class Migration { */ private function getMissingInitiator($n = 1000) { $query = $this->connection->getQueryBuilder(); - $query->select(['id', 'uid_owner']) + $query->select(['id', 'uid_owner', 'share_type']) ->from($this->table) ->where($query->expr()->in( 'share_type', @@ -247,11 +247,17 @@ class Migration { foreach ($owners as $id => $owner) { $query = $this->connection->getQueryBuilder(); $query->update($this->table) - ->set('parent', $query->createNamedParameter(null)) ->set('uid_owner', $query->createNamedParameter($owner['owner'])) - ->set('uid_initiator', $query->createNamedParameter($owner['initiator'])) - ->where($query->expr()->eq('id', $query->createNamedParameter($id))) - ->execute(); + ->set('uid_initiator', $query->createNamedParameter($owner['initiator'])); + + + if ((int)$owner['type'] !== \OCP\Share::SHARE_TYPE_LINK) { + $query->set('parent', $query->createNamedParameter(null)); + } + + $query->where($query->expr()->eq('id', $query->createNamedParameter($id))); + + $query->execute(); } $this->connection->commit(); diff --git a/apps/files_sharing/tests/api.php b/apps/files_sharing/tests/api.php index 49a08d3d0ce..3a2ae1eef37 100644 --- a/apps/files_sharing/tests/api.php +++ b/apps/files_sharing/tests/api.php @@ -40,6 +40,9 @@ class Test_Files_Sharing_Api extends TestCase { private static $tempStorage; + /** @var \OCP\Share\IManager */ + private $shareManager; + protected function setUp() { parent::setUp(); @@ -59,6 +62,8 @@ class Test_Files_Sharing_Api extends TestCase { $this->view->mkdir($this->folder . $this->subfolder . $this->subsubfolder); $this->view->file_put_contents($this->folder.$this->filename, $this->data); $this->view->file_put_contents($this->folder . $this->subfolder . $this->filename, $this->data); + + $this->shareManager = \OC::$server->getShareManager(); } protected function tearDown() { @@ -73,6 +78,40 @@ class Test_Files_Sharing_Api extends TestCase { } /** + * @param array $data + * @return \OCP\IRequest + */ + private function createRequest(array $data) { + $request = $this->getMock('\OCP\IRequest'); + $request->method('getParam') + ->will($this->returnCallback(function($param, $default = null) use ($data) { + if (isset($data[$param])) { + return $data[$param]; + } + return $default; + })); + return $request; + } + + /** + * @param \OCP\IRequest $request + * @param string $userId The userId of the caller + * @return \OCA\Files_Sharing\API\Share20OCS + */ + private function createOCS($request, $userId) { + $currentUser = \OC::$server->getUserManager()->get($userId); + return new \OCA\Files_Sharing\API\Share20OCS( + $this->shareManager, + \OC::$server->getGroupManager(), + \OC::$server->getUserManager(), + $request, + \OC::$server->getRootFolder(), + \OC::$server->getURLGenerator(), + $currentUser + ); + } + + /** * @medium */ function testCreateShareUserFile() { @@ -1725,4 +1764,85 @@ class Test_Files_Sharing_Api extends TestCase { $config->setAppValue('core', 'shareapi_enforce_expire_date', 'no'); } + /** + * test for no invisible shares + * See: https://github.com/owncloud/core/issues/22295 + */ + public function testInvisibleSharesUser() { + // simulate a post request + $request = $this->createRequest([ + 'path' => $this->folder, + 'shareWith' => self::TEST_FILES_SHARING_API_USER2, + 'shareType' => \OCP\Share::SHARE_TYPE_USER + ]); + $ocs = $this->createOCS($request, self::TEST_FILES_SHARING_API_USER1); + $result = $ocs->createShare(); + $this->assertTrue($result->succeeded()); + $data = $result->getData(); + + $topId = $data['id']; + + $request = $this->createRequest([ + 'path' => $this->folder . $this->subfolder, + 'shareType' => \OCP\Share::SHARE_TYPE_LINK, + ]); + $ocs = $this->createOCS($request, self::TEST_FILES_SHARING_API_USER2); + $result = $ocs->createShare(); + $this->assertTrue($result->succeeded()); + + $request = $this->createRequest([]); + $ocs = $this->createOCS($request, self::TEST_FILES_SHARING_API_USER1); + $result = $ocs->deleteShare($topId); + $this->assertTrue($result->succeeded()); + + $request = $this->createRequest([ + 'reshares' => 'true', + ]); + $ocs = $this->createOCS($request, self::TEST_FILES_SHARING_API_USER1); + $result = $ocs->getShares(); + $this->assertTrue($result->succeeded()); + + $this->assertEmpty($result->getData()); + } + + /** + * test for no invisible shares + * See: https://github.com/owncloud/core/issues/22295 + */ + public function testInvisibleSharesGroup() { + // simulate a post request + $request = $this->createRequest([ + 'path' => $this->folder, + 'shareWith' => self::TEST_FILES_SHARING_API_GROUP1, + 'shareType' => \OCP\Share::SHARE_TYPE_GROUP + ]); + $ocs = $this->createOCS($request, self::TEST_FILES_SHARING_API_USER1); + $result = $ocs->createShare(); + $this->assertTrue($result->succeeded()); + $data = $result->getData(); + + $topId = $data['id']; + + $request = $this->createRequest([ + 'path' => $this->folder . $this->subfolder, + 'shareType' => \OCP\Share::SHARE_TYPE_LINK, + ]); + $ocs = $this->createOCS($request, self::TEST_FILES_SHARING_API_USER2); + $result = $ocs->createShare(); + $this->assertTrue($result->succeeded()); + + $request = $this->createRequest([]); + $ocs = $this->createOCS($request, self::TEST_FILES_SHARING_API_USER1); + $result = $ocs->deleteShare($topId); + $this->assertTrue($result->succeeded()); + + $request = $this->createRequest([ + 'reshares' => 'true', + ]); + $ocs = $this->createOCS($request, self::TEST_FILES_SHARING_API_USER1); + $result = $ocs->getShares(); + $this->assertTrue($result->succeeded()); + + $this->assertEmpty($result->getData()); + } } diff --git a/apps/files_sharing/tests/migrationtest.php b/apps/files_sharing/tests/migrationtest.php index 8a40b76a642..1bca4a419f3 100644 --- a/apps/files_sharing/tests/migrationtest.php +++ b/apps/files_sharing/tests/migrationtest.php @@ -226,6 +226,23 @@ class MigrationTest extends TestCase { $this->assertSame(1, $query->execute() ); + + // Link reshare should keep its parent + $query->setParameter('share_type', \OCP\Share::SHARE_TYPE_LINK) + ->setParameter('share_with', null) + ->setParameter('uid_owner', 'user3') + ->setParameter('uid_initiator', '') + ->setParameter('parent', $parent) + ->setParameter('item_type', 'file') + ->setParameter('item_source', '2') + ->setParameter('item_target', '/2') + ->setParameter('file_source', 2) + ->setParameter('file_target', '/foobar') + ->setParameter('permissions', 31) + ->setParameter('stime', time()); + $this->assertSame(1, + $query->execute() + ); } public function testRemoveReShares() { @@ -238,7 +255,7 @@ class MigrationTest extends TestCase { $query = $this->connection->getQueryBuilder(); $query->select('*')->from($this->table)->orderBy('id'); $result = $query->execute()->fetchAll(); - $this->assertSame(9, count($result)); + $this->assertSame(10, count($result)); // shares which shouldn't be modified for ($i = 0; $i < 4; $i++) { @@ -261,6 +278,14 @@ class MigrationTest extends TestCase { $this->assertSame($user, $result[$i]['uid_initiator']); $this->assertNull($result[$i]['parent']); } + + /* + * The link share is flattend but has an owner to avoid invisible shares + * see: https://github.com/owncloud/core/pull/22317 + */ + $this->assertSame('owner2', $result[9]['uid_owner']); + $this->assertSame('user3', $result[9]['uid_initiator']); + $this->assertSame($result[7]['id'], $result[9]['parent']); } public function test1001DeepReshares() { diff --git a/apps/updatenotification/appinfo/app.php b/apps/updatenotification/appinfo/app.php index 99df99ac7c9..9148b6e6ef7 100644 --- a/apps/updatenotification/appinfo/app.php +++ b/apps/updatenotification/appinfo/app.php @@ -34,8 +34,7 @@ if(\OC::$server->getConfig()->getSystemValue('updatechecker', true) === true) { if(\OC::$server->getGroupManager()->isAdmin($userObject->getUID()) && $updateChecker->getUpdateState() !== []) { \OCP\Util::addScript('updatenotification', 'notification'); OC_Hook::connect('\OCP\Config', 'js', $updateChecker, 'getJavaScript'); + \OC_App::registerAdmin('updatenotification', 'admin'); } } - - \OC_App::registerAdmin('updatenotification', 'admin'); } diff --git a/apps/user_ldap/l10n/he.js b/apps/user_ldap/l10n/he.js index 48841ce9ef2..ef8976f9439 100644 --- a/apps/user_ldap/l10n/he.js +++ b/apps/user_ldap/l10n/he.js @@ -127,6 +127,12 @@ OC.L10N.register( "in bytes" : "בבתים", "Email Field" : "שדה דואר אלקטרוני", "Internal Username" : "שם משתמש פנימי", - "Internal Username Attribute:" : "מאפיין שם משתמש פנימי:" + "Internal Username Attribute:" : "מאפיין שם משתמש פנימי:", + "Override UUID detection" : "דריסת זיהוי UUID", + "UUID Attribute for Users:" : "מאפייני UUID למשתמשים:", + "UUID Attribute for Groups:" : "מאפייני UUID לקבוצות:", + "Username-LDAP User Mapping" : "מיפוי שם משתמש LDAP:", + "Clear Username-LDAP User Mapping" : "ניקוי מיפוי שם משתמש LDAP:", + "Clear Groupname-LDAP Group Mapping" : "ניקוי מיפוי שם משתמש קבוצה LDAP:" }, "nplurals=2; plural=(n != 1);"); diff --git a/apps/user_ldap/l10n/he.json b/apps/user_ldap/l10n/he.json index 5b7c4ade6a7..dfbdf689873 100644 --- a/apps/user_ldap/l10n/he.json +++ b/apps/user_ldap/l10n/he.json @@ -125,6 +125,12 @@ "in bytes" : "בבתים", "Email Field" : "שדה דואר אלקטרוני", "Internal Username" : "שם משתמש פנימי", - "Internal Username Attribute:" : "מאפיין שם משתמש פנימי:" + "Internal Username Attribute:" : "מאפיין שם משתמש פנימי:", + "Override UUID detection" : "דריסת זיהוי UUID", + "UUID Attribute for Users:" : "מאפייני UUID למשתמשים:", + "UUID Attribute for Groups:" : "מאפייני UUID לקבוצות:", + "Username-LDAP User Mapping" : "מיפוי שם משתמש LDAP:", + "Clear Username-LDAP User Mapping" : "ניקוי מיפוי שם משתמש LDAP:", + "Clear Groupname-LDAP Group Mapping" : "ניקוי מיפוי שם משתמש קבוצה LDAP:" },"pluralForm" :"nplurals=2; plural=(n != 1);" }
\ No newline at end of file diff --git a/core/css/icons.css b/core/css/icons.css index 836a84fd70e..359c55e4dc5 100644 --- a/core/css/icons.css +++ b/core/css/icons.css @@ -57,6 +57,10 @@ background-image: url('../img/actions/close.svg'); } +.icon-comment { + background-image: url('../img/actions/comment.svg'); +} + .icon-confirm { background-image: url('../img/actions/confirm.svg'); } @@ -70,6 +74,9 @@ .icon-delete:focus { background-image: url('../img/actions/delete-hover.svg'); } +.icon-delete-white { + background-image: url('../img/actions/delete-white.svg'); +} .icon-details { background-image: url('../img/actions/details.svg'); diff --git a/core/img/actions/comment.png b/core/img/actions/comment.png Binary files differindex 7ca20eba363..08867cf6361 100644 --- a/core/img/actions/comment.png +++ b/core/img/actions/comment.png diff --git a/core/img/actions/comment.svg b/core/img/actions/comment.svg index a8ab95e615b..02fbac3e036 100644 --- a/core/img/actions/comment.svg +++ b/core/img/actions/comment.svg @@ -1,4 +1,4 @@ <?xml version="1.0" encoding="UTF-8" standalone="no"?> -<svg xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://www.w3.org/2000/svg" height="16" width="16" version="1.0" xmlns:cc="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/"> - <path style="color:#000000;block-progression:tb;text-transform:none;text-indent:0" d="m2.3496 1.002c-0.1975 0.0382-0.3531 0.2333-0.3496 0.4375v13.122c0 0.23 0.2061 0.438 0.4316 0.438h11.138c0.226 0 0.432-0.208 0.432-0.438v-10.142c-0.004-0.0669-0.023-0.133-0.055-0.1915l-3.312-3.1992c-0.043-0.0164-0.089-0.0255-0.135-0.0273h-8.0684c-0.0268-0.00265-0.0552-0.00265-0.082 0zm1.6504 1.998h6v1h-6v-1zm0 3h5v1h-5v-1zm0 3h8v1h-8v-1zm0 3h4v1h-4v-1z"/> +<svg xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://www.w3.org/2000/svg" height="16" width="16" version="1.1" xmlns:cc="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/"> + <path d="m8 1.5c-4.4183 0-8 2.4624-8 5.5s3.5817 5.5 8 5.5c0.24963 0 0.49058-0.01587 0.73438-0.03125l4.2656 3.531v-4.703c1.829-1.008 3-2.5599 3-4.297 0-3.0376-3.582-5.5-8-5.5z"/> </svg> diff --git a/core/img/actions/delete-white.png b/core/img/actions/delete-white.png Binary files differnew file mode 100644 index 00000000000..07a5de34252 --- /dev/null +++ b/core/img/actions/delete-white.png diff --git a/core/img/actions/delete-white.svg b/core/img/actions/delete-white.svg new file mode 100644 index 00000000000..58e8dd3677d --- /dev/null +++ b/core/img/actions/delete-white.svg @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<svg xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://www.w3.org/2000/svg" height="16" width="16" version="1.1" xmlns:cc="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/"> + <path d="m6.5 1-0.5 1h-3c-0.554 0-1 0.446-1 1v1h12v-1c0-0.554-0.446-1-1-1h-3l-0.5-1zm-3.5 4 0.875 9c0.061 0.549 0.5729 1 1.125 1h6c0.55232 0 1.064-0.45102 1.125-1l0.875-9z" fill-rule="evenodd" fill="#fff"/> +</svg> diff --git a/core/js/share.js b/core/js/share.js index 9baa34d9bb7..9539e92e09b 100644 --- a/core/js/share.js +++ b/core/js/share.js @@ -50,17 +50,29 @@ OC.Share = _.extend(OC.Share || {}, { * @param callback function to call after the shares were loaded */ loadIcons:function(itemType, fileList, callback) { + var path = fileList.dirInfo.path; + if (path === '/') { + path = ''; + } + path += '/' + fileList.dirInfo.name; + // Load all share icons $.get( - OC.filePath('core', 'ajax', 'share.php'), + OC.linkToOCS('apps/files_sharing/api/v1', 2) + 'shares', { - fetch: 'getItemsSharedStatuses', - itemType: itemType + subfiles: 'true', + path: path, + format: 'json' }, function(result) { - if (result && result.status === 'success') { + if (result && result.ocs.meta.statuscode === 200) { OC.Share.statuses = {}; - $.each(result.data, function(item, data) { - OC.Share.statuses[item] = data; + $.each(result.ocs.data, function(it, share) { + if (!(share.item_source in OC.Share.statuses)) { + OC.Share.statuses[share.item_source] = {link: false}; + } + if (share.share_type === OC.Share.SHARE_TYPE_LINK) { + OC.Share.statuses[share.item_source] = {link: true}; + } }); if (_.isFunction(callback)) { callback(OC.Share.statuses); diff --git a/core/js/sharedialogview.js b/core/js/sharedialogview.js index 4cebf7962e8..ea7e198cb46 100644 --- a/core/js/sharedialogview.js +++ b/core/js/sharedialogview.js @@ -67,6 +67,10 @@ /** @type {object} **/ shareeListView: undefined, + events: { + 'input .shareWithField': 'onShareWithFieldChanged' + }, + initialize: function(options) { var view = this; @@ -109,7 +113,18 @@ : options[name]; } - _.bindAll(this, 'autocompleteHandler', '_onSelectRecipient'); + _.bindAll(this, + 'autocompleteHandler', + '_onSelectRecipient', + 'onShareWithFieldChanged' + ); + }, + + onShareWithFieldChanged: function() { + var $el = this.$el.find('.shareWithField'); + if ($el.val().length < 2) { + $el.removeClass('error').tooltip('hide'); + } }, autocompleteHandler: function (search, response) { @@ -196,9 +211,20 @@ var suggestions = users.concat(groups).concat(remotes); if (suggestions.length > 0) { - $('.shareWithField').autocomplete("option", "autoFocus", true); + $('.shareWithField').removeClass('error') + .tooltip('hide') + .autocomplete("option", "autoFocus", true); response(suggestions); } else { + $('.shareWithField').addClass('error') + .attr('data-original-title', t('core', 'No users or groups found for {search}', {search: $('.shareWithField').val()})) + .tooltip('hide') + .tooltip({ + placement: 'bottom', + trigger: 'manual', + }) + .tooltip('fixTitle') + .tooltip('show'); response(); } } else { diff --git a/lib/l10n/fi_FI.js b/lib/l10n/fi_FI.js index 909ceb20210..5da8b1e2ab5 100644 --- a/lib/l10n/fi_FI.js +++ b/lib/l10n/fi_FI.js @@ -57,6 +57,7 @@ OC.L10N.register( "Signature could not get checked. Please contact the app developer and check your admin screen." : "Allekirjoituksen tarkistaminen ei onnistunut. Ota yhteys sovelluskehittäjään ja tarkista ylläpitonäkymä.", "App can't be installed because of not allowed code in the App" : "Sovellusta ei voi asentaa, koska sovellus sisältää kiellettyä koodia", "App can't be installed because it is not compatible with this version of ownCloud" : "Sovellusta ei voi asentaa, koska se ei ole yhteensopiva käytössä olevan ownCloud-version kanssa", + "App can't be installed because the version in info.xml is not the same as the version reported from the app store" : "Sovelluksen asennus ei onnistu, koska sen info.xml:ssä ilmoitettu versio ei ole sama kuin sovelluskaupassa ilmoitettu versio", "Application is not enabled" : "Sovellusta ei ole otettu käyttöön", "Authentication error" : "Tunnistautumisvirhe", "Token expired. Please reload page." : "Valtuutus vanheni. Lataa sivu uudelleen.", @@ -76,6 +77,7 @@ OC.L10N.register( "Please remove the open_basedir setting within your php.ini or switch to 64-bit PHP." : "Poista open_basedir-asetus php.ini-tiedostosta tai vaihda 64-bittiseen PHP:hen.", "Set an admin username." : "Aseta ylläpitäjän käyttäjätunnus.", "Set an admin password." : "Aseta ylläpitäjän salasana.", + "Invalid Federated Cloud ID" : "Virheellinen federoidun pilven tunniste", "%s shared »%s« with you" : "%s jakoi kohteen »%s« kanssasi", "Sharing %s failed, because the file does not exist" : "Kohteen %s jakaminen epäonnistui, koska tiedostoa ei ole olemassa", "You are not allowed to share %s" : "Oikeutesi eivät riitä kohteen %s jakamiseen.", diff --git a/lib/l10n/fi_FI.json b/lib/l10n/fi_FI.json index 07a8082b187..8e6a639846c 100644 --- a/lib/l10n/fi_FI.json +++ b/lib/l10n/fi_FI.json @@ -55,6 +55,7 @@ "Signature could not get checked. Please contact the app developer and check your admin screen." : "Allekirjoituksen tarkistaminen ei onnistunut. Ota yhteys sovelluskehittäjään ja tarkista ylläpitonäkymä.", "App can't be installed because of not allowed code in the App" : "Sovellusta ei voi asentaa, koska sovellus sisältää kiellettyä koodia", "App can't be installed because it is not compatible with this version of ownCloud" : "Sovellusta ei voi asentaa, koska se ei ole yhteensopiva käytössä olevan ownCloud-version kanssa", + "App can't be installed because the version in info.xml is not the same as the version reported from the app store" : "Sovelluksen asennus ei onnistu, koska sen info.xml:ssä ilmoitettu versio ei ole sama kuin sovelluskaupassa ilmoitettu versio", "Application is not enabled" : "Sovellusta ei ole otettu käyttöön", "Authentication error" : "Tunnistautumisvirhe", "Token expired. Please reload page." : "Valtuutus vanheni. Lataa sivu uudelleen.", @@ -74,6 +75,7 @@ "Please remove the open_basedir setting within your php.ini or switch to 64-bit PHP." : "Poista open_basedir-asetus php.ini-tiedostosta tai vaihda 64-bittiseen PHP:hen.", "Set an admin username." : "Aseta ylläpitäjän käyttäjätunnus.", "Set an admin password." : "Aseta ylläpitäjän salasana.", + "Invalid Federated Cloud ID" : "Virheellinen federoidun pilven tunniste", "%s shared »%s« with you" : "%s jakoi kohteen »%s« kanssasi", "Sharing %s failed, because the file does not exist" : "Kohteen %s jakaminen epäonnistui, koska tiedostoa ei ole olemassa", "You are not allowed to share %s" : "Oikeutesi eivät riitä kohteen %s jakamiseen.", diff --git a/lib/l10n/fr.js b/lib/l10n/fr.js index 41c20253c59..08b83e8dc75 100644 --- a/lib/l10n/fr.js +++ b/lib/l10n/fr.js @@ -60,6 +60,7 @@ OC.L10N.register( "App can't be installed because of not allowed code in the App" : "L'application ne peut être installée car elle contient du code non-autorisé", "App can't be installed because it is not compatible with this version of ownCloud" : "L'application ne peut être installée car elle n'est pas compatible avec cette version de ownCloud", "App can't be installed because it contains the <shipped>true</shipped> tag which is not allowed for non shipped apps" : "L'application ne peut être installée car elle contient la balise <shipped>true</shipped> qui n'est pas autorisée pour les applications non incluses par défaut", + "App can't be installed because the version in info.xml is not the same as the version reported from the app store" : "L'App ne peut pas être installé car la version dans info.xml diffère de la version signalée par l' app store", "Application is not enabled" : "L'application n'est pas activée", "Authentication error" : "Erreur d'authentification", "Token expired. Please reload page." : "La session a expiré. Veuillez recharger la page.", diff --git a/lib/l10n/fr.json b/lib/l10n/fr.json index 51d12e90631..7541b6b93b0 100644 --- a/lib/l10n/fr.json +++ b/lib/l10n/fr.json @@ -58,6 +58,7 @@ "App can't be installed because of not allowed code in the App" : "L'application ne peut être installée car elle contient du code non-autorisé", "App can't be installed because it is not compatible with this version of ownCloud" : "L'application ne peut être installée car elle n'est pas compatible avec cette version de ownCloud", "App can't be installed because it contains the <shipped>true</shipped> tag which is not allowed for non shipped apps" : "L'application ne peut être installée car elle contient la balise <shipped>true</shipped> qui n'est pas autorisée pour les applications non incluses par défaut", + "App can't be installed because the version in info.xml is not the same as the version reported from the app store" : "L'App ne peut pas être installé car la version dans info.xml diffère de la version signalée par l' app store", "Application is not enabled" : "L'application n'est pas activée", "Authentication error" : "Erreur d'authentification", "Token expired. Please reload page." : "La session a expiré. Veuillez recharger la page.", diff --git a/lib/l10n/it.js b/lib/l10n/it.js index f8d41fa58a9..3265cc30edd 100644 --- a/lib/l10n/it.js +++ b/lib/l10n/it.js @@ -60,6 +60,7 @@ OC.L10N.register( "App can't be installed because of not allowed code in the App" : "L'applicazione non può essere installata a causa di codice non consentito al suo interno", "App can't be installed because it is not compatible with this version of ownCloud" : "L'applicazione non può essere installata poiché non è compatibile con questa versione di ownCloud", "App can't be installed because it contains the <shipped>true</shipped> tag which is not allowed for non shipped apps" : "L'applicazione non può essere installata poiché contiene il tag <shipped>true<shipped> che è consentito per le applicazioni native", + "App can't be installed because the version in info.xml is not the same as the version reported from the app store" : "L'applicazione non può essere installata poiché la versione nel file info.xml non è la stessa riportata dall'app store", "Application is not enabled" : "L'applicazione non è abilitata", "Authentication error" : "Errore di autenticazione", "Token expired. Please reload page." : "Token scaduto. Ricarica la pagina.", diff --git a/lib/l10n/it.json b/lib/l10n/it.json index 980d3cee0f9..c891d1a765c 100644 --- a/lib/l10n/it.json +++ b/lib/l10n/it.json @@ -58,6 +58,7 @@ "App can't be installed because of not allowed code in the App" : "L'applicazione non può essere installata a causa di codice non consentito al suo interno", "App can't be installed because it is not compatible with this version of ownCloud" : "L'applicazione non può essere installata poiché non è compatibile con questa versione di ownCloud", "App can't be installed because it contains the <shipped>true</shipped> tag which is not allowed for non shipped apps" : "L'applicazione non può essere installata poiché contiene il tag <shipped>true<shipped> che è consentito per le applicazioni native", + "App can't be installed because the version in info.xml is not the same as the version reported from the app store" : "L'applicazione non può essere installata poiché la versione nel file info.xml non è la stessa riportata dall'app store", "Application is not enabled" : "L'applicazione non è abilitata", "Authentication error" : "Errore di autenticazione", "Token expired. Please reload page." : "Token scaduto. Ricarica la pagina.", diff --git a/lib/l10n/pt_PT.js b/lib/l10n/pt_PT.js index 73ec11fbd7c..6d8efd9fc12 100644 --- a/lib/l10n/pt_PT.js +++ b/lib/l10n/pt_PT.js @@ -57,6 +57,7 @@ OC.L10N.register( "App can't be installed because of not allowed code in the App" : "A aplicação não pode ser instalado devido a código não permitido dentro da aplicação", "App can't be installed because it is not compatible with this version of ownCloud" : "A aplicação não pode ser instalada por não ser compatível com esta versão do ownCloud", "App can't be installed because it contains the <shipped>true</shipped> tag which is not allowed for non shipped apps" : "Esta aplicação não pode ser instalada por que contém o tag <shipped>true</shipped> que só é permitido para aplicações nativas", + "App can't be installed because the version in info.xml is not the same as the version reported from the app store" : "Esta aplicação não pode ser instalada porque a versão no info.xml não coincide com a reportada na loja de aplicações", "Application is not enabled" : "A aplicação não está activada", "Authentication error" : "Erro na autenticação", "Token expired. Please reload page." : "O token expirou. Por favor recarregue a página.", diff --git a/lib/l10n/pt_PT.json b/lib/l10n/pt_PT.json index b072a76540c..74a7438c422 100644 --- a/lib/l10n/pt_PT.json +++ b/lib/l10n/pt_PT.json @@ -55,6 +55,7 @@ "App can't be installed because of not allowed code in the App" : "A aplicação não pode ser instalado devido a código não permitido dentro da aplicação", "App can't be installed because it is not compatible with this version of ownCloud" : "A aplicação não pode ser instalada por não ser compatível com esta versão do ownCloud", "App can't be installed because it contains the <shipped>true</shipped> tag which is not allowed for non shipped apps" : "Esta aplicação não pode ser instalada por que contém o tag <shipped>true</shipped> que só é permitido para aplicações nativas", + "App can't be installed because the version in info.xml is not the same as the version reported from the app store" : "Esta aplicação não pode ser instalada porque a versão no info.xml não coincide com a reportada na loja de aplicações", "Application is not enabled" : "A aplicação não está activada", "Authentication error" : "Erro na autenticação", "Token expired. Please reload page." : "O token expirou. Por favor recarregue a página.", diff --git a/lib/l10n/sq.js b/lib/l10n/sq.js index 8125dd3d36a..afa5028e61e 100644 --- a/lib/l10n/sq.js +++ b/lib/l10n/sq.js @@ -60,6 +60,7 @@ OC.L10N.register( "App can't be installed because of not allowed code in the App" : "Aplikacioni s’mund të instalohet, për shkak kodi të palejuar te Aplikacioni", "App can't be installed because it is not compatible with this version of ownCloud" : "Aplikacioni s’mund të instalohet, ngaqë s’është i përputhshëm me këtë version të ownCloud-it", "App can't be installed because it contains the <shipped>true</shipped> tag which is not allowed for non shipped apps" : "Aplikacioni s’mund të instalohet, ngaqë përmban etiketën <shipped>true</shipped> e cila nuk lejohet për aplikacione që s’janë hedhur në qarkullim", + "App can't be installed because the version in info.xml is not the same as the version reported from the app store" : "Aplikacioni s’mund të instalohet, ngaqë versioni te info.xml s’është i njëjti me versionin e treguar nga shitorja e aplikacioneve", "Application is not enabled" : "Aplikacioni s’është aktivizuar", "Authentication error" : "Gabim mirëfilltësimi", "Token expired. Please reload page." : "Token-i ka skaduar. Ju lutemi, ringarkoni faqen.", diff --git a/lib/l10n/sq.json b/lib/l10n/sq.json index f0b843044f2..2f126b2d964 100644 --- a/lib/l10n/sq.json +++ b/lib/l10n/sq.json @@ -58,6 +58,7 @@ "App can't be installed because of not allowed code in the App" : "Aplikacioni s’mund të instalohet, për shkak kodi të palejuar te Aplikacioni", "App can't be installed because it is not compatible with this version of ownCloud" : "Aplikacioni s’mund të instalohet, ngaqë s’është i përputhshëm me këtë version të ownCloud-it", "App can't be installed because it contains the <shipped>true</shipped> tag which is not allowed for non shipped apps" : "Aplikacioni s’mund të instalohet, ngaqë përmban etiketën <shipped>true</shipped> e cila nuk lejohet për aplikacione që s’janë hedhur në qarkullim", + "App can't be installed because the version in info.xml is not the same as the version reported from the app store" : "Aplikacioni s’mund të instalohet, ngaqë versioni te info.xml s’është i njëjti me versionin e treguar nga shitorja e aplikacioneve", "Application is not enabled" : "Aplikacioni s’është aktivizuar", "Authentication error" : "Gabim mirëfilltësimi", "Token expired. Please reload page." : "Token-i ka skaduar. Ju lutemi, ringarkoni faqen.", diff --git a/lib/private/share20/defaultshareprovider.php b/lib/private/share20/defaultshareprovider.php index 0ab0dc81fa7..e18e306d7f6 100644 --- a/lib/private/share20/defaultshareprovider.php +++ b/lib/private/share20/defaultshareprovider.php @@ -118,6 +118,10 @@ class DefaultShareProvider implements IShareProvider { if ($share->getExpirationDate() !== null) { $qb->setValue('expiration', $qb->createNamedParameter($share->getExpirationDate(), 'datetime')); } + + if (method_exists($share, 'getParent')) { + $qb->setValue('parent', $qb->createNamedParameter($share->getParent())); + } } else { throw new \Exception('invalid share type!'); } diff --git a/lib/private/share20/manager.php b/lib/private/share20/manager.php index 4345784d2e7..7a10d6cba55 100644 --- a/lib/private/share20/manager.php +++ b/lib/private/share20/manager.php @@ -415,6 +415,28 @@ class Manager implements IManager { } /** + * To make sure we don't get invisible link shares we set the parent + * of a link if it is a reshare. This is a quick word around + * until we can properly display multiple link shares in the UI + * + * See: https://github.com/owncloud/core/issues/22295 + * + * FIXME: Remove once multiple link shares can be properly displayed + * + * @param \OCP\Share\IShare $share + */ + protected function setLinkParent(\OCP\Share\IShare $share) { + + // No sense in checking if the method is not there. + if (method_exists($share, 'setParent')) { + $storage = $share->getNode()->getStorage(); + if ($storage->instanceOfStorage('\OCA\Files_Sharing\ISharedStorage')) { + $share->setParent($storage->getShareId()); + } + }; + } + + /** * @param File|Folder $path */ protected function pathCreateChecks($path) { @@ -470,6 +492,7 @@ class Manager implements IManager { $this->groupCreateChecks($share); } else if ($share->getShareType() === \OCP\Share::SHARE_TYPE_LINK) { $this->linkCreateChecks($share); + $this->setLinkParent($share); /* * For now ignore a set token. @@ -695,9 +718,9 @@ class Manager implements IManager { * @throws \InvalidArgumentException */ public function deleteShare(\OCP\Share\IShare $share) { - // Just to make sure we have all the info + try { - $share = $this->getShareById($share->getFullId()); + $share->getFullId(); } catch (\UnexpectedValueException $e) { throw new \InvalidArgumentException('Share does not have a full id'); } diff --git a/lib/private/templatelayout.php b/lib/private/templatelayout.php index 7166b23d4c2..5afbd4495c4 100644 --- a/lib/private/templatelayout.php +++ b/lib/private/templatelayout.php @@ -72,7 +72,7 @@ class TemplateLayout extends \OC_Template { // Code integrity notification $integrityChecker = \OC::$server->getIntegrityCodeChecker(); - if(!$integrityChecker->hasPassedCheck()) { + if(\OC_User::isAdminUser(\OC_User::getUser()) && !$integrityChecker->hasPassedCheck()) { \OCP\Util::addScript('core', 'integritycheck-failed-notification'); } diff --git a/lib/private/user/user.php b/lib/private/user/user.php index cd9991796ec..7f34c261cbe 100644 --- a/lib/private/user/user.php +++ b/lib/private/user/user.php @@ -80,16 +80,14 @@ class User implements IUser { $this->uid = $uid; $this->backend = $backend; $this->emitter = $emitter; + if(is_null($config)) { + $config = \OC::$server->getConfig(); + } $this->config = $config; $this->urlGenerator = $urlGenerator; - if ($this->config) { - $enabled = $this->config->getUserValue($uid, 'core', 'enabled', 'true'); - $this->enabled = ($enabled === 'true'); - $this->lastLogin = $this->config->getUserValue($uid, 'login', 'lastLogin', 0); - } else { - $this->enabled = true; - $this->lastLogin = \OC::$server->getConfig()->getUserValue($uid, 'login', 'lastLogin', 0); - } + $enabled = $this->config->getUserValue($uid, 'core', 'enabled', 'true'); + $this->enabled = ($enabled === 'true'); + $this->lastLogin = $this->config->getUserValue($uid, 'login', 'lastLogin', 0); if (is_null($this->urlGenerator)) { $this->urlGenerator = \OC::$server->getURLGenerator(); } @@ -300,11 +298,10 @@ class User implements IUser { * @return bool */ public function canChangeDisplayName() { - if ($this->config and $this->config->getSystemValue('allow_user_to_change_display_name') === false) { + if ($this->config->getSystemValue('allow_user_to_change_display_name') === false) { return false; - } else { - return $this->backend->implementsActions(\OC_User_Backend::SET_DISPLAYNAME); } + return $this->backend->implementsActions(\OC_User_Backend::SET_DISPLAYNAME); } /** @@ -323,10 +320,8 @@ class User implements IUser { */ public function setEnabled($enabled) { $this->enabled = $enabled; - if ($this->config) { - $enabled = ($enabled) ? 'true' : 'false'; - $this->config->setUserValue($this->uid, 'core', 'enabled', $enabled); - } + $enabled = ($enabled) ? 'true' : 'false'; + $this->config->setUserValue($this->uid, 'core', 'enabled', $enabled); } /** diff --git a/tests/lib/files/storage/storage.php b/tests/lib/files/storage/storage.php index 42bd491df5c..f3d265df2de 100644 --- a/tests/lib/files/storage/storage.php +++ b/tests/lib/files/storage/storage.php @@ -608,4 +608,10 @@ abstract class Storage extends \Test\TestCase { $stat = $this->instance->stat('foo.txt'); $this->assertEquals(6, $stat['size']); } + + public function testPartFile() { + $this->instance->file_put_contents('bar.txt.part', 'bar'); + $this->instance->rename('bar.txt.part', 'bar.txt'); + $this->assertEquals('bar', $this->instance->file_get_contents('bar.txt')); + } } diff --git a/tests/lib/share20/managertest.php b/tests/lib/share20/managertest.php index 73a1b0a6530..bb91ed0d51e 100644 --- a/tests/lib/share20/managertest.php +++ b/tests/lib/share20/managertest.php @@ -132,16 +132,10 @@ class ManagerTest extends \Test\TestCase { } /** - * @expectedException \OCP\Share\Exceptions\ShareNotFound + * @expectedException \InvalidArgumentException */ public function testDeleteNoShareId() { - $share = $this->getMock('\OCP\Share\IShare'); - - $share - ->expects($this->once()) - ->method('getFullId') - ->with() - ->willReturn(null); + $share = $this->manager->newShare(); $this->manager->deleteShare($share); } @@ -181,7 +175,6 @@ class ManagerTest extends \Test\TestCase { ->setNode($path) ->setTarget('myTarget'); - $manager->expects($this->once())->method('getShareById')->with('prov:42')->willReturn($share); $manager->expects($this->once())->method('deleteChildren')->with($share); $this->defaultProvider @@ -261,7 +254,6 @@ class ManagerTest extends \Test\TestCase { $this->rootFolder->expects($this->never())->method($this->anything()); - $manager->expects($this->once())->method('getShareById')->with('prov:42')->willReturn($share); $manager->expects($this->once())->method('deleteChildren')->with($share); $this->defaultProvider @@ -359,8 +351,6 @@ class ManagerTest extends \Test\TestCase { ->setTarget('myTarget3') ->setParent(43); - $manager->expects($this->once())->method('getShareById')->with('prov:42')->willReturn($share1); - $this->defaultProvider ->method('getChildren') ->will($this->returnValueMap([ @@ -1549,6 +1539,7 @@ class ManagerTest extends \Test\TestCase { 'pathCreateChecks', 'validateExpirationDate', 'verifyPassword', + 'setLinkParent', ]) ->getMock(); @@ -1589,6 +1580,9 @@ class ManagerTest extends \Test\TestCase { $manager->expects($this->once()) ->method('verifyPassword') ->with('password'); + $manager->expects($this->once()) + ->method('setLinkParent') + ->with($share); $this->hasher->expects($this->once()) ->method('hash') |