Skip to content

Commit

Permalink
Merge branch 'master' into mrv/mfa-check-final
Browse files Browse the repository at this point in the history
  • Loading branch information
mrvahedi68 authored Jul 30, 2023
2 parents a808def + 4c10dc2 commit e206efd
Show file tree
Hide file tree
Showing 177 changed files with 974 additions and 1,340 deletions.
2 changes: 1 addition & 1 deletion 3rdparty
Submodule 3rdparty updated 1176 files
7 changes: 7 additions & 0 deletions apps/admin_audit/l10n/hi_IN.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
OC.L10N.register(
"admin_audit",
{
"Auditing / Logging" : "ऑडिटिंग/लॉगिंग",
"Provides logging abilities for Nextcloud such as logging file accesses or otherwise sensitive actions." : "नेक्स्टक्लाउड के लिए लॉगिंग क्षमताएं प्रदान करता है जैसे फ़ाइल एक्सेस या अन्यथा संवेदनशील कार्यों को लॉग करना।"
},
"nplurals=2; plural=(n != 1);");
5 changes: 5 additions & 0 deletions apps/admin_audit/l10n/hi_IN.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{ "translations": {
"Auditing / Logging" : "ऑडिटिंग/लॉगिंग",
"Provides logging abilities for Nextcloud such as logging file accesses or otherwise sensitive actions." : "नेक्स्टक्लाउड के लिए लॉगिंग क्षमताएं प्रदान करता है जैसे फ़ाइल एक्सेस या अन्यथा संवेदनशील कार्यों को लॉग करना।"
},"pluralForm" :"nplurals=2; plural=(n != 1);"
}
3 changes: 2 additions & 1 deletion apps/dav/l10n/ru.js
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,7 @@ OC.L10N.register(
"Please contact the organizer directly." : "Обратитесь к организатору напрямую.",
"Are you accepting the invitation?" : "Принять приглашение?",
"Tentative" : "Под вопросом",
"Your attendance was updated successfully." : "Статус участия обновлён."
"Your attendance was updated successfully." : "Статус участия обновлён.",
"%1$s has responded your invitation" : "%1$s ответил на ваше приглашение"
},
"nplurals=4; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<12 || n%100>14) ? 1 : n%10==0 || (n%10>=5 && n%10<=9) || (n%100>=11 && n%100<=14)? 2 : 3);");
3 changes: 2 additions & 1 deletion apps/dav/l10n/ru.json
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,7 @@
"Please contact the organizer directly." : "Обратитесь к организатору напрямую.",
"Are you accepting the invitation?" : "Принять приглашение?",
"Tentative" : "Под вопросом",
"Your attendance was updated successfully." : "Статус участия обновлён."
"Your attendance was updated successfully." : "Статус участия обновлён.",
"%1$s has responded your invitation" : "%1$s ответил на ваше приглашение"
},"pluralForm" :"nplurals=4; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<12 || n%100>14) ? 1 : n%10==0 || (n%10>=5 && n%10<=9) || (n%100>=11 && n%100<=14)? 2 : 3);"
}
1 change: 0 additions & 1 deletion apps/dav/lib/Connector/Sabre/Auth.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@
use OC\Authentication\Exceptions\PasswordLoginForbiddenException;
use OC\Authentication\TwoFactorAuth\Manager;
use OC\Security\Bruteforce\Throttler;
use OC\User\LoginException;
use OC\User\Session;
use OCA\DAV\Connector\Sabre\Exception\PasswordLoginForbidden;
use OCA\DAV\Connector\Sabre\Exception\TooManyRequests;
Expand Down
2 changes: 1 addition & 1 deletion apps/dav/lib/RootCollection.php
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ public function __construct() {
\OC::$server->getSystemTagObjectMapper(),
\OC::$server->getUserSession(),
$groupManager,
\OC::$server->getEventDispatcher()
$dispatcher
);
$systemTagInUseCollection = \OCP\Server::get(SystemTag\SystemTagsInUseCollection::class);
$commentsCollection = new Comments\RootCollection(
Expand Down
17 changes: 4 additions & 13 deletions apps/dav/lib/SystemTag/SystemTagsRelationsCollection.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,32 +26,22 @@
*/
namespace OCA\DAV\SystemTag;

use OCP\EventDispatcher\IEventDispatcher;
use OCP\IGroupManager;
use OCP\IUserSession;
use OCP\SystemTag\ISystemTagManager;
use OCP\SystemTag\ISystemTagObjectMapper;
use OCP\SystemTag\SystemTagsEntityEvent;
use Sabre\DAV\Exception\Forbidden;
use Sabre\DAV\SimpleCollection;
use Symfony\Component\EventDispatcher\EventDispatcherInterface;

class SystemTagsRelationsCollection extends SimpleCollection {

/**
* SystemTagsRelationsCollection constructor.
*
* @param ISystemTagManager $tagManager
* @param ISystemTagObjectMapper $tagMapper
* @param IUserSession $userSession
* @param IGroupManager $groupManager
* @param EventDispatcherInterface $dispatcher
*/
public function __construct(
ISystemTagManager $tagManager,
ISystemTagObjectMapper $tagMapper,
IUserSession $userSession,
IGroupManager $groupManager,
EventDispatcherInterface $dispatcher
IEventDispatcher $dispatcher,
) {
$children = [
new SystemTagsObjectTypeCollection(
Expand All @@ -67,8 +57,9 @@ function ($name) {
),
];

$event = new SystemTagsEntityEvent(SystemTagsEntityEvent::EVENT_ENTITY);
$event = new SystemTagsEntityEvent();
$dispatcher->dispatch(SystemTagsEntityEvent::EVENT_ENTITY, $event);
$dispatcher->dispatchTyped($event);

foreach ($event->getEntityCollections() as $entity => $entityExistsFunction) {
$children[] = new SystemTagsObjectTypeCollection(
Expand Down
76 changes: 54 additions & 22 deletions apps/dav/tests/unit/Connector/Sabre/NodeTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,20 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>
*
*/

namespace OCA\DAV\Tests\unit\Connector\Sabre;

use OC\Files\FileInfo;
use OC\Files\Mount\MountPoint;
use OC\Files\View;
use OC\Share20\ShareAttributes;
use OCA\Files_Sharing\SharedMount;
use OCA\Files_Sharing\SharedStorage;
use OCP\Constants;
use OCP\Files\Cache\ICacheEntry;
use OCP\Files\Mount\IMountPoint;
use OCP\Files\Storage;
use OCP\ICache;
use OCP\Share\IAttributes;
use OCP\Share\IManager;
use OCP\Share\IShare;
Expand All @@ -46,40 +52,66 @@
class NodeTest extends \Test\TestCase {
public function davPermissionsProvider() {
return [
[\OCP\Constants::PERMISSION_ALL, 'file', false, false, 'RGDNVW'],
[\OCP\Constants::PERMISSION_ALL, 'dir', false, false, 'RGDNVCK'],
[\OCP\Constants::PERMISSION_ALL, 'file', true, false, 'SRGDNVW'],
[\OCP\Constants::PERMISSION_ALL, 'file', true, true, 'SRMGDNVW'],
[\OCP\Constants::PERMISSION_ALL - \OCP\Constants::PERMISSION_SHARE, 'file', true, false, 'SGDNVW'],
[\OCP\Constants::PERMISSION_ALL - \OCP\Constants::PERMISSION_UPDATE, 'file', false, false, 'RGD'],
[\OCP\Constants::PERMISSION_ALL - \OCP\Constants::PERMISSION_DELETE, 'file', false, false, 'RGNVW'],
[\OCP\Constants::PERMISSION_ALL - \OCP\Constants::PERMISSION_CREATE, 'file', false, false, 'RGDNVW'],
[\OCP\Constants::PERMISSION_ALL - \OCP\Constants::PERMISSION_READ, 'file', false, false, 'RDNVW'],
[\OCP\Constants::PERMISSION_ALL - \OCP\Constants::PERMISSION_CREATE, 'dir', false, false, 'RGDNV'],
[\OCP\Constants::PERMISSION_ALL - \OCP\Constants::PERMISSION_READ, 'dir', false, false, 'RDNVCK'],
[Constants::PERMISSION_ALL, 'file', false, Constants::PERMISSION_ALL, false, 'test', 'RGDNVW'],
[Constants::PERMISSION_ALL, 'dir', false, Constants::PERMISSION_ALL, false, 'test', 'RGDNVCK'],
[Constants::PERMISSION_ALL, 'file', true, Constants::PERMISSION_ALL, false, 'test', 'SRGDNVW'],
[Constants::PERMISSION_ALL, 'file', true, Constants::PERMISSION_ALL, true, 'test', 'SRMGDNVW'],
[Constants::PERMISSION_ALL, 'file', true, Constants::PERMISSION_ALL, true, '' , 'SRMGDNVW'],
[Constants::PERMISSION_ALL, 'file', true, Constants::PERMISSION_ALL - Constants::PERMISSION_UPDATE, true, '' , 'SRMGDNV'],
[Constants::PERMISSION_ALL - Constants::PERMISSION_SHARE, 'file', true, Constants::PERMISSION_ALL, false, 'test', 'SGDNVW'],
[Constants::PERMISSION_ALL - Constants::PERMISSION_UPDATE, 'file', false, Constants::PERMISSION_ALL, false, 'test', 'RGD'],
[Constants::PERMISSION_ALL - Constants::PERMISSION_DELETE, 'file', false, Constants::PERMISSION_ALL, false, 'test', 'RGNVW'],
[Constants::PERMISSION_ALL - Constants::PERMISSION_CREATE, 'file', false, Constants::PERMISSION_ALL, false, 'test', 'RGDNVW'],
[Constants::PERMISSION_ALL - Constants::PERMISSION_READ, 'file', false, Constants::PERMISSION_ALL, false, 'test', 'RDNVW'],
[Constants::PERMISSION_ALL - Constants::PERMISSION_CREATE, 'dir', false, Constants::PERMISSION_ALL, false, 'test', 'RGDNV'],
[Constants::PERMISSION_ALL - Constants::PERMISSION_READ, 'dir', false, Constants::PERMISSION_ALL, false, 'test', 'RDNVCK'],
];
}

/**
* @dataProvider davPermissionsProvider
*/
public function testDavPermissions($permissions, $type, $shared, $mounted, $expected): void {
public function testDavPermissions($permissions, $type, $shared, $shareRootPermissions, $mounted, $internalPath, $expected): void {
$info = $this->getMockBuilder(FileInfo::class)
->disableOriginalConstructor()
->setMethods(['getPermissions', 'isShared', 'isMounted', 'getType'])
->onlyMethods(['getPermissions', 'isShared', 'isMounted', 'getType', 'getInternalPath', 'getStorage', 'getMountPoint'])
->getMock();
$info->expects($this->any())
->method('getPermissions')
$info->method('getPermissions')
->willReturn($permissions);
$info->expects($this->any())
->method('isShared')
$info->method('isShared')
->willReturn($shared);
$info->expects($this->any())
->method('isMounted')
$info->method('isMounted')
->willReturn($mounted);
$info->expects($this->any())
->method('getType')
$info->method('getType')
->willReturn($type);
$info->method('getInternalPath')
->willReturn($internalPath);
$info->method('getMountPoint')
->willReturnCallback(function() use ($shared) {
if ($shared) {
return $this->createMock(SharedMount::class);
} else {
return $this->createMock(MountPoint::class);
}
});
$storage = $this->createMock(Storage\IStorage::class);
if ($shared) {
$storage->method('instanceOfStorage')
->willReturn(true);
$cache = $this->createMock(ICache::class);
$storage->method('getCache')
->willReturn($cache);
$shareRootEntry = $this->createMock(ICacheEntry::class);
$cache->method('get')
->willReturn($shareRootEntry);
$shareRootEntry->method('getPermissions')
->willReturn($shareRootPermissions);
} else {
$storage->method('instanceOfStorage')
->willReturn(false);
}
$info->method('getStorage')
->willReturn($storage);
$view = $this->getMockBuilder(View::class)
->disableOriginalConstructor()
->getMock();
Expand Down Expand Up @@ -256,7 +288,7 @@ public function testSanitizeMtime($mtime, $expected): void {

public function invalidSanitizeMtimeProvider() {
return [
[-1337], [0], ['abcdef'], ['-1337'], ['0'], [12321], [24 * 60 * 60 - 1]
[-1337], [0], ['abcdef'], ['-1337'], ['0'], [12321], [24 * 60 * 60 - 1],
];
}

Expand Down
6 changes: 3 additions & 3 deletions apps/federatedfilesharing/l10n/gl.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ OC.L10N.register(
"Decline" : "Declinar",
"Federated Cloud Sharing" : "Nube federada compartida",
"Sharing" : "Compartindo",
"Federated file sharing" : "Compartir ficheiros en federación",
"Federated file sharing" : "Compartición federada de ficheiros",
"Provide federated file sharing across servers" : "Fornece a compartición federada de ficheiros entre servidores",
"Adjust how people can share between servers. This includes shares between users on this server as well if they are using federated sharing." : "Axuste a forma como as persoas poden compartir entre servidores. Isto inclúe tamén as comparticións entre usuarios deste servidor se están a usar a compartición federada.",
"Allow users on this server to send shares to other servers (this option also allows WebDAV access to public shares)" : "Permitirlle aos usuarios deste servidor enviar comparticións a outros servidores (esta opción tamén permite o acceso de WebDAV a comparticións públicas)",
Expand All @@ -47,13 +47,13 @@ OC.L10N.register(
"Share with me via Nextcloud" : "Comparte comigo a través de Nextcloud",
"HTML Code:" : "Código HTML:",
"Share with me through my #Nextcloud Federated Cloud ID, see {url}" : "Comparte comigo a través do meu #Nextcloud Federated Cloud ID, ver {url}",
"Share with me through my #Nextcloud Federated Cloud ID" : "Comparte comigo a través do meu ID da nube federada do #Nextcloud",
"Share with me through my #Nextcloud Federated Cloud ID" : "Comparte comigo a través do meu ID da nube federada de #Nextcloud",
"Cloud ID copied to the clipboard" : "O identificador de nube (Cloud ID) (foi copiado no portapapeis",
"Copy to clipboard" : "Copiar no portapapeis.",
"Clipboard is not available" : "O portapapeis non está dispoñíbel",
"Copied!" : "Copiado!",
"You received \"%3$s\" as a remote share from %4$s (%1$s) (on behalf of %5$s (%2$s))" : "Vde. recibiu «%3$s» como un elemento compartido remoto de %4$s (%1$s) (de parte de %5$s (%2$s))",
"You received \"%3$s\" as a remote share from %4$s (%1$s)" : "Vde. recibiu «%3$s» como un elemento compartido remoto de %4$s (%1$s)",
"Share with me through my #Nextcloud Federated Cloud ID, see %s" : "Comparte comigo a través do meu ID da nube federada do #Nextcloud , vexa %s"
"Share with me through my #Nextcloud Federated Cloud ID, see %s" : "Comparte comigo a través do meu ID da nube federada de #Nextcloud , vexa %s"
},
"nplurals=2; plural=(n != 1);");
6 changes: 3 additions & 3 deletions apps/federatedfilesharing/l10n/gl.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"Decline" : "Declinar",
"Federated Cloud Sharing" : "Nube federada compartida",
"Sharing" : "Compartindo",
"Federated file sharing" : "Compartir ficheiros en federación",
"Federated file sharing" : "Compartición federada de ficheiros",
"Provide federated file sharing across servers" : "Fornece a compartición federada de ficheiros entre servidores",
"Adjust how people can share between servers. This includes shares between users on this server as well if they are using federated sharing." : "Axuste a forma como as persoas poden compartir entre servidores. Isto inclúe tamén as comparticións entre usuarios deste servidor se están a usar a compartición federada.",
"Allow users on this server to send shares to other servers (this option also allows WebDAV access to public shares)" : "Permitirlle aos usuarios deste servidor enviar comparticións a outros servidores (esta opción tamén permite o acceso de WebDAV a comparticións públicas)",
Expand All @@ -45,13 +45,13 @@
"Share with me via Nextcloud" : "Comparte comigo a través de Nextcloud",
"HTML Code:" : "Código HTML:",
"Share with me through my #Nextcloud Federated Cloud ID, see {url}" : "Comparte comigo a través do meu #Nextcloud Federated Cloud ID, ver {url}",
"Share with me through my #Nextcloud Federated Cloud ID" : "Comparte comigo a través do meu ID da nube federada do #Nextcloud",
"Share with me through my #Nextcloud Federated Cloud ID" : "Comparte comigo a través do meu ID da nube federada de #Nextcloud",
"Cloud ID copied to the clipboard" : "O identificador de nube (Cloud ID) (foi copiado no portapapeis",
"Copy to clipboard" : "Copiar no portapapeis.",
"Clipboard is not available" : "O portapapeis non está dispoñíbel",
"Copied!" : "Copiado!",
"You received \"%3$s\" as a remote share from %4$s (%1$s) (on behalf of %5$s (%2$s))" : "Vde. recibiu «%3$s» como un elemento compartido remoto de %4$s (%1$s) (de parte de %5$s (%2$s))",
"You received \"%3$s\" as a remote share from %4$s (%1$s)" : "Vde. recibiu «%3$s» como un elemento compartido remoto de %4$s (%1$s)",
"Share with me through my #Nextcloud Federated Cloud ID, see %s" : "Comparte comigo a través do meu ID da nube federada do #Nextcloud , vexa %s"
"Share with me through my #Nextcloud Federated Cloud ID, see %s" : "Comparte comigo a través do meu ID da nube federada de #Nextcloud , vexa %s"
},"pluralForm" :"nplurals=2; plural=(n != 1);"
}
2 changes: 1 addition & 1 deletion apps/federatedfilesharing/l10n/zh_CN.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ OC.L10N.register(
"You can share with anyone who uses a Nextcloud server or other Open Cloud Mesh (OCM) compatible servers and services! Just put their Federated Cloud ID in the share dialog. It looks like person@cloud.example.com" : "您可以和使用了 Nextcloud 服务器或其他兼容 Open Cloud Mesh(OCM)的服务器和服务的任何人共享!只需将他们的联合云 ID 放在共享对话框中。联合云 ID 看起来像 person@cloud.example.com",
"Your Federated Cloud ID:" : "您的联合云 ID:",
"Share it so your friends can share files with you:" : "使用共享,以便您的朋友可以与您共享文件:",
"Twitter" : "推特",
"Twitter" : "Twitter",
"Add to your website" : "添加到您的网站",
"Share with me via Nextcloud" : "通过联合云与我共享",
"HTML Code:" : "HTML 代码:",
Expand Down
2 changes: 1 addition & 1 deletion apps/federatedfilesharing/l10n/zh_CN.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"You can share with anyone who uses a Nextcloud server or other Open Cloud Mesh (OCM) compatible servers and services! Just put their Federated Cloud ID in the share dialog. It looks like person@cloud.example.com" : "您可以和使用了 Nextcloud 服务器或其他兼容 Open Cloud Mesh(OCM)的服务器和服务的任何人共享!只需将他们的联合云 ID 放在共享对话框中。联合云 ID 看起来像 person@cloud.example.com",
"Your Federated Cloud ID:" : "您的联合云 ID:",
"Share it so your friends can share files with you:" : "使用共享,以便您的朋友可以与您共享文件:",
"Twitter" : "推特",
"Twitter" : "Twitter",
"Add to your website" : "添加到您的网站",
"Share with me via Nextcloud" : "通过联合云与我共享",
"HTML Code:" : "HTML 代码:",
Expand Down
8 changes: 4 additions & 4 deletions apps/files/l10n/gl.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,13 +87,13 @@ OC.L10N.register(
"File name cannot be empty." : "O nome de ficheiro non pode estar baleiro",
"\"/\" is not allowed inside a file name." : "«/» non está permitido nun nome de ficheiro",
"\"{name}\" is not an allowed filetype" : "«{name}» non é un tipo de ficheiro permitido",
"Storage of {owner} is full, files cannot be updated or synced anymore!" : "A almacenaxe de {owner} está chea, non é posíbel actualizar nin sincronizar os ficheiros!",
"Storage of {owner} is full, files cannot be updated or synced anymore!" : "O espazo de almacenamento de {owner} está cheo, xa é posíbel actualizar nin sincronizar os ficheiros!",
"Group folder \"{mountPoint}\" is full, files cannot be updated or synced anymore!" : "O cartafol «{mountPoint}» do grupo está completo, non se poderán actualizar nin sincronizar ficheiros!",
"External storage \"{mountPoint}\" is full, files cannot be updated or synced anymore!" : "A almacenaxe externa «{mountPoint}» está chea, non é posíbel actualizar ou sincronizar ficheiros!",
"Your storage is full, files cannot be updated or synced anymore!" : "A almacenaxe está chea, non é posíbel sincronizar ou actualizar ficheiros!",
"External storage \"{mountPoint}\" is full, files cannot be updated or synced anymore!" : "O almacenamento externo «{mountPoint}» está cheo, xa non é posíbel actualizar nin sincronizar os ficheiros.",
"Your storage is full, files cannot be updated or synced anymore!" : "O seu espazo de almacenamento está cheo, xa non é posíbel actualizar nin sincronizar os ficheiros!",
"Storage of {owner} is almost full ({usedSpacePercent}%)." : "O espazo de almacenamento de {owner} está case cheo ({usedSpacePercent}%).",
"Group folder \"{mountPoint}\" is almost full ({usedSpacePercent}%)." : "O cartafol de grupo «{mountPoint}» está case cheo ({usedSpacePercent}%).",
"External storage \"{mountPoint}\" is almost full ({usedSpacePercent}%)." : "O almacenamento externo «{mountPoint}» está case cheo ({usedSpacePercent}%).",
"External storage \"{mountPoint}\" is almost full ({usedSpacePercent}%)." : "O almacenamento externo «{mountPoint}» está case cheo ({usedSpacePercent}%)",
"Your storage is almost full ({usedSpacePercent}%)." : "O seu espazo de almacenamento está case cheo ({usedSpacePercent}%).",
"_matches \"{filter}\"_::_match \"{filter}\"_" : ["coincide con «{filter}»","coinciden con «{filter}»"],
"View in folder" : "Ver no cartafol",
Expand Down
Loading

0 comments on commit e206efd

Please sign in to comment.