diff options
Diffstat (limited to 'apps')
530 files changed, 4077 insertions, 3041 deletions
diff --git a/apps/admin_audit/composer/composer/autoload_classmap.php b/apps/admin_audit/composer/composer/autoload_classmap.php index 8bfa01ccfdc..b67d90e7689 100644 --- a/apps/admin_audit/composer/composer/autoload_classmap.php +++ b/apps/admin_audit/composer/composer/autoload_classmap.php @@ -8,20 +8,22 @@ $baseDir = $vendorDir; return array( 'Composer\\InstalledVersions' => $vendorDir . '/composer/InstalledVersions.php', 'OCA\\AdminAudit\\Actions\\Action' => $baseDir . '/../lib/Actions/Action.php', - 'OCA\\AdminAudit\\Actions\\AppManagement' => $baseDir . '/../lib/Actions/AppManagement.php', - 'OCA\\AdminAudit\\Actions\\Auth' => $baseDir . '/../lib/Actions/Auth.php', - 'OCA\\AdminAudit\\Actions\\Console' => $baseDir . '/../lib/Actions/Console.php', 'OCA\\AdminAudit\\Actions\\Files' => $baseDir . '/../lib/Actions/Files.php', - 'OCA\\AdminAudit\\Actions\\GroupManagement' => $baseDir . '/../lib/Actions/GroupManagement.php', - 'OCA\\AdminAudit\\Actions\\Security' => $baseDir . '/../lib/Actions/Security.php', 'OCA\\AdminAudit\\Actions\\Sharing' => $baseDir . '/../lib/Actions/Sharing.php', 'OCA\\AdminAudit\\Actions\\TagManagement' => $baseDir . '/../lib/Actions/TagManagement.php', 'OCA\\AdminAudit\\Actions\\Trashbin' => $baseDir . '/../lib/Actions/Trashbin.php', - 'OCA\\AdminAudit\\Actions\\UserManagement' => $baseDir . '/../lib/Actions/UserManagement.php', 'OCA\\AdminAudit\\Actions\\Versions' => $baseDir . '/../lib/Actions/Versions.php', 'OCA\\AdminAudit\\AppInfo\\Application' => $baseDir . '/../lib/AppInfo/Application.php', 'OCA\\AdminAudit\\AuditLogger' => $baseDir . '/../lib/AuditLogger.php', 'OCA\\AdminAudit\\BackgroundJobs\\Rotate' => $baseDir . '/../lib/BackgroundJobs/Rotate.php', 'OCA\\AdminAudit\\IAuditLogger' => $baseDir . '/../lib/IAuditLogger.php', + 'OCA\\AdminAudit\\Listener\\AppManagementEventListener' => $baseDir . '/../lib/Listener/AppManagementEventListener.php', + 'OCA\\AdminAudit\\Listener\\AuthEventListener' => $baseDir . '/../lib/Listener/AuthEventListener.php', + 'OCA\\AdminAudit\\Listener\\ConsoleEventListener' => $baseDir . '/../lib/Listener/ConsoleEventListener.php', 'OCA\\AdminAudit\\Listener\\CriticalActionPerformedEventListener' => $baseDir . '/../lib/Listener/CriticalActionPerformedEventListener.php', + 'OCA\\AdminAudit\\Listener\\FileEventListener' => $baseDir . '/../lib/Listener/FileEventListener.php', + 'OCA\\AdminAudit\\Listener\\GroupManagementEventListener' => $baseDir . '/../lib/Listener/GroupManagementEventListener.php', + 'OCA\\AdminAudit\\Listener\\SecurityEventListener' => $baseDir . '/../lib/Listener/SecurityEventListener.php', + 'OCA\\AdminAudit\\Listener\\SharingEventListener' => $baseDir . '/../lib/Listener/SharingEventListener.php', + 'OCA\\AdminAudit\\Listener\\UserManagementEventListener' => $baseDir . '/../lib/Listener/UserManagementEventListener.php', ); diff --git a/apps/admin_audit/composer/composer/autoload_static.php b/apps/admin_audit/composer/composer/autoload_static.php index 506e7fad226..f8fd457edd8 100644 --- a/apps/admin_audit/composer/composer/autoload_static.php +++ b/apps/admin_audit/composer/composer/autoload_static.php @@ -23,22 +23,24 @@ class ComposerStaticInitAdminAudit public static $classMap = array ( 'Composer\\InstalledVersions' => __DIR__ . '/..' . '/composer/InstalledVersions.php', 'OCA\\AdminAudit\\Actions\\Action' => __DIR__ . '/..' . '/../lib/Actions/Action.php', - 'OCA\\AdminAudit\\Actions\\AppManagement' => __DIR__ . '/..' . '/../lib/Actions/AppManagement.php', - 'OCA\\AdminAudit\\Actions\\Auth' => __DIR__ . '/..' . '/../lib/Actions/Auth.php', - 'OCA\\AdminAudit\\Actions\\Console' => __DIR__ . '/..' . '/../lib/Actions/Console.php', 'OCA\\AdminAudit\\Actions\\Files' => __DIR__ . '/..' . '/../lib/Actions/Files.php', - 'OCA\\AdminAudit\\Actions\\GroupManagement' => __DIR__ . '/..' . '/../lib/Actions/GroupManagement.php', - 'OCA\\AdminAudit\\Actions\\Security' => __DIR__ . '/..' . '/../lib/Actions/Security.php', 'OCA\\AdminAudit\\Actions\\Sharing' => __DIR__ . '/..' . '/../lib/Actions/Sharing.php', 'OCA\\AdminAudit\\Actions\\TagManagement' => __DIR__ . '/..' . '/../lib/Actions/TagManagement.php', 'OCA\\AdminAudit\\Actions\\Trashbin' => __DIR__ . '/..' . '/../lib/Actions/Trashbin.php', - 'OCA\\AdminAudit\\Actions\\UserManagement' => __DIR__ . '/..' . '/../lib/Actions/UserManagement.php', 'OCA\\AdminAudit\\Actions\\Versions' => __DIR__ . '/..' . '/../lib/Actions/Versions.php', 'OCA\\AdminAudit\\AppInfo\\Application' => __DIR__ . '/..' . '/../lib/AppInfo/Application.php', 'OCA\\AdminAudit\\AuditLogger' => __DIR__ . '/..' . '/../lib/AuditLogger.php', 'OCA\\AdminAudit\\BackgroundJobs\\Rotate' => __DIR__ . '/..' . '/../lib/BackgroundJobs/Rotate.php', 'OCA\\AdminAudit\\IAuditLogger' => __DIR__ . '/..' . '/../lib/IAuditLogger.php', + 'OCA\\AdminAudit\\Listener\\AppManagementEventListener' => __DIR__ . '/..' . '/../lib/Listener/AppManagementEventListener.php', + 'OCA\\AdminAudit\\Listener\\AuthEventListener' => __DIR__ . '/..' . '/../lib/Listener/AuthEventListener.php', + 'OCA\\AdminAudit\\Listener\\ConsoleEventListener' => __DIR__ . '/..' . '/../lib/Listener/ConsoleEventListener.php', 'OCA\\AdminAudit\\Listener\\CriticalActionPerformedEventListener' => __DIR__ . '/..' . '/../lib/Listener/CriticalActionPerformedEventListener.php', + 'OCA\\AdminAudit\\Listener\\FileEventListener' => __DIR__ . '/..' . '/../lib/Listener/FileEventListener.php', + 'OCA\\AdminAudit\\Listener\\GroupManagementEventListener' => __DIR__ . '/..' . '/../lib/Listener/GroupManagementEventListener.php', + 'OCA\\AdminAudit\\Listener\\SecurityEventListener' => __DIR__ . '/..' . '/../lib/Listener/SecurityEventListener.php', + 'OCA\\AdminAudit\\Listener\\SharingEventListener' => __DIR__ . '/..' . '/../lib/Listener/SharingEventListener.php', + 'OCA\\AdminAudit\\Listener\\UserManagementEventListener' => __DIR__ . '/..' . '/../lib/Listener/UserManagementEventListener.php', ); public static function getInitializer(ClassLoader $loader) diff --git a/apps/admin_audit/lib/Actions/AppManagement.php b/apps/admin_audit/lib/Actions/AppManagement.php deleted file mode 100644 index 44907c856da..00000000000 --- a/apps/admin_audit/lib/Actions/AppManagement.php +++ /dev/null @@ -1,42 +0,0 @@ -<?php - -declare(strict_types=1); -/** - * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors - * SPDX-License-Identifier: AGPL-3.0-or-later - */ -namespace OCA\AdminAudit\Actions; - -class AppManagement extends Action { - - /** - * @param string $appName - */ - public function enableApp(string $appName): void { - $this->log('App "%s" enabled', - ['app' => $appName], - ['app'] - ); - } - - /** - * @param string $appName - * @param string[] $groups - */ - public function enableAppForGroups(string $appName, array $groups): void { - $this->log('App "%1$s" enabled for groups: %2$s', - ['app' => $appName, 'groups' => implode(', ', $groups)], - ['app', 'groups'] - ); - } - - /** - * @param string $appName - */ - public function disableApp(string $appName): void { - $this->log('App "%s" disabled', - ['app' => $appName], - ['app'] - ); - } -} diff --git a/apps/admin_audit/lib/Actions/Auth.php b/apps/admin_audit/lib/Actions/Auth.php deleted file mode 100644 index 55a87cf170f..00000000000 --- a/apps/admin_audit/lib/Actions/Auth.php +++ /dev/null @@ -1,45 +0,0 @@ -<?php - -declare(strict_types=1); -/** - * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors - * SPDX-License-Identifier: AGPL-3.0-or-later - */ -namespace OCA\AdminAudit\Actions; - -/** - * Class Auth logs all auth related actions - * - * @package OCA\AdminAudit\Actions - */ -class Auth extends Action { - public function loginAttempt(array $params): void { - $this->log( - 'Login attempt: "%s"', - $params, - [ - 'uid', - ], - true - ); - } - - public function loginSuccessful(array $params): void { - $this->log( - 'Login successful: "%s"', - $params, - [ - 'uid', - ], - true - ); - } - - public function logout(array $params): void { - $this->log( - 'Logout occurred', - [], - [] - ); - } -} diff --git a/apps/admin_audit/lib/Actions/Console.php b/apps/admin_audit/lib/Actions/Console.php deleted file mode 100644 index a41fa88bdad..00000000000 --- a/apps/admin_audit/lib/Actions/Console.php +++ /dev/null @@ -1,28 +0,0 @@ -<?php - -declare(strict_types=1); -/** - * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors - * SPDX-License-Identifier: AGPL-3.0-or-later - */ -namespace OCA\AdminAudit\Actions; - -class Console extends Action { - /** - * @param array $arguments - */ - public function runCommand(array $arguments): void { - if (!isset($arguments[1]) || $arguments[1] === '_completion') { - // Don't log autocompletion - return; - } - - // Remove `./occ` - array_shift($arguments); - - $this->log('Console command executed: %s', - ['arguments' => implode(' ', $arguments)], - ['arguments'] - ); - } -} diff --git a/apps/admin_audit/lib/Actions/Files.php b/apps/admin_audit/lib/Actions/Files.php index 50448e88f70..5c08640d2d2 100644 --- a/apps/admin_audit/lib/Actions/Files.php +++ b/apps/admin_audit/lib/Actions/Files.php @@ -18,7 +18,6 @@ use OCP\Files\Events\Node\NodeRenamedEvent; use OCP\Files\Events\Node\NodeWrittenEvent; use OCP\Files\InvalidPathException; use OCP\Files\NotFoundException; -use OCP\Preview\BeforePreviewFetchedEvent; use Psr\Log\LoggerInterface; /** @@ -229,33 +228,4 @@ class Files extends Action { array_keys($params) ); } - - /** - * Logs preview access to a file - * - * @param BeforePreviewFetchedEvent $event - */ - public function preview(BeforePreviewFetchedEvent $event): void { - try { - $file = $event->getNode(); - $params = [ - 'id' => $file->getId(), - 'width' => $event->getWidth(), - 'height' => $event->getHeight(), - 'crop' => $event->isCrop(), - 'mode' => $event->getMode(), - 'path' => mb_substr($file->getInternalPath(), 5) - ]; - } catch (InvalidPathException|NotFoundException $e) { - \OCP\Server::get(LoggerInterface::class)->error( - 'Exception thrown in file preview: '.$e->getMessage(), ['app' => 'admin_audit', 'exception' => $e] - ); - return; - } - $this->log( - 'Preview accessed: (id: "%s", width: "%s", height: "%s" crop: "%s", mode: "%s", path: "%s")', - $params, - array_keys($params) - ); - } } diff --git a/apps/admin_audit/lib/Actions/GroupManagement.php b/apps/admin_audit/lib/Actions/GroupManagement.php deleted file mode 100644 index 8fb6a037fbf..00000000000 --- a/apps/admin_audit/lib/Actions/GroupManagement.php +++ /dev/null @@ -1,87 +0,0 @@ -<?php - -declare(strict_types=1); -/** - * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors - * SPDX-License-Identifier: AGPL-3.0-or-later - */ -namespace OCA\AdminAudit\Actions; - -use OCP\IGroup; -use OCP\IUser; - -/** - * Class GroupManagement logs all group manager related events - * - * @package OCA\AdminAudit\Actions - */ -class GroupManagement extends Action { - - /** - * log add user to group event - * - * @param IGroup $group - * @param IUser $user - */ - public function addUser(IGroup $group, IUser $user): void { - $this->log('User "%s" added to group "%s"', - [ - 'group' => $group->getGID(), - 'user' => $user->getUID() - ], - [ - 'user', 'group' - ] - ); - } - - /** - * log remove user from group event - * - * @param IGroup $group - * @param IUser $user - */ - public function removeUser(IGroup $group, IUser $user): void { - $this->log('User "%s" removed from group "%s"', - [ - 'group' => $group->getGID(), - 'user' => $user->getUID() - ], - [ - 'user', 'group' - ] - ); - } - - /** - * log create group to group event - * - * @param IGroup $group - */ - public function createGroup(IGroup $group): void { - $this->log('Group created: "%s"', - [ - 'group' => $group->getGID() - ], - [ - 'group' - ] - ); - } - - /** - * log delete group to group event - * - * @param IGroup $group - */ - public function deleteGroup(IGroup $group): void { - $this->log('Group deleted: "%s"', - [ - 'group' => $group->getGID() - ], - [ - 'group' - ] - ); - } -} diff --git a/apps/admin_audit/lib/Actions/Security.php b/apps/admin_audit/lib/Actions/Security.php deleted file mode 100644 index 203090795fb..00000000000 --- a/apps/admin_audit/lib/Actions/Security.php +++ /dev/null @@ -1,60 +0,0 @@ -<?php - -declare(strict_types=1); -/** - * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors - * SPDX-License-Identifier: AGPL-3.0-or-later - */ -namespace OCA\AdminAudit\Actions; - -use OCP\Authentication\TwoFactorAuth\IProvider; -use OCP\IUser; - -/** - * Class Sharing logs the sharing actions - * - * @package OCA\AdminAudit\Actions - */ -class Security extends Action { - /** - * Logs failed twofactor challenge - */ - public function twofactorFailed(IUser $user, IProvider $provider): void { - $params = [ - 'displayName' => $user->getDisplayName(), - 'uid' => $user->getUID(), - 'provider' => $provider->getDisplayName(), - ]; - - $this->log( - 'Failed two factor attempt by user %s (%s) with provider %s', - $params, - [ - 'displayName', - 'uid', - 'provider', - ] - ); - } - - /** - * Logs successful twofactor challenge - */ - public function twofactorSuccess(IUser $user, IProvider $provider): void { - $params = [ - 'displayName' => $user->getDisplayName(), - 'uid' => $user->getUID(), - 'provider' => $provider->getDisplayName(), - ]; - - $this->log( - 'Successful two factor attempt by user %s (%s) with provider %s', - $params, - [ - 'displayName', - 'uid', - 'provider', - ] - ); - } -} diff --git a/apps/admin_audit/lib/Actions/Sharing.php b/apps/admin_audit/lib/Actions/Sharing.php index bca2b6eecac..8f021d5f210 100644 --- a/apps/admin_audit/lib/Actions/Sharing.php +++ b/apps/admin_audit/lib/Actions/Sharing.php @@ -7,279 +7,12 @@ declare(strict_types=1); */ namespace OCA\AdminAudit\Actions; -use OCP\Share\IShare; - /** * Class Sharing logs the sharing actions * * @package OCA\AdminAudit\Actions */ class Sharing extends Action { - /** - * Logs sharing of data - * - * @param array $params - */ - public function shared(array $params): void { - if ($params['shareType'] === IShare::TYPE_LINK) { - $this->log( - 'The %s "%s" with ID "%s" has been shared via link with permissions "%s" (Share ID: %s)', - $params, - [ - 'itemType', - 'path', - 'itemSource', - 'permissions', - 'id', - ] - ); - } elseif ($params['shareType'] === IShare::TYPE_USER) { - $this->log( - 'The %s "%s" with ID "%s" has been shared to the user "%s" with permissions "%s" (Share ID: %s)', - $params, - [ - 'itemType', - 'path', - 'itemSource', - 'shareWith', - 'permissions', - 'id', - ] - ); - } elseif ($params['shareType'] === IShare::TYPE_GROUP) { - $this->log( - 'The %s "%s" with ID "%s" has been shared to the group "%s" with permissions "%s" (Share ID: %s)', - $params, - [ - 'itemType', - 'path', - 'itemSource', - 'shareWith', - 'permissions', - 'id', - ] - ); - } elseif ($params['shareType'] === IShare::TYPE_ROOM) { - $this->log( - 'The %s "%s" with ID "%s" has been shared to the room "%s" with permissions "%s" (Share ID: %s)', - $params, - [ - 'itemType', - 'path', - 'itemSource', - 'shareWith', - 'permissions', - 'id', - ] - ); - } elseif ($params['shareType'] === IShare::TYPE_EMAIL) { - $this->log( - 'The %s "%s" with ID "%s" has been shared to the email recipient "%s" with permissions "%s" (Share ID: %s)', - $params, - [ - 'itemType', - 'path', - 'itemSource', - 'shareWith', - 'permissions', - 'id', - ] - ); - } elseif ($params['shareType'] === IShare::TYPE_CIRCLE) { - $this->log( - 'The %s "%s" with ID "%s" has been shared to the circle "%s" with permissions "%s" (Share ID: %s)', - $params, - [ - 'itemType', - 'path', - 'itemSource', - 'shareWith', - 'permissions', - 'id', - ] - ); - } elseif ($params['shareType'] === IShare::TYPE_REMOTE) { - $this->log( - 'The %s "%s" with ID "%s" has been shared to the remote user "%s" with permissions "%s" (Share ID: %s)', - $params, - [ - 'itemType', - 'path', - 'itemSource', - 'shareWith', - 'permissions', - 'id', - ] - ); - } elseif ($params['shareType'] === IShare::TYPE_REMOTE_GROUP) { - $this->log( - 'The %s "%s" with ID "%s" has been shared to the remote group "%s" with permissions "%s" (Share ID: %s)', - $params, - [ - 'itemType', - 'path', - 'itemSource', - 'shareWith', - 'permissions', - 'id', - ] - ); - } elseif ($params['shareType'] === IShare::TYPE_DECK) { - $this->log( - 'The %s "%s" with ID "%s" has been shared to the deck card "%s" with permissions "%s" (Share ID: %s)', - $params, - [ - 'itemType', - 'path', - 'itemSource', - 'shareWith', - 'permissions', - 'id', - ] - ); - } elseif ($params['shareType'] === IShare::TYPE_SCIENCEMESH) { - $this->log( - 'The %s "%s" with ID "%s" has been shared to the ScienceMesh user "%s" with permissions "%s" (Share ID: %s)', - $params, - [ - 'itemType', - 'path', - 'itemSource', - 'shareWith', - 'permissions', - 'id', - ] - ); - } - } - - /** - * Logs unsharing of data - * - * @param array $params - */ - public function unshare(array $params): void { - if ($params['shareType'] === IShare::TYPE_LINK) { - $this->log( - 'The %s "%s" with ID "%s" has been unshared (Share ID: %s)', - $params, - [ - 'itemType', - 'fileTarget', - 'itemSource', - 'id', - ] - ); - } elseif ($params['shareType'] === IShare::TYPE_USER) { - $this->log( - 'The %s "%s" with ID "%s" has been unshared from the user "%s" (Share ID: %s)', - $params, - [ - 'itemType', - 'fileTarget', - 'itemSource', - 'shareWith', - 'id', - ] - ); - } elseif ($params['shareType'] === IShare::TYPE_GROUP) { - $this->log( - 'The %s "%s" with ID "%s" has been unshared from the group "%s" (Share ID: %s)', - $params, - [ - 'itemType', - 'fileTarget', - 'itemSource', - 'shareWith', - 'id', - ] - ); - } elseif ($params['shareType'] === IShare::TYPE_ROOM) { - $this->log( - 'The %s "%s" with ID "%s" has been unshared from the room "%s" (Share ID: %s)', - $params, - [ - 'itemType', - 'fileTarget', - 'itemSource', - 'shareWith', - 'id', - ] - ); - } elseif ($params['shareType'] === IShare::TYPE_EMAIL) { - $this->log( - 'The %s "%s" with ID "%s" has been unshared from the email recipient "%s" (Share ID: %s)', - $params, - [ - 'itemType', - 'fileTarget', - 'itemSource', - 'shareWith', - 'id', - ] - ); - } elseif ($params['shareType'] === IShare::TYPE_CIRCLE) { - $this->log( - 'The %s "%s" with ID "%s" has been unshared from the circle "%s" (Share ID: %s)', - $params, - [ - 'itemType', - 'fileTarget', - 'itemSource', - 'shareWith', - 'id', - ] - ); - } elseif ($params['shareType'] === IShare::TYPE_REMOTE) { - $this->log( - 'The %s "%s" with ID "%s" has been unshared from the remote user "%s" (Share ID: %s)', - $params, - [ - 'itemType', - 'fileTarget', - 'itemSource', - 'shareWith', - 'id', - ] - ); - } elseif ($params['shareType'] === IShare::TYPE_REMOTE_GROUP) { - $this->log( - 'The %s "%s" with ID "%s" has been unshared from the remote group "%s" (Share ID: %s)', - $params, - [ - 'itemType', - 'fileTarget', - 'itemSource', - 'shareWith', - 'id', - ] - ); - } elseif ($params['shareType'] === IShare::TYPE_DECK) { - $this->log( - 'The %s "%s" with ID "%s" has been unshared from the deck card "%s" (Share ID: %s)', - $params, - [ - 'itemType', - 'fileTarget', - 'itemSource', - 'shareWith', - 'id', - ] - ); - } elseif ($params['shareType'] === IShare::TYPE_SCIENCEMESH) { - $this->log( - 'The %s "%s" with ID "%s" has been unshared from the ScienceMesh user "%s" (Share ID: %s)', - $params, - [ - 'itemType', - 'fileTarget', - 'itemSource', - 'shareWith', - 'id', - ] - ); - } - } /** * Logs the updating of permission changes for shares diff --git a/apps/admin_audit/lib/Actions/UserManagement.php b/apps/admin_audit/lib/Actions/UserManagement.php deleted file mode 100644 index 25960197847..00000000000 --- a/apps/admin_audit/lib/Actions/UserManagement.php +++ /dev/null @@ -1,122 +0,0 @@ -<?php - -declare(strict_types=1); -/** - * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors - * SPDX-License-Identifier: AGPL-3.0-or-later - */ -namespace OCA\AdminAudit\Actions; - -use OCP\IUser; - -/** - * Class UserManagement logs all user management related actions. - * - * @package OCA\AdminAudit\Actions - */ -class UserManagement extends Action { - /** - * Log creation of users - * - * @param array $params - */ - public function create(array $params): void { - $this->log( - 'User created: "%s"', - $params, - [ - 'uid', - ] - ); - } - - /** - * Log assignments of users (typically user backends) - * - * @param string $uid - */ - public function assign(string $uid): void { - $this->log( - 'UserID assigned: "%s"', - [ 'uid' => $uid ], - [ 'uid' ] - ); - } - - /** - * Log deletion of users - * - * @param array $params - */ - public function delete(array $params): void { - $this->log( - 'User deleted: "%s"', - $params, - [ - 'uid', - ] - ); - } - - /** - * Log unassignments of users (typically user backends, no data removed) - * - * @param string $uid - */ - public function unassign(string $uid): void { - $this->log( - 'UserID unassigned: "%s"', - [ 'uid' => $uid ], - [ 'uid' ] - ); - } - - /** - * Log enabling of users - * - * @param array $params - */ - public function change(array $params): void { - switch ($params['feature']) { - case 'enabled': - $this->log( - $params['value'] === true - ? 'User enabled: "%s"' - : 'User disabled: "%s"', - ['user' => $params['user']->getUID()], - [ - 'user', - ] - ); - break; - case 'eMailAddress': - $this->log( - 'Email address changed for user %s', - ['user' => $params['user']->getUID()], - [ - 'user', - ] - ); - break; - } - } - - /** - * Logs changing of the user scope - * - * @param IUser $user - */ - public function setPassword(IUser $user): void { - if ($user->getBackendClassName() === 'Database') { - $this->log( - 'Password of user "%s" has been changed', - [ - 'user' => $user->getUID(), - ], - [ - 'user', - ] - ); - } - } -} diff --git a/apps/admin_audit/lib/AppInfo/Application.php b/apps/admin_audit/lib/AppInfo/Application.php index 79c6640e2e2..b6af8dbed04 100644 --- a/apps/admin_audit/lib/AppInfo/Application.php +++ b/apps/admin_audit/lib/AppInfo/Application.php @@ -1,29 +1,35 @@ <?php declare(strict_types=1); + /** * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\AdminAudit\AppInfo; -use OC\Group\Manager as GroupManager; -use OC\User\Session as UserSession; -use OCA\AdminAudit\Actions\AppManagement; use OCA\AdminAudit\Actions\Auth; use OCA\AdminAudit\Actions\Console; use OCA\AdminAudit\Actions\Files; -use OCA\AdminAudit\Actions\GroupManagement; -use OCA\AdminAudit\Actions\Security; use OCA\AdminAudit\Actions\Sharing; use OCA\AdminAudit\Actions\TagManagement; use OCA\AdminAudit\Actions\Trashbin; -use OCA\AdminAudit\Actions\UserManagement; use OCA\AdminAudit\Actions\Versions; use OCA\AdminAudit\AuditLogger; use OCA\AdminAudit\IAuditLogger; +use OCA\AdminAudit\Listener\AppManagementEventListener; +use OCA\AdminAudit\Listener\AuthEventListener; +use OCA\AdminAudit\Listener\ConsoleEventListener; use OCA\AdminAudit\Listener\CriticalActionPerformedEventListener; -use OCP\App\ManagerEvent; +use OCA\AdminAudit\Listener\FileEventListener; +use OCA\AdminAudit\Listener\GroupManagementEventListener; +use OCA\AdminAudit\Listener\SecurityEventListener; +use OCA\AdminAudit\Listener\SharingEventListener; +use OCA\AdminAudit\Listener\UserManagementEventListener; +use OCP\App\Events\AppDisableEvent; +use OCP\App\Events\AppEnableEvent; +use OCP\App\Events\AppUpdateEvent; use OCP\AppFramework\App; use OCP\AppFramework\Bootstrap\IBootContext; use OCP\AppFramework\Bootstrap\IBootstrap; @@ -40,21 +46,31 @@ use OCP\Files\Events\Node\NodeCreatedEvent; use OCP\Files\Events\Node\NodeDeletedEvent; use OCP\Files\Events\Node\NodeRenamedEvent; use OCP\Files\Events\Node\NodeWrittenEvent; +use OCP\Group\Events\GroupCreatedEvent; +use OCP\Group\Events\GroupDeletedEvent; +use OCP\Group\Events\UserAddedEvent; +use OCP\Group\Events\UserRemovedEvent; use OCP\IConfig; -use OCP\IGroupManager; -use OCP\IUserSession; use OCP\Log\Audit\CriticalActionPerformedEvent; use OCP\Log\ILogFactory; use OCP\Preview\BeforePreviewFetchedEvent; use OCP\Share; +use OCP\Share\Events\ShareCreatedEvent; +use OCP\Share\Events\ShareDeletedEvent; +use OCP\User\Events\BeforeUserLoggedInEvent; +use OCP\User\Events\BeforeUserLoggedOutEvent; +use OCP\User\Events\PasswordUpdatedEvent; +use OCP\User\Events\UserChangedEvent; +use OCP\User\Events\UserCreatedEvent; +use OCP\User\Events\UserDeletedEvent; +use OCP\User\Events\UserIdAssignedEvent; +use OCP\User\Events\UserIdUnassignedEvent; +use OCP\User\Events\UserLoggedInEvent; +use OCP\User\Events\UserLoggedInWithCookieEvent; use OCP\Util; use Psr\Container\ContainerInterface; -use Psr\Log\LoggerInterface; class Application extends App implements IBootstrap { - /** @var LoggerInterface */ - protected $logger; - public function __construct() { parent::__construct('admin_audit'); } @@ -65,6 +81,45 @@ class Application extends App implements IBootstrap { }); $context->registerEventListener(CriticalActionPerformedEvent::class, CriticalActionPerformedEventListener::class); + + // User management events + $context->registerEventListener(UserCreatedEvent::class, UserManagementEventListener::class); + $context->registerEventListener(UserDeletedEvent::class, UserManagementEventListener::class); + $context->registerEventListener(UserChangedEvent::class, UserManagementEventListener::class); + $context->registerEventListener(PasswordUpdatedEvent::class, UserManagementEventListener::class); + $context->registerEventListener(UserIdAssignedEvent::class, UserManagementEventListener::class); + $context->registerEventListener(UserIdUnassignedEvent::class, UserManagementEventListener::class); + + // Group management events + $context->registerEventListener(UserAddedEvent::class, GroupManagementEventListener::class); + $context->registerEventListener(UserRemovedEvent::class, GroupManagementEventListener::class); + $context->registerEventListener(GroupCreatedEvent::class, GroupManagementEventListener::class); + $context->registerEventListener(GroupDeletedEvent::class, GroupManagementEventListener::class); + + // Sharing events + $context->registerEventListener(ShareCreatedEvent::class, SharingEventListener::class); + $context->registerEventListener(ShareDeletedEvent::class, SharingEventListener::class); + + // Auth events + $context->registerEventListener(BeforeUserLoggedInEvent::class, AuthEventListener::class); + $context->registerEventListener(UserLoggedInWithCookieEvent::class, AuthEventListener::class); + $context->registerEventListener(UserLoggedInEvent::class, AuthEventListener::class); + $context->registerEventListener(BeforeUserLoggedOutEvent::class, AuthEventListener::class); + + // File events + $context->registerEventListener(BeforePreviewFetchedEvent::class, FileEventListener::class); + + // Security events + $context->registerEventListener(TwoFactorProviderChallengePassed::class, SecurityEventListener::class); + $context->registerEventListener(TwoFactorProviderChallengeFailed::class, SecurityEventListener::class); + + // App management events + $context->registerEventListener(AppEnableEvent::class, AppManagementEventListener::class); + $context->registerEventListener(AppDisableEvent::class, AppManagementEventListener::class); + $context->registerEventListener(AppUpdateEvent::class, AppManagementEventListener::class); + + // Console events + $context->registerEventListener(ConsoleEvent::class, ConsoleEventListener::class); } public function boot(IBootContext $context): void { @@ -75,102 +130,31 @@ class Application extends App implements IBootstrap { * TODO: once the hooks are migrated to lazy events, this should be done * in \OCA\AdminAudit\AppInfo\Application::register */ - $this->registerHooks($logger, $context->getServerContainer()); + $this->registerLegacyHooks($logger, $context->getServerContainer()); } /** * Register hooks in order to log them */ - private function registerHooks(IAuditLogger $logger, - ContainerInterface $serverContainer): void { - $this->userManagementHooks($logger, $serverContainer->get(IUserSession::class)); - $this->groupHooks($logger, $serverContainer->get(IGroupManager::class)); - $this->authHooks($logger); - - + private function registerLegacyHooks(IAuditLogger $logger, ContainerInterface $serverContainer): void { /** @var IEventDispatcher $eventDispatcher */ $eventDispatcher = $serverContainer->get(IEventDispatcher::class); - $this->consoleHooks($logger, $eventDispatcher); - $this->appHooks($logger, $eventDispatcher); - - $this->sharingHooks($logger); - + $this->sharingLegacyHooks($logger); $this->fileHooks($logger, $eventDispatcher); $this->trashbinHooks($logger); $this->versionsHooks($logger); - - $this->securityHooks($logger, $eventDispatcher); $this->tagHooks($logger, $eventDispatcher); } - private function userManagementHooks(IAuditLogger $logger, - IUserSession $userSession): void { - $userActions = new UserManagement($logger); - - Util::connectHook('OC_User', 'post_createUser', $userActions, 'create'); - Util::connectHook('OC_User', 'post_deleteUser', $userActions, 'delete'); - Util::connectHook('OC_User', 'changeUser', $userActions, 'change'); - - assert($userSession instanceof UserSession); - $userSession->listen('\OC\User', 'postSetPassword', [$userActions, 'setPassword']); - $userSession->listen('\OC\User', 'assignedUserId', [$userActions, 'assign']); - $userSession->listen('\OC\User', 'postUnassignedUserId', [$userActions, 'unassign']); - } - - private function groupHooks(IAuditLogger $logger, - IGroupManager $groupManager): void { - $groupActions = new GroupManagement($logger); - - assert($groupManager instanceof GroupManager); - $groupManager->listen('\OC\Group', 'postRemoveUser', [$groupActions, 'removeUser']); - $groupManager->listen('\OC\Group', 'postAddUser', [$groupActions, 'addUser']); - $groupManager->listen('\OC\Group', 'postDelete', [$groupActions, 'deleteGroup']); - $groupManager->listen('\OC\Group', 'postCreate', [$groupActions, 'createGroup']); - } - - private function sharingHooks(IAuditLogger $logger): void { + private function sharingLegacyHooks(IAuditLogger $logger): void { $shareActions = new Sharing($logger); - Util::connectHook(Share::class, 'post_shared', $shareActions, 'shared'); - Util::connectHook(Share::class, 'post_unshare', $shareActions, 'unshare'); - Util::connectHook(Share::class, 'post_unshareFromSelf', $shareActions, 'unshare'); Util::connectHook(Share::class, 'post_update_permissions', $shareActions, 'updatePermissions'); Util::connectHook(Share::class, 'post_update_password', $shareActions, 'updatePassword'); Util::connectHook(Share::class, 'post_set_expiration_date', $shareActions, 'updateExpirationDate'); Util::connectHook(Share::class, 'share_link_access', $shareActions, 'shareAccessed'); } - private function authHooks(IAuditLogger $logger): void { - $authActions = new Auth($logger); - - Util::connectHook('OC_User', 'pre_login', $authActions, 'loginAttempt'); - Util::connectHook('OC_User', 'post_login', $authActions, 'loginSuccessful'); - Util::connectHook('OC_User', 'logout', $authActions, 'logout'); - } - - private function appHooks(IAuditLogger $logger, - IEventDispatcher $eventDispatcher): void { - $eventDispatcher->addListener(ManagerEvent::EVENT_APP_ENABLE, function (ManagerEvent $event) use ($logger) { - $appActions = new AppManagement($logger); - $appActions->enableApp($event->getAppID()); - }); - $eventDispatcher->addListener(ManagerEvent::EVENT_APP_ENABLE_FOR_GROUPS, function (ManagerEvent $event) use ($logger) { - $appActions = new AppManagement($logger); - $appActions->enableAppForGroups($event->getAppID(), $event->getGroups()); - }); - $eventDispatcher->addListener(ManagerEvent::EVENT_APP_DISABLE, function (ManagerEvent $event) use ($logger) { - $appActions = new AppManagement($logger); - $appActions->disableApp($event->getAppID()); - }); - } - - private function consoleHooks(IAuditLogger $logger, - IEventDispatcher $eventDispatcher): void { - $eventDispatcher->addListener(ConsoleEvent::class, function (ConsoleEvent $event) use ($logger) { - $appActions = new Console($logger); - $appActions->runCommand($event->getArguments()); - }); - } private function tagHooks(IAuditLogger $logger, IEventDispatcher $eventDispatcher): void { $eventDispatcher->addListener(\OCP\SystemTag\ManagerEvent::EVENT_CREATE, function (\OCP\SystemTag\ManagerEvent $event) use ($logger) { @@ -179,15 +163,8 @@ class Application extends App implements IBootstrap { }); } - private function fileHooks(IAuditLogger $logger, - IEventDispatcher $eventDispatcher): void { + private function fileHooks(IAuditLogger $logger, IEventDispatcher $eventDispatcher): void { $fileActions = new Files($logger); - $eventDispatcher->addListener( - BeforePreviewFetchedEvent::class, - function (BeforePreviewFetchedEvent $event) use ($fileActions) { - $fileActions->preview($event); - } - ); $eventDispatcher->addListener( BeforeNodeRenamedEvent::class, @@ -257,16 +234,4 @@ class Application extends App implements IBootstrap { Util::connectHook('\OCP\Trashbin', 'preDelete', $trashActions, 'delete'); Util::connectHook('\OCA\Files_Trashbin\Trashbin', 'post_restore', $trashActions, 'restore'); } - - private function securityHooks(IAuditLogger $logger, - IEventDispatcher $eventDispatcher): void { - $eventDispatcher->addListener(TwoFactorProviderChallengePassed::class, function (TwoFactorProviderChallengePassed $event) use ($logger) { - $security = new Security($logger); - $security->twofactorSuccess($event->getUser(), $event->getProvider()); - }); - $eventDispatcher->addListener(TwoFactorProviderChallengeFailed::class, function (TwoFactorProviderChallengeFailed $event) use ($logger) { - $security = new Security($logger); - $security->twofactorFailed($event->getUser(), $event->getProvider()); - }); - } } diff --git a/apps/admin_audit/lib/AuditLogger.php b/apps/admin_audit/lib/AuditLogger.php index a08e79072ee..a622794dc08 100644 --- a/apps/admin_audit/lib/AuditLogger.php +++ b/apps/admin_audit/lib/AuditLogger.php @@ -1,9 +1,12 @@ <?php +declare(strict_types=1); + /** * SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\AdminAudit; use OCP\IConfig; diff --git a/apps/admin_audit/lib/Listener/AppManagementEventListener.php b/apps/admin_audit/lib/Listener/AppManagementEventListener.php new file mode 100644 index 00000000000..c20bdd481d6 --- /dev/null +++ b/apps/admin_audit/lib/Listener/AppManagementEventListener.php @@ -0,0 +1,60 @@ +<?php + +declare(strict_types=1); + +/** + * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors + * SPDX-License-Identifier: AGPL-3.0-or-later + */ + +namespace OCA\AdminAudit\Listener; + +use OCA\AdminAudit\Actions\Action; +use OCP\App\Events\AppDisableEvent; +use OCP\App\Events\AppEnableEvent; +use OCP\App\Events\AppUpdateEvent; +use OCP\EventDispatcher\Event; +use OCP\EventDispatcher\IEventListener; + +/** + * @template-implements IEventListener<AppEnableEvent|AppDisableEvent|AppUpdateEvent> + */ +class AppManagementEventListener extends Action implements IEventListener { + public function handle(Event $event): void { + if ($event instanceof AppEnableEvent) { + $this->appEnable($event); + } elseif ($event instanceof AppDisableEvent) { + $this->appDisable($event); + } elseif ($event instanceof AppUpdateEvent) { + $this->appUpdate($event); + } + } + + private function appEnable(AppEnableEvent $event): void { + if (empty($event->getGroupIds())) { + $this->log('App "%s" enabled', + ['app' => $event->getAppId()], + ['app'] + ); + } else { + $this->log('App "%1$s" enabled for groups: %2$s', + ['app' => $event->getAppId(), 'groups' => implode(', ', $event->getGroupIds())], + ['app', 'groups'] + ); + } + } + + private function appDisable(AppDisableEvent $event): void { + $this->log('App "%s" disabled', + ['app' => $event->getAppId()], + ['app'] + ); + } + + private function appUpdate(AppUpdateEvent $event): void { + $this->log('App "%s" updated', + ['app' => $event->getAppId()], + ['app'] + ); + } +} diff --git a/apps/admin_audit/lib/Listener/AuthEventListener.php b/apps/admin_audit/lib/Listener/AuthEventListener.php new file mode 100644 index 00000000000..2b31a271d23 --- /dev/null +++ b/apps/admin_audit/lib/Listener/AuthEventListener.php @@ -0,0 +1,67 @@ +<?php + +declare(strict_types=1); + +/** + * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors + * SPDX-License-Identifier: AGPL-3.0-or-later + */ + +namespace OCA\AdminAudit\Listener; + +use OCA\AdminAudit\Actions\Action; +use OCP\EventDispatcher\Event; +use OCP\EventDispatcher\IEventListener; +use OCP\User\Events\BeforeUserLoggedInEvent; +use OCP\User\Events\BeforeUserLoggedOutEvent; +use OCP\User\Events\UserLoggedInEvent; +use OCP\User\Events\UserLoggedInWithCookieEvent; + +/** + * @template-implements IEventListener<BeforeUserLoggedInEvent|UserLoggedInWithCookieEvent|UserLoggedInEvent|BeforeUserLoggedOutEvent> + */ +class AuthEventListener extends Action implements IEventListener { + public function handle(Event $event): void { + if ($event instanceof BeforeUserLoggedInEvent) { + $this->beforeUserLoggedIn($event); + } elseif ($event instanceof UserLoggedInWithCookieEvent || $event instanceof UserLoggedInEvent) { + $this->userLoggedIn($event); + } elseif ($event instanceof BeforeUserLoggedOutEvent) { + $this->beforeUserLogout($event); + } + } + + private function beforeUserLoggedIn(BeforeUserLoggedInEvent $event): void { + $this->log( + 'Login attempt: "%s"', + [ + 'uid' => $event->getUsername() + ], + [ + 'uid', + ], + true + ); + } + + private function userLoggedIn(UserLoggedInWithCookieEvent|UserLoggedInEvent $event): void { + $this->log( + 'Login successful: "%s"', + [ + 'uid' => $event->getUser()->getUID() + ], + [ + 'uid', + ], + true + ); + } + + private function beforeUserLogout(BeforeUserLoggedOutEvent $event): void { + $this->log( + 'Logout occurred', + [], + [] + ); + } +} diff --git a/apps/admin_audit/lib/Listener/ConsoleEventListener.php b/apps/admin_audit/lib/Listener/ConsoleEventListener.php new file mode 100644 index 00000000000..aa6029f2016 --- /dev/null +++ b/apps/admin_audit/lib/Listener/ConsoleEventListener.php @@ -0,0 +1,42 @@ +<?php + +declare(strict_types=1); + +/** + * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors + * SPDX-License-Identifier: AGPL-3.0-or-later + */ + +namespace OCA\AdminAudit\Listener; + +use OCA\AdminAudit\Actions\Action; +use OCP\Console\ConsoleEvent; +use OCP\EventDispatcher\Event; +use OCP\EventDispatcher\IEventListener; + +/** + * @template-implements IEventListener<ConsoleEvent> + */ +class ConsoleEventListener extends Action implements IEventListener { + public function handle(Event $event): void { + if ($event instanceof ConsoleEvent) { + $this->runCommand($event); + } + } + + private function runCommand(ConsoleEvent $event): void { + $arguments = $event->getArguments(); + if (!isset($arguments[1]) || $arguments[1] === '_completion') { + // Don't log autocompletion + return; + } + + // Remove `./occ` + array_shift($arguments); + + $this->log('Console command executed: %s', + ['arguments' => implode(' ', $arguments)], + ['arguments'] + ); + } +} diff --git a/apps/admin_audit/lib/Listener/CriticalActionPerformedEventListener.php b/apps/admin_audit/lib/Listener/CriticalActionPerformedEventListener.php index 0c4d0401b80..bc3652a08bc 100644 --- a/apps/admin_audit/lib/Listener/CriticalActionPerformedEventListener.php +++ b/apps/admin_audit/lib/Listener/CriticalActionPerformedEventListener.php @@ -1,10 +1,12 @@ <?php declare(strict_types=1); + /** * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\AdminAudit\Listener; use OCA\AdminAudit\Actions\Action; diff --git a/apps/admin_audit/lib/Listener/FileEventListener.php b/apps/admin_audit/lib/Listener/FileEventListener.php new file mode 100644 index 00000000000..74bb2ac836c --- /dev/null +++ b/apps/admin_audit/lib/Listener/FileEventListener.php @@ -0,0 +1,56 @@ +<?php + +declare(strict_types=1); + +/** + * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors + * SPDX-License-Identifier: AGPL-3.0-or-later + */ + +namespace OCA\AdminAudit\Listener; + +use OCA\AdminAudit\Actions\Action; +use OCP\EventDispatcher\Event; +use OCP\EventDispatcher\IEventListener; +use OCP\Files\InvalidPathException; +use OCP\Files\NotFoundException; +use OCP\Preview\BeforePreviewFetchedEvent; +use Psr\Log\LoggerInterface; + +/** + * @template-implements IEventListener<BeforePreviewFetchedEvent> + */ +class FileEventListener extends Action implements IEventListener { + public function handle(Event $event): void { + if ($event instanceof BeforePreviewFetchedEvent) { + $this->beforePreviewFetched($event); + } + } + + /** + * Logs preview access to a file + */ + private function beforePreviewFetched(BeforePreviewFetchedEvent $event): void { + try { + $file = $event->getNode(); + $params = [ + 'id' => $file->getId(), + 'width' => $event->getWidth(), + 'height' => $event->getHeight(), + 'crop' => $event->isCrop(), + 'mode' => $event->getMode(), + 'path' => mb_substr($file->getInternalPath(), 5) + ]; + $this->log( + 'Preview accessed: (id: "%s", width: "%s", height: "%s" crop: "%s", mode: "%s", path: "%s")', + $params, + array_keys($params) + ); + } catch (InvalidPathException|NotFoundException $e) { + \OCP\Server::get(LoggerInterface::class)->error( + 'Exception thrown in file preview: '.$e->getMessage(), ['app' => 'admin_audit', 'exception' => $e] + ); + return; + } + } +} diff --git a/apps/admin_audit/lib/Listener/GroupManagementEventListener.php b/apps/admin_audit/lib/Listener/GroupManagementEventListener.php new file mode 100644 index 00000000000..df937447e70 --- /dev/null +++ b/apps/admin_audit/lib/Listener/GroupManagementEventListener.php @@ -0,0 +1,81 @@ +<?php + +declare(strict_types=1); + +/** + * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors + * SPDX-License-Identifier: AGPL-3.0-or-later + */ + +namespace OCA\AdminAudit\Listener; + +use OCA\AdminAudit\Actions\Action; +use OCP\EventDispatcher\Event; +use OCP\EventDispatcher\IEventListener; +use OCP\Group\Events\GroupCreatedEvent; +use OCP\Group\Events\GroupDeletedEvent; +use OCP\Group\Events\UserAddedEvent; +use OCP\Group\Events\UserRemovedEvent; + +/** + * @template-implements IEventListener<UserAddedEvent|UserRemovedEvent|GroupCreatedEvent|GroupDeletedEvent> + */ +class GroupManagementEventListener extends Action implements IEventListener { + public function handle(Event $event): void { + if ($event instanceof UserAddedEvent) { + $this->userAdded($event); + } elseif ($event instanceof UserRemovedEvent) { + $this->userRemoved($event); + } elseif ($event instanceof GroupCreatedEvent) { + $this->groupCreated($event); + } elseif ($event instanceof GroupDeletedEvent) { + $this->groupDeleted($event); + } + } + + private function userAdded(UserAddedEvent $event): void { + $this->log('User "%s" added to group "%s"', + [ + 'group' => $event->getGroup()->getGID(), + 'user' => $event->getUser()->getUID() + ], + [ + 'user', 'group' + ] + ); + } + + private function userRemoved(UserRemovedEvent $event): void { + $this->log('User "%s" removed from group "%s"', + [ + 'group' => $event->getGroup()->getGID(), + 'user' => $event->getUser()->getUID() + ], + [ + 'user', 'group' + ] + ); + } + + private function groupCreated(GroupCreatedEvent $event): void { + $this->log('Group created: "%s"', + [ + 'group' => $event->getGroup()->getGID() + ], + [ + 'group' + ] + ); + } + + private function groupDeleted(GroupDeletedEvent $event): void { + $this->log('Group deleted: "%s"', + [ + 'group' => $event->getGroup()->getGID() + ], + [ + 'group' + ] + ); + } +} diff --git a/apps/admin_audit/lib/Listener/SecurityEventListener.php b/apps/admin_audit/lib/Listener/SecurityEventListener.php new file mode 100644 index 00000000000..17253aa384c --- /dev/null +++ b/apps/admin_audit/lib/Listener/SecurityEventListener.php @@ -0,0 +1,61 @@ +<?php + +declare(strict_types=1); + +/** + * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors + * SPDX-License-Identifier: AGPL-3.0-or-later + */ + +namespace OCA\AdminAudit\Listener; + +use OCA\AdminAudit\Actions\Action; +use OCP\Authentication\TwoFactorAuth\TwoFactorProviderChallengeFailed; +use OCP\Authentication\TwoFactorAuth\TwoFactorProviderChallengePassed; +use OCP\EventDispatcher\Event; +use OCP\EventDispatcher\IEventListener; + +/** + * @template-implements IEventListener<TwoFactorProviderChallengePassed|TwoFactorProviderChallengeFailed> + */ +class SecurityEventListener extends Action implements IEventListener { + public function handle(Event $event): void { + if ($event instanceof TwoFactorProviderChallengePassed) { + $this->twoFactorProviderChallengePassed($event); + } elseif ($event instanceof TwoFactorProviderChallengeFailed) { + $this->twoFactorProviderChallengeFailed($event); + } + } + + private function twoFactorProviderChallengePassed(TwoFactorProviderChallengePassed $event): void { + $this->log( + 'Successful two factor attempt by user %s (%s) with provider %s', + [ + 'uid' => $event->getUser()->getUID(), + 'displayName' => $event->getUser()->getDisplayName(), + 'provider' => $event->getProvider()->getDisplayName() + ], + [ + 'displayName', + 'uid', + 'provider', + ] + ); + } + + private function twoFactorProviderChallengeFailed(TwoFactorProviderChallengeFailed $event): void { + $this->log( + 'Failed two factor attempt by user %s (%s) with provider %s', + [ + 'uid' => $event->getUser()->getUID(), + 'displayName' => $event->getUser()->getDisplayName(), + 'provider' => $event->getProvider()->getDisplayName() + ], + [ + 'displayName', + 'uid', + 'provider', + ] + ); + } +} diff --git a/apps/admin_audit/lib/Listener/SharingEventListener.php b/apps/admin_audit/lib/Listener/SharingEventListener.php new file mode 100644 index 00000000000..1ba3c6f49d3 --- /dev/null +++ b/apps/admin_audit/lib/Listener/SharingEventListener.php @@ -0,0 +1,291 @@ +<?php + +declare(strict_types=1); + +/** + * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors + * SPDX-License-Identifier: AGPL-3.0-or-later + */ + +namespace OCA\AdminAudit\Listener; + +use OCA\AdminAudit\Actions\Action; +use OCP\EventDispatcher\Event; +use OCP\EventDispatcher\IEventListener; +use OCP\Share\Events\ShareCreatedEvent; +use OCP\Share\Events\ShareDeletedEvent; +use OCP\Share\IShare; + +/** + * @template-implements IEventListener<ShareCreatedEvent|ShareDeletedEvent> + */ +class SharingEventListener extends Action implements IEventListener { + public function handle(Event $event): void { + if ($event instanceof ShareCreatedEvent) { + $this->shareCreated($event); + } elseif ($event instanceof ShareDeletedEvent) { + $this->shareDeleted($event); + } + } + + private function shareCreated(ShareCreatedEvent $event): void { + $share = $event->getShare(); + + $params = [ + 'itemType' => $share->getNodeType(), + 'path' => $share->getNode()->getPath(), + 'itemSource' => $share->getNodeId(), + 'shareWith' => $share->getSharedWith(), + 'permissions' => $share->getPermissions(), + 'id' => $share->getId() + ]; + + match ($share->getShareType()) { + IShare::TYPE_LINK => $this->log( + 'The %s "%s" with ID "%s" has been shared via link with permissions "%s" (Share ID: %s)', + $params, + [ + 'itemType', + 'path', + 'itemSource', + 'permissions', + 'id', + ] + ), + IShare::TYPE_USER => $this->log( + 'The %s "%s" with ID "%s" has been shared to the user "%s" with permissions "%s" (Share ID: %s)', + $params, + [ + 'itemType', + 'path', + 'itemSource', + 'shareWith', + 'permissions', + 'id', + ] + ), + IShare::TYPE_GROUP => $this->log( + 'The %s "%s" with ID "%s" has been shared to the group "%s" with permissions "%s" (Share ID: %s)', + $params, + [ + 'itemType', + 'path', + 'itemSource', + 'shareWith', + 'permissions', + 'id', + ] + ), + IShare::TYPE_ROOM => $this->log( + 'The %s "%s" with ID "%s" has been shared to the room "%s" with permissions "%s" (Share ID: %s)', + $params, + [ + 'itemType', + 'path', + 'itemSource', + 'shareWith', + 'permissions', + 'id', + ] + ), + IShare::TYPE_EMAIL => $this->log( + 'The %s "%s" with ID "%s" has been shared to the email recipient "%s" with permissions "%s" (Share ID: %s)', + $params, + [ + 'itemType', + 'path', + 'itemSource', + 'shareWith', + 'permissions', + 'id', + ] + ), + IShare::TYPE_CIRCLE => $this->log( + 'The %s "%s" with ID "%s" has been shared to the circle "%s" with permissions "%s" (Share ID: %s)', + $params, + [ + 'itemType', + 'path', + 'itemSource', + 'shareWith', + 'permissions', + 'id', + ] + ), + IShare::TYPE_REMOTE => $this->log( + 'The %s "%s" with ID "%s" has been shared to the remote user "%s" with permissions "%s" (Share ID: %s)', + $params, + [ + 'itemType', + 'path', + 'itemSource', + 'shareWith', + 'permissions', + 'id', + ] + ), + IShare::TYPE_REMOTE_GROUP => $this->log( + 'The %s "%s" with ID "%s" has been shared to the remote group "%s" with permissions "%s" (Share ID: %s)', + $params, + [ + 'itemType', + 'path', + 'itemSource', + 'shareWith', + 'permissions', + 'id', + ] + ), + IShare::TYPE_DECK => $this->log( + 'The %s "%s" with ID "%s" has been shared to the deck card "%s" with permissions "%s" (Share ID: %s)', + $params, + [ + 'itemType', + 'path', + 'itemSource', + 'shareWith', + 'permissions', + 'id', + ] + ), + IShare::TYPE_SCIENCEMESH => $this->log( + 'The %s "%s" with ID "%s" has been shared to the sciencemesh user "%s" with permissions "%s" (Share ID: %s)', + $params, + [ + 'itemType', + 'path', + 'itemSource', + 'shareWith', + 'permissions', + 'id', + ] + ), + default => null + }; + } + + private function shareDeleted(ShareDeletedEvent $event): void { + $share = $event->getShare(); + + $params = [ + 'itemType' => $share->getNodeType(), + 'fileTarget' => $share->getTarget(), + 'itemSource' => $share->getNodeId(), + 'shareWith' => $share->getSharedWith(), + 'id' => $share->getId() + ]; + + match ($share->getShareType()) { + IShare::TYPE_LINK => $this->log( + 'The %s "%s" with ID "%s" has been unshared (Share ID: %s)', + $params, + [ + 'itemType', + 'fileTarget', + 'itemSource', + 'id', + ] + ), + IShare::TYPE_USER => $this->log( + 'The %s "%s" with ID "%s" has been unshared from the user "%s" (Share ID: %s)', + $params, + [ + 'itemType', + 'fileTarget', + 'itemSource', + 'shareWith', + 'id', + ] + ), + IShare::TYPE_GROUP => $this->log( + 'The %s "%s" with ID "%s" has been unshared from the group "%s" (Share ID: %s)', + $params, + [ + 'itemType', + 'fileTarget', + 'itemSource', + 'shareWith', + 'id', + ] + ), + IShare::TYPE_ROOM => $this->log( + 'The %s "%s" with ID "%s" has been unshared from the room "%s" (Share ID: %s)', + $params, + [ + 'itemType', + 'fileTarget', + 'itemSource', + 'shareWith', + 'id', + ] + ), + IShare::TYPE_EMAIL => $this->log( + 'The %s "%s" with ID "%s" has been unshared from the email recipient "%s" (Share ID: %s)', + $params, + [ + 'itemType', + 'fileTarget', + 'itemSource', + 'shareWith', + 'id', + ] + ), + IShare::TYPE_CIRCLE => $this->log( + 'The %s "%s" with ID "%s" has been unshared from the circle "%s" (Share ID: %s)', + $params, + [ + 'itemType', + 'fileTarget', + 'itemSource', + 'shareWith', + 'id', + ] + ), + IShare::TYPE_REMOTE => $this->log( + 'The %s "%s" with ID "%s" has been unshared from the remote user "%s" (Share ID: %s)', + $params, + [ + 'itemType', + 'fileTarget', + 'itemSource', + 'shareWith', + 'id', + ] + ), + IShare::TYPE_REMOTE_GROUP => $this->log( + 'The %s "%s" with ID "%s" has been unshared from the remote group "%s" (Share ID: %s)', + $params, + [ + 'itemType', + 'fileTarget', + 'itemSource', + 'shareWith', + 'id', + ] + ), + IShare::TYPE_DECK => $this->log( + 'The %s "%s" with ID "%s" has been unshared from the deck card "%s" (Share ID: %s)', + $params, + [ + 'itemType', + 'fileTarget', + 'itemSource', + 'shareWith', + 'id', + ] + ), + IShare::TYPE_SCIENCEMESH => $this->log( + 'The %s "%s" with ID "%s" has been unshared from the sciencemesh user "%s" (Share ID: %s)', + $params, + [ + 'itemType', + 'fileTarget', + 'itemSource', + 'shareWith', + 'id', + ] + ), + default => null + }; + } +} diff --git a/apps/admin_audit/lib/Listener/UserManagementEventListener.php b/apps/admin_audit/lib/Listener/UserManagementEventListener.php new file mode 100644 index 00000000000..c22d04dce9a --- /dev/null +++ b/apps/admin_audit/lib/Listener/UserManagementEventListener.php @@ -0,0 +1,126 @@ +<?php + +declare(strict_types=1); + +/** + * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors + * SPDX-License-Identifier: AGPL-3.0-or-later + */ + +namespace OCA\AdminAudit\Listener; + +use OCA\AdminAudit\Actions\Action; +use OCP\EventDispatcher\Event; +use OCP\EventDispatcher\IEventListener; +use OCP\User\Events\PasswordUpdatedEvent; +use OCP\User\Events\UserChangedEvent; +use OCP\User\Events\UserCreatedEvent; +use OCP\User\Events\UserDeletedEvent; +use OCP\User\Events\UserIdAssignedEvent; +use OCP\User\Events\UserIdUnassignedEvent; + +/** + * @template-implements IEventListener<UserCreatedEvent|UserDeletedEvent|UserChangedEvent|PasswordUpdatedEvent|UserIdAssignedEvent|UserIdUnassignedEvent> + */ +class UserManagementEventListener extends Action implements IEventListener { + public function handle(Event $event): void { + if ($event instanceof UserCreatedEvent) { + $this->userCreated($event); + } elseif ($event instanceof UserDeletedEvent) { + $this->userDeleted($event); + } elseif ($event instanceof UserChangedEvent) { + $this->userChanged($event); + } elseif ($event instanceof PasswordUpdatedEvent) { + $this->passwordUpdated($event); + } elseif ($event instanceof UserIdAssignedEvent) { + $this->userIdAssigned($event); + } elseif ($event instanceof UserIdUnassignedEvent) { + $this->userIdUnassigned($event); + } + } + + private function userCreated(UserCreatedEvent $event): void { + $this->log( + 'User created: "%s"', + [ + 'uid' => $event->getUid() + ], + [ + 'uid', + ] + ); + } + + private function userDeleted(UserDeletedEvent $event): void { + $this->log( + 'User deleted: "%s"', + [ + 'uid' => $event->getUser()->getUID() + ], + [ + 'uid', + ] + ); + } + + private function userChanged(UserChangedEvent $event): void { + switch ($event->getFeature()) { + case 'enabled': + $this->log( + $event->getValue() === true + ? 'User enabled: "%s"' + : 'User disabled: "%s"', + ['user' => $event->getUser()->getUID()], + [ + 'user', + ] + ); + break; + case 'eMailAddress': + $this->log( + 'Email address changed for user %s', + ['user' => $event->getUser()->getUID()], + [ + 'user', + ] + ); + break; + } + } + + private function passwordUpdated(PasswordUpdatedEvent $event): void { + if ($event->getUser()->getBackendClassName() === 'Database') { + $this->log( + 'Password of user "%s" has been changed', + [ + 'user' => $event->getUser()->getUID(), + ], + [ + 'user', + ] + ); + } + } + + /** + * Log assignments of users (typically user backends) + */ + private function userIdAssigned(UserIdAssignedEvent $event): void { + $this->log( + 'UserID assigned: "%s"', + [ 'uid' => $event->getUserId() ], + [ 'uid' ] + ); + } + + /** + * Log unassignments of users (typically user backends, no data removed) + */ + private function userIdUnassigned(UserIdUnassignedEvent $event): void { + $this->log( + 'UserID unassigned: "%s"', + [ 'uid' => $event->getUserId() ], + [ 'uid' ] + ); + } +} diff --git a/apps/admin_audit/tests/Actions/SecurityTest.php b/apps/admin_audit/tests/Listener/SecurityEventListenerTest.php index d06095b12e1..48230108530 100644 --- a/apps/admin_audit/tests/Actions/SecurityTest.php +++ b/apps/admin_audit/tests/Listener/SecurityEventListenerTest.php @@ -1,38 +1,47 @@ <?php declare(strict_types=1); + /** * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ -namespace OCA\AdminAudit\Tests\Actions; -use OCA\AdminAudit\Actions\Security; +namespace OCA\AdminAudit\Tests\Listener; + use OCA\AdminAudit\AuditLogger; +use OCA\AdminAudit\Listener\SecurityEventListener; use OCP\Authentication\TwoFactorAuth\IProvider; +use OCP\Authentication\TwoFactorAuth\TwoFactorProviderChallengeFailed; +use OCP\Authentication\TwoFactorAuth\TwoFactorProviderChallengePassed; use OCP\IUser; use PHPUnit\Framework\MockObject\MockObject; use Test\TestCase; -class SecurityTest extends TestCase { +class SecurityEventListenerTest extends TestCase { private AuditLogger|MockObject $logger; - private Security $security; + private SecurityEventListener $security; private MockObject|IUser $user; + /** @var IProvider&MockObject */ + private $provider; + protected function setUp(): void { parent::setUp(); $this->logger = $this->createMock(AuditLogger::class); - $this->security = new Security($this->logger); + $this->security = new SecurityEventListener($this->logger); $this->user = $this->createMock(IUser::class); $this->user->method('getUID')->willReturn('myuid'); $this->user->method('getDisplayName')->willReturn('mydisplayname'); + $this->provider = $this->createMock(IProvider::class); + $this->provider->method('getDisplayName')->willReturn('myprovider'); } - public function testTwofactorFailed() { + public function testTwofactorFailed(): void { $this->logger->expects($this->once()) ->method('info') ->with( @@ -40,14 +49,10 @@ class SecurityTest extends TestCase { ['app' => 'admin_audit'] ); - $provider = $this->createMock(IProvider::class); - $provider->method('getDisplayName') - ->willReturn('myprovider'); - - $this->security->twofactorFailed($this->user, $provider); + $this->security->handle(new twoFactorProviderChallengeFailed($this->user, $this->provider)); } - public function testTwofactorSuccess() { + public function testTwofactorSuccess(): void { $this->logger->expects($this->once()) ->method('info') ->with( @@ -55,10 +60,6 @@ class SecurityTest extends TestCase { ['app' => 'admin_audit'] ); - $provider = $this->createMock(IProvider::class); - $provider->method('getDisplayName') - ->willReturn('myprovider'); - - $this->security->twofactorSuccess($this->user, $provider); + $this->security->handle(new TwoFactorProviderChallengePassed($this->user, $this->provider)); } } diff --git a/apps/comments/tests/Unit/Activity/ListenerTest.php b/apps/comments/tests/Unit/Activity/ListenerTest.php index c1606aee745..19dcae4c8ab 100644 --- a/apps/comments/tests/Unit/Activity/ListenerTest.php +++ b/apps/comments/tests/Unit/Activity/ListenerTest.php @@ -65,7 +65,7 @@ class ListenerTest extends TestCase { ); } - public function testCommentEvent() { + public function testCommentEvent(): void { $this->appManager->expects($this->any()) ->method('isInstalled') ->with('activity') diff --git a/apps/comments/tests/Unit/AppInfo/ApplicationTest.php b/apps/comments/tests/Unit/AppInfo/ApplicationTest.php index c4e9bc7d45d..4b87982ab45 100644 --- a/apps/comments/tests/Unit/AppInfo/ApplicationTest.php +++ b/apps/comments/tests/Unit/AppInfo/ApplicationTest.php @@ -30,7 +30,7 @@ class ApplicationTest extends TestCase { parent::tearDown(); } - public function test() { + public function test(): void { $app = new Application(); $c = $app->getContainer(); diff --git a/apps/comments/tests/Unit/Collaboration/CommentersSorterTest.php b/apps/comments/tests/Unit/Collaboration/CommentersSorterTest.php index 334f24aec83..c0de0016c31 100644 --- a/apps/comments/tests/Unit/Collaboration/CommentersSorterTest.php +++ b/apps/comments/tests/Unit/Collaboration/CommentersSorterTest.php @@ -28,7 +28,7 @@ class CommentersSorterTest extends TestCase { * @dataProvider sortDataProvider * @param $data */ - public function testSort($data) { + public function testSort($data): void { $commentMocks = []; foreach ($data['actors'] as $actorType => $actors) { foreach ($actors as $actorId => $noOfComments) { diff --git a/apps/comments/tests/Unit/Controller/NotificationsTest.php b/apps/comments/tests/Unit/Controller/NotificationsTest.php index 03eba79e6c8..ccd808895c8 100644 --- a/apps/comments/tests/Unit/Controller/NotificationsTest.php +++ b/apps/comments/tests/Unit/Controller/NotificationsTest.php @@ -63,7 +63,7 @@ class NotificationsTest extends TestCase { ); } - public function testViewGuestRedirect() { + public function testViewGuestRedirect(): void { $this->commentsManager->expects($this->never()) ->method('get'); @@ -96,7 +96,7 @@ class NotificationsTest extends TestCase { $this->assertSame('link-to-login', $response->getRedirectURL()); } - public function testViewSuccess() { + public function testViewSuccess(): void { $comment = $this->createMock(IComment::class); $comment->expects($this->any()) ->method('getObjectType') @@ -146,7 +146,7 @@ class NotificationsTest extends TestCase { $this->assertInstanceOf(RedirectResponse::class, $response); } - public function testViewInvalidComment() { + public function testViewInvalidComment(): void { $this->commentsManager->expects($this->any()) ->method('get') ->with('42') @@ -174,7 +174,7 @@ class NotificationsTest extends TestCase { $this->assertInstanceOf(NotFoundResponse::class, $response); } - public function testViewNoFile() { + public function testViewNoFile(): void { $comment = $this->createMock(IComment::class); $comment->expects($this->any()) ->method('getObjectType') diff --git a/apps/comments/tests/Unit/EventHandlerTest.php b/apps/comments/tests/Unit/EventHandlerTest.php index 6459924ee8a..83ce1af57da 100644 --- a/apps/comments/tests/Unit/EventHandlerTest.php +++ b/apps/comments/tests/Unit/EventHandlerTest.php @@ -36,7 +36,7 @@ class EventHandlerTest extends TestCase { $this->eventHandler = new CommentsEventListener($this->activityListener, $this->notificationListener); } - public function testNotFiles() { + public function testNotFiles(): void { /** @var IComment|\PHPUnit\Framework\MockObject\MockObject $comment */ $comment = $this->getMockBuilder(IComment::class)->getMock(); $comment->expects($this->once()) @@ -69,7 +69,7 @@ class EventHandlerTest extends TestCase { * @dataProvider handledProvider * @param string $eventType */ - public function testHandled($eventType) { + public function testHandled($eventType): void { /** @var IComment|\PHPUnit\Framework\MockObject\MockObject $comment */ $comment = $this->getMockBuilder(IComment::class)->getMock(); $comment->expects($this->once()) diff --git a/apps/comments/tests/Unit/Notification/ListenerTest.php b/apps/comments/tests/Unit/Notification/ListenerTest.php index 3082333e8a3..4cdb5f93b15 100644 --- a/apps/comments/tests/Unit/Notification/ListenerTest.php +++ b/apps/comments/tests/Unit/Notification/ListenerTest.php @@ -55,7 +55,7 @@ class ListenerTest extends TestCase { * @param string $eventType * @param string $notificationMethod */ - public function testEvaluate($eventType, $notificationMethod) { + public function testEvaluate($eventType, $notificationMethod): void { /** @var IComment|\PHPUnit\Framework\MockObject\MockObject $comment */ $comment = $this->getMockBuilder(IComment::class)->getMock(); $comment->expects($this->any()) @@ -123,7 +123,7 @@ class ListenerTest extends TestCase { * @dataProvider eventProvider * @param string $eventType */ - public function testEvaluateNoMentions($eventType) { + public function testEvaluateNoMentions($eventType): void { /** @var IComment|\PHPUnit\Framework\MockObject\MockObject $comment */ $comment = $this->getMockBuilder(IComment::class)->getMock(); $comment->expects($this->any()) @@ -160,7 +160,7 @@ class ListenerTest extends TestCase { $this->listener->evaluate($event); } - public function testEvaluateUserDoesNotExist() { + public function testEvaluateUserDoesNotExist(): void { /** @var IComment|\PHPUnit\Framework\MockObject\MockObject $comment */ $comment = $this->getMockBuilder(IComment::class)->getMock(); $comment->expects($this->any()) diff --git a/apps/comments/tests/Unit/Notification/NotifierTest.php b/apps/comments/tests/Unit/Notification/NotifierTest.php index a01c08a6760..87b87e646af 100644 --- a/apps/comments/tests/Unit/Notification/NotifierTest.php +++ b/apps/comments/tests/Unit/Notification/NotifierTest.php @@ -72,7 +72,7 @@ class NotifierTest extends TestCase { $this->comment = $this->createMock(IComment::class); } - public function testPrepareSuccess() { + public function testPrepareSuccess(): void { $fileName = 'Gre\'thor.odp'; $displayName = 'Huraga'; $message = '@Huraga mentioned you in a comment on "Gre\'thor.odp"'; @@ -190,7 +190,7 @@ class NotifierTest extends TestCase { $this->notifier->prepare($this->notification, $this->lc); } - public function testPrepareSuccessDeletedUser() { + public function testPrepareSuccessDeletedUser(): void { $fileName = 'Gre\'thor.odp'; $message = 'You were mentioned on "Gre\'thor.odp", in a comment by an account that has since been deleted'; @@ -305,7 +305,7 @@ class NotifierTest extends TestCase { } - public function testPrepareDifferentApp() { + public function testPrepareDifferentApp(): void { $this->expectException(UnknownNotificationException::class); $this->folder @@ -342,7 +342,7 @@ class NotifierTest extends TestCase { } - public function testPrepareNotFound() { + public function testPrepareNotFound(): void { $this->expectException(UnknownNotificationException::class); $this->folder @@ -380,7 +380,7 @@ class NotifierTest extends TestCase { } - public function testPrepareDifferentSubject() { + public function testPrepareDifferentSubject(): void { $this->expectException(UnknownNotificationException::class); $displayName = 'Huraga'; @@ -437,7 +437,7 @@ class NotifierTest extends TestCase { } - public function testPrepareNotFiles() { + public function testPrepareNotFiles(): void { $this->expectException(UnknownNotificationException::class); $displayName = 'Huraga'; @@ -495,7 +495,7 @@ class NotifierTest extends TestCase { } - public function testPrepareUnresolvableFileID() { + public function testPrepareUnresolvableFileID(): void { $this->expectException(AlreadyProcessedException::class); $displayName = 'Huraga'; diff --git a/apps/dashboard/l10n/ru.js b/apps/dashboard/l10n/ru.js index 3bd3909939f..60b0133bb0c 100644 --- a/apps/dashboard/l10n/ru.js +++ b/apps/dashboard/l10n/ru.js @@ -3,6 +3,7 @@ OC.L10N.register( { "Dashboard" : "Виджеты", "Dashboard app" : "Приложение Виджеты", + "Start your day informed\n\nThe Nextcloud Dashboard is your starting point of the day, giving you an overview of your upcoming appointments, urgent emails, chat messages, incoming tickets, latest tweets and much more! People can add the widgets they like and change the background to their liking." : "Начните свой день информированным\n\nПанель инструментов Nextcloud — это ваша отправная точка дня, дающая вам обзор предстоящих встреч, срочных писем, сообщений чата, входящих тикетов, последних твитов и многого другого! Люди могут добавлять виджеты, которые им нравятся, и менять фон по своему вкусу.", "\"{title} icon\"" : "\"{title} иконка\"", "Customize" : "Настроить", "Edit widgets" : "Редактировать виджеты", diff --git a/apps/dashboard/l10n/ru.json b/apps/dashboard/l10n/ru.json index 4aea12cb219..274402b1416 100644 --- a/apps/dashboard/l10n/ru.json +++ b/apps/dashboard/l10n/ru.json @@ -1,6 +1,7 @@ { "translations": { "Dashboard" : "Виджеты", "Dashboard app" : "Приложение Виджеты", + "Start your day informed\n\nThe Nextcloud Dashboard is your starting point of the day, giving you an overview of your upcoming appointments, urgent emails, chat messages, incoming tickets, latest tweets and much more! People can add the widgets they like and change the background to their liking." : "Начните свой день информированным\n\nПанель инструментов Nextcloud — это ваша отправная точка дня, дающая вам обзор предстоящих встреч, срочных писем, сообщений чата, входящих тикетов, последних твитов и многого другого! Люди могут добавлять виджеты, которые им нравятся, и менять фон по своему вкусу.", "\"{title} icon\"" : "\"{title} иконка\"", "Customize" : "Настроить", "Edit widgets" : "Редактировать виджеты", diff --git a/apps/dav/appinfo/info.xml b/apps/dav/appinfo/info.xml index eb570eacf85..7c6b02a35d4 100644 --- a/apps/dav/appinfo/info.xml +++ b/apps/dav/appinfo/info.xml @@ -54,6 +54,7 @@ <commands> <command>OCA\DAV\Command\CreateAddressBook</command> <command>OCA\DAV\Command\CreateCalendar</command> + <command>OCA\DAV\Command\CreateSubscription</command> <command>OCA\DAV\Command\DeleteCalendar</command> <command>OCA\DAV\Command\FixCalendarSyncCommand</command> <command>OCA\DAV\Command\MoveCalendar</command> diff --git a/apps/dav/composer/composer/autoload_classmap.php b/apps/dav/composer/composer/autoload_classmap.php index 43c3cb12ddb..4e59f50d8d7 100644 --- a/apps/dav/composer/composer/autoload_classmap.php +++ b/apps/dav/composer/composer/autoload_classmap.php @@ -153,6 +153,7 @@ return array( 'OCA\\DAV\\CardDAV\\Xml\\Groups' => $baseDir . '/../lib/CardDAV/Xml/Groups.php', 'OCA\\DAV\\Command\\CreateAddressBook' => $baseDir . '/../lib/Command/CreateAddressBook.php', 'OCA\\DAV\\Command\\CreateCalendar' => $baseDir . '/../lib/Command/CreateCalendar.php', + 'OCA\\DAV\\Command\\CreateSubscription' => $baseDir . '/../lib/Command/CreateSubscription.php', 'OCA\\DAV\\Command\\DeleteCalendar' => $baseDir . '/../lib/Command/DeleteCalendar.php', 'OCA\\DAV\\Command\\FixCalendarSyncCommand' => $baseDir . '/../lib/Command/FixCalendarSyncCommand.php', 'OCA\\DAV\\Command\\ListCalendars' => $baseDir . '/../lib/Command/ListCalendars.php', diff --git a/apps/dav/composer/composer/autoload_static.php b/apps/dav/composer/composer/autoload_static.php index fd49b5fb45c..f241c660140 100644 --- a/apps/dav/composer/composer/autoload_static.php +++ b/apps/dav/composer/composer/autoload_static.php @@ -168,6 +168,7 @@ class ComposerStaticInitDAV 'OCA\\DAV\\CardDAV\\Xml\\Groups' => __DIR__ . '/..' . '/../lib/CardDAV/Xml/Groups.php', 'OCA\\DAV\\Command\\CreateAddressBook' => __DIR__ . '/..' . '/../lib/Command/CreateAddressBook.php', 'OCA\\DAV\\Command\\CreateCalendar' => __DIR__ . '/..' . '/../lib/Command/CreateCalendar.php', + 'OCA\\DAV\\Command\\CreateSubscription' => __DIR__ . '/..' . '/../lib/Command/CreateSubscription.php', 'OCA\\DAV\\Command\\DeleteCalendar' => __DIR__ . '/..' . '/../lib/Command/DeleteCalendar.php', 'OCA\\DAV\\Command\\FixCalendarSyncCommand' => __DIR__ . '/..' . '/../lib/Command/FixCalendarSyncCommand.php', 'OCA\\DAV\\Command\\ListCalendars' => __DIR__ . '/..' . '/../lib/Command/ListCalendars.php', diff --git a/apps/dav/l10n/ru.js b/apps/dav/l10n/ru.js index f9ecd2238c7..67913c0e83a 100644 --- a/apps/dav/l10n/ru.js +++ b/apps/dav/l10n/ru.js @@ -72,6 +72,7 @@ OC.L10N.register( "Description: %s" : "Описание: %s", "Where: %s" : "Где: %s", "%1$s via %2$s" : "%1$s через %2$s", + "Could not generate next recurrence statement" : "Не удалось сгенерировать следующий оператор повторения", "Cancelled: %1$s" : "Событие отменено: %1$s", "\"%1$s\" has been canceled" : "Событие «%1$s» отменено", "Re: %1$s" : "Re: %1$s", @@ -89,6 +90,7 @@ OC.L10N.register( "When:" : "Когда:", "Location:" : "Местонахождение:", "Link:" : "Ссылка:", + "Occurring:" : "Происходит:", "Accept" : "Принять", "Decline" : "Отклонить", "More options …" : "Дополнительные параметры…", @@ -113,6 +115,10 @@ OC.L10N.register( "November" : "Ноябрь", "December" : "Декабрь", "First" : "Первый", + "Second" : "Второй", + "Third" : "Третий", + "Fourth" : "Четвертый", + "Fifty" : "Пятый", "Last" : "Последний", "Contacts" : "Контакты", "{actor} created address book {addressbook}" : "{actor} создал(а) адресную книгу «{addressbook}»", @@ -156,6 +162,7 @@ OC.L10N.register( "Failed to unlink: %1$s" : "Не удалось разорвать связь: %1$s", "Failed to write file contents: %1$s" : "Не удалось записать содержимое файла: %1$s", "File not found: %1$s" : "Файл не найден: %1$s", + "Invalid target path" : "Неверный целевой путь", "System is in maintenance mode." : "Сервер находится в режиме обслуживания.", "Upgrade needed" : "Требуется обновление", "Your %s needs to be configured to use HTTPS in order to use CalDAV and CardDAV with iOS/macOS." : "Ваш %s должен быть настроен на использование протокола HTTPS, чтобы можно было использовать CalDAV и CardDAV на iOS/macOS.", @@ -181,6 +188,7 @@ OC.L10N.register( "Last day (inclusive)" : "Последний день (включительно)", "Out of office replacement (optional)" : "Замена вне офиса (по желанию)", "Name of the replacement" : "Название заменяющего устройства", + "No results." : "Неверный целевой путь.", "Start typing." : "Начать печатать.", "Short absence status" : "Краткий статус отсутствия", "Long absence Message" : "Длинное сообщение об отсутствии", diff --git a/apps/dav/l10n/ru.json b/apps/dav/l10n/ru.json index bfb17bdee7b..b2c55d3ea1b 100644 --- a/apps/dav/l10n/ru.json +++ b/apps/dav/l10n/ru.json @@ -70,6 +70,7 @@ "Description: %s" : "Описание: %s", "Where: %s" : "Где: %s", "%1$s via %2$s" : "%1$s через %2$s", + "Could not generate next recurrence statement" : "Не удалось сгенерировать следующий оператор повторения", "Cancelled: %1$s" : "Событие отменено: %1$s", "\"%1$s\" has been canceled" : "Событие «%1$s» отменено", "Re: %1$s" : "Re: %1$s", @@ -87,6 +88,7 @@ "When:" : "Когда:", "Location:" : "Местонахождение:", "Link:" : "Ссылка:", + "Occurring:" : "Происходит:", "Accept" : "Принять", "Decline" : "Отклонить", "More options …" : "Дополнительные параметры…", @@ -111,6 +113,10 @@ "November" : "Ноябрь", "December" : "Декабрь", "First" : "Первый", + "Second" : "Второй", + "Third" : "Третий", + "Fourth" : "Четвертый", + "Fifty" : "Пятый", "Last" : "Последний", "Contacts" : "Контакты", "{actor} created address book {addressbook}" : "{actor} создал(а) адресную книгу «{addressbook}»", @@ -154,6 +160,7 @@ "Failed to unlink: %1$s" : "Не удалось разорвать связь: %1$s", "Failed to write file contents: %1$s" : "Не удалось записать содержимое файла: %1$s", "File not found: %1$s" : "Файл не найден: %1$s", + "Invalid target path" : "Неверный целевой путь", "System is in maintenance mode." : "Сервер находится в режиме обслуживания.", "Upgrade needed" : "Требуется обновление", "Your %s needs to be configured to use HTTPS in order to use CalDAV and CardDAV with iOS/macOS." : "Ваш %s должен быть настроен на использование протокола HTTPS, чтобы можно было использовать CalDAV и CardDAV на iOS/macOS.", @@ -179,6 +186,7 @@ "Last day (inclusive)" : "Последний день (включительно)", "Out of office replacement (optional)" : "Замена вне офиса (по желанию)", "Name of the replacement" : "Название заменяющего устройства", + "No results." : "Неверный целевой путь.", "Start typing." : "Начать печатать.", "Short absence status" : "Краткий статус отсутствия", "Long absence Message" : "Длинное сообщение об отсутствии", diff --git a/apps/dav/lib/BulkUpload/MultipartRequestParser.php b/apps/dav/lib/BulkUpload/MultipartRequestParser.php index b6c4fbcc1be..97aa0597b34 100644 --- a/apps/dav/lib/BulkUpload/MultipartRequestParser.php +++ b/apps/dav/lib/BulkUpload/MultipartRequestParser.php @@ -134,7 +134,7 @@ class MultipartRequestParser { $headers = $this->readPartHeaders(); - $content = $this->readPartContent($headers['content-length'], $headers['x-file-md5']); + $content = $this->readPartContent((int)$headers['content-length'], $headers['x-file-md5']); return [$headers, $content]; } diff --git a/apps/dav/lib/CalDAV/CalDavBackend.php b/apps/dav/lib/CalDAV/CalDavBackend.php index f52f2b53552..8b619712b82 100644 --- a/apps/dav/lib/CalDAV/CalDavBackend.php +++ b/apps/dav/lib/CalDAV/CalDavBackend.php @@ -330,8 +330,8 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription 'id' => $row['id'], 'uri' => $row['uri'], 'principaluri' => $this->convertPrincipal($row['principaluri'], !$this->legacyEndpoint), - '{' . Plugin::NS_CALENDARSERVER . '}getctag' => 'http://sabre.io/ns/sync/' . ($row['synctoken']?$row['synctoken']:'0'), - '{http://sabredav.org/ns}sync-token' => $row['synctoken']?$row['synctoken']:'0', + '{' . Plugin::NS_CALENDARSERVER . '}getctag' => 'http://sabre.io/ns/sync/' . ($row['synctoken'] ?: '0'), + '{http://sabredav.org/ns}sync-token' => $row['synctoken'] ?: '0', '{' . Plugin::NS_CALDAV . '}supported-calendar-component-set' => new SupportedCalendarComponentSet($components), '{' . Plugin::NS_CALDAV . '}schedule-calendar-transp' => new ScheduleCalendarTransp($row['transparent']?'transparent':'opaque'), '{' . \OCA\DAV\DAV\Sharing\Plugin::NS_OWNCLOUD . '}owner-principal' => $this->convertPrincipal($principalUri, !$this->legacyEndpoint), @@ -412,8 +412,8 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription 'id' => $row['id'], 'uri' => $uri, 'principaluri' => $this->convertPrincipal($principalUri, !$this->legacyEndpoint), - '{' . Plugin::NS_CALENDARSERVER . '}getctag' => 'http://sabre.io/ns/sync/' . ($row['synctoken']?$row['synctoken']:'0'), - '{http://sabredav.org/ns}sync-token' => $row['synctoken']?$row['synctoken']:'0', + '{' . Plugin::NS_CALENDARSERVER . '}getctag' => 'http://sabre.io/ns/sync/' . ($row['synctoken'] ?: '0'), + '{http://sabredav.org/ns}sync-token' => $row['synctoken'] ?: '0', '{' . Plugin::NS_CALDAV . '}supported-calendar-component-set' => new SupportedCalendarComponentSet($components), '{' . Plugin::NS_CALDAV . '}schedule-calendar-transp' => new ScheduleCalendarTransp('transparent'), '{' . \OCA\DAV\DAV\Sharing\Plugin::NS_OWNCLOUD . '}owner-principal' => $this->convertPrincipal($row['principaluri'], !$this->legacyEndpoint), @@ -462,8 +462,8 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription 'id' => $row['id'], 'uri' => $row['uri'], 'principaluri' => $this->convertPrincipal($row['principaluri'], !$this->legacyEndpoint), - '{' . Plugin::NS_CALENDARSERVER . '}getctag' => 'http://sabre.io/ns/sync/' . ($row['synctoken']?$row['synctoken']:'0'), - '{http://sabredav.org/ns}sync-token' => $row['synctoken']?$row['synctoken']:'0', + '{' . Plugin::NS_CALENDARSERVER . '}getctag' => 'http://sabre.io/ns/sync/' . ($row['synctoken'] ?: '0'), + '{http://sabredav.org/ns}sync-token' => $row['synctoken'] ?: '0', '{' . Plugin::NS_CALDAV . '}supported-calendar-component-set' => new SupportedCalendarComponentSet($components), '{' . Plugin::NS_CALDAV . '}schedule-calendar-transp' => new ScheduleCalendarTransp($row['transparent']?'transparent':'opaque'), ]; @@ -514,8 +514,8 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription 'id' => $row['id'], 'uri' => $row['publicuri'], 'principaluri' => $this->convertPrincipal($row['principaluri'], !$this->legacyEndpoint), - '{' . Plugin::NS_CALENDARSERVER . '}getctag' => 'http://sabre.io/ns/sync/' . ($row['synctoken']?$row['synctoken']:'0'), - '{http://sabredav.org/ns}sync-token' => $row['synctoken']?$row['synctoken']:'0', + '{' . Plugin::NS_CALENDARSERVER . '}getctag' => 'http://sabre.io/ns/sync/' . ($row['synctoken'] ?: '0'), + '{http://sabredav.org/ns}sync-token' => $row['synctoken'] ?: '0', '{' . Plugin::NS_CALDAV . '}supported-calendar-component-set' => new SupportedCalendarComponentSet($components), '{' . Plugin::NS_CALDAV . '}schedule-calendar-transp' => new ScheduleCalendarTransp($row['transparent']?'transparent':'opaque'), '{' . \OCA\DAV\DAV\Sharing\Plugin::NS_OWNCLOUD . '}owner-principal' => $this->convertPrincipal($row['principaluri'], $this->legacyEndpoint), @@ -579,8 +579,8 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription 'id' => $row['id'], 'uri' => $row['publicuri'], 'principaluri' => $this->convertPrincipal($row['principaluri'], !$this->legacyEndpoint), - '{' . Plugin::NS_CALENDARSERVER . '}getctag' => 'http://sabre.io/ns/sync/' . ($row['synctoken']?$row['synctoken']:'0'), - '{http://sabredav.org/ns}sync-token' => $row['synctoken']?$row['synctoken']:'0', + '{' . Plugin::NS_CALENDARSERVER . '}getctag' => 'http://sabre.io/ns/sync/' . ($row['synctoken'] ?: '0'), + '{http://sabredav.org/ns}sync-token' => $row['synctoken'] ?: '0', '{' . Plugin::NS_CALDAV . '}supported-calendar-component-set' => new SupportedCalendarComponentSet($components), '{' . Plugin::NS_CALDAV . '}schedule-calendar-transp' => new ScheduleCalendarTransp($row['transparent']?'transparent':'opaque'), '{' . \OCA\DAV\DAV\Sharing\Plugin::NS_OWNCLOUD . '}owner-principal' => $this->convertPrincipal($row['principaluri'], !$this->legacyEndpoint), @@ -633,8 +633,8 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription 'id' => $row['id'], 'uri' => $row['uri'], 'principaluri' => $this->convertPrincipal($row['principaluri'], !$this->legacyEndpoint), - '{' . Plugin::NS_CALENDARSERVER . '}getctag' => 'http://sabre.io/ns/sync/' . ($row['synctoken']?$row['synctoken']:'0'), - '{http://sabredav.org/ns}sync-token' => $row['synctoken']?$row['synctoken']:'0', + '{' . Plugin::NS_CALENDARSERVER . '}getctag' => 'http://sabre.io/ns/sync/' . ($row['synctoken'] ?: '0'), + '{http://sabredav.org/ns}sync-token' => $row['synctoken'] ?: '0', '{' . Plugin::NS_CALDAV . '}supported-calendar-component-set' => new SupportedCalendarComponentSet($components), '{' . Plugin::NS_CALDAV . '}schedule-calendar-transp' => new ScheduleCalendarTransp($row['transparent']?'transparent':'opaque'), ]; @@ -681,7 +681,7 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription 'id' => $row['id'], 'uri' => $row['uri'], 'principaluri' => $this->convertPrincipal($row['principaluri'], !$this->legacyEndpoint), - '{' . Plugin::NS_CALENDARSERVER . '}getctag' => 'http://sabre.io/ns/sync/' . ($row['synctoken']?$row['synctoken']:'0'), + '{' . Plugin::NS_CALENDARSERVER . '}getctag' => 'http://sabre.io/ns/sync/' . ($row['synctoken'] ?: '0'), '{http://sabredav.org/ns}sync-token' => $row['synctoken'] ?? 0, '{' . Plugin::NS_CALDAV . '}supported-calendar-component-set' => new SupportedCalendarComponentSet($components), '{' . Plugin::NS_CALDAV . '}schedule-calendar-transp' => new ScheduleCalendarTransp($row['transparent']?'transparent':'opaque'), @@ -727,7 +727,7 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription 'source' => $row['source'], 'lastmodified' => $row['lastmodified'], '{' . Plugin::NS_CALDAV . '}supported-calendar-component-set' => new SupportedCalendarComponentSet(['VTODO', 'VEVENT']), - '{http://sabredav.org/ns}sync-token' => $row['synctoken']?$row['synctoken']:'0', + '{http://sabredav.org/ns}sync-token' => $row['synctoken'] ?: '0', ]; return $this->rowToSubscription($row, $subscription); @@ -2575,7 +2575,7 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription 'lastmodified' => $row['lastmodified'], '{' . Plugin::NS_CALDAV . '}supported-calendar-component-set' => new SupportedCalendarComponentSet(['VTODO', 'VEVENT']), - '{http://sabredav.org/ns}sync-token' => $row['synctoken']?$row['synctoken']:'0', + '{http://sabredav.org/ns}sync-token' => $row['synctoken'] ?: '0', ]; $subscriptions[] = $this->rowToSubscription($row, $subscription); diff --git a/apps/dav/lib/Command/CreateSubscription.php b/apps/dav/lib/Command/CreateSubscription.php new file mode 100644 index 00000000000..1364070e530 --- /dev/null +++ b/apps/dav/lib/Command/CreateSubscription.php @@ -0,0 +1,78 @@ +<?php + +declare(strict_types=1); + +/** + * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors + * SPDX-License-Identifier: AGPL-3.0-only + */ +namespace OCA\DAV\Command; + +use OCA\DAV\CalDAV\CalDavBackend; +use OCA\Theming\ThemingDefaults; +use OCP\IUserManager; +use Sabre\DAV\Xml\Property\Href; +use Symfony\Component\Console\Command\Command; +use Symfony\Component\Console\Input\InputArgument; +use Symfony\Component\Console\Input\InputInterface; +use Symfony\Component\Console\Output\OutputInterface; + +class CreateSubscription extends Command { + public function __construct( + protected IUserManager $userManager, + private CalDavBackend $caldav, + private ThemingDefaults $themingDefaults, + ) { + parent::__construct(); + } + + protected function configure(): void { + $this + ->setName('dav:create-subscription') + ->setDescription('Create a dav subscription') + ->addArgument('user', + InputArgument::REQUIRED, + 'User for whom the subscription will be created') + ->addArgument('name', + InputArgument::REQUIRED, + 'Name of the subscription to create') + ->addArgument('url', + InputArgument::REQUIRED, + 'Source url of the subscription to create') + ->addArgument('color', + InputArgument::OPTIONAL, + 'Hex color code for the calendar color'); + } + + protected function execute(InputInterface $input, OutputInterface $output): int { + $user = $input->getArgument('user'); + if (!$this->userManager->userExists($user)) { + $output->writeln("<error>User <$user> in unknown.</error>"); + return self::FAILURE; + } + + $name = $input->getArgument('name'); + $url = $input->getArgument('url'); + $color = $input->getArgument('color') ?? $this->themingDefaults->getColorPrimary(); + $subscriptions = $this->caldav->getSubscriptionsForUser("principals/users/$user"); + + $exists = array_filter($subscriptions, function ($row) use ($url) { + return $row['source'] === $url; + }); + + if (!empty($exists)) { + $output->writeln("<error>Subscription for url <$url> already exists for this user.</error>"); + return self::FAILURE; + } + + $urlProperty = new Href($url); + $properties = ['{http://owncloud.org/ns}calendar-enabled' => 1, + '{DAV:}displayname' => $name, + '{http://apple.com/ns/ical/}calendar-color' => $color, + '{http://calendarserver.org/ns/}source' => $urlProperty, + ]; + $this->caldav->createSubscription("principals/users/$user", $name, $properties); + return self::SUCCESS; + } + +} diff --git a/apps/dav/lib/Connector/Sabre/FilesReportPlugin.php b/apps/dav/lib/Connector/Sabre/FilesReportPlugin.php index 52e84145b17..581adfa4184 100644 --- a/apps/dav/lib/Connector/Sabre/FilesReportPlugin.php +++ b/apps/dav/lib/Connector/Sabre/FilesReportPlugin.php @@ -410,7 +410,7 @@ class FilesReportPlugin extends ServerPlugin { $results = []; foreach ($fileIds as $fileId) { - $entry = $folder->getFirstNodeById($fileId); + $entry = $folder->getFirstNodeById((int)$fileId); if ($entry) { $results[] = $this->wrapNode($entry); } diff --git a/apps/dav/lib/Connector/Sabre/Node.php b/apps/dav/lib/Connector/Sabre/Node.php index 1d3773220f8..3ca542fee73 100644 --- a/apps/dav/lib/Connector/Sabre/Node.php +++ b/apps/dav/lib/Connector/Sabre/Node.php @@ -392,7 +392,7 @@ abstract class Node implements \Sabre\DAV\INode { return $this->node; } - protected function sanitizeMtime($mtimeFromRequest) { + protected function sanitizeMtime(string $mtimeFromRequest): int { return MtimeSanitizer::sanitizeMtime($mtimeFromRequest); } } diff --git a/apps/dav/lib/Provisioning/Apple/AppleProvisioningPlugin.php b/apps/dav/lib/Provisioning/Apple/AppleProvisioningPlugin.php index 838c1fbb781..54818a890f3 100644 --- a/apps/dav/lib/Provisioning/Apple/AppleProvisioningPlugin.php +++ b/apps/dav/lib/Provisioning/Apple/AppleProvisioningPlugin.php @@ -133,7 +133,7 @@ class AppleProvisioningPlugin extends ServerPlugin { $filename = $userId . '-' . AppleProvisioningNode::FILENAME; $xmlSkeleton = $this->getTemplate(); - $body = vsprintf($xmlSkeleton, array_map(function ($v) { + $body = vsprintf($xmlSkeleton, array_map(function (string $v) { return \htmlspecialchars($v, ENT_XML1, 'UTF-8'); }, [ $description, diff --git a/apps/dav/tests/unit/BackgroundJob/OutOfOfficeEventDispatcherJobTest.php b/apps/dav/tests/unit/BackgroundJob/OutOfOfficeEventDispatcherJobTest.php index b42334523f8..5ddd9eba6f8 100644 --- a/apps/dav/tests/unit/BackgroundJob/OutOfOfficeEventDispatcherJobTest.php +++ b/apps/dav/tests/unit/BackgroundJob/OutOfOfficeEventDispatcherJobTest.php @@ -62,7 +62,7 @@ class OutOfOfficeEventDispatcherJobTest extends TestCase { ); } - public function testDispatchStartEvent() { + public function testDispatchStartEvent(): void { $this->timezoneService->method('getUserTimezone')->with('user')->willReturn('Europe/Berlin'); $absence = new Absence(); @@ -94,7 +94,7 @@ class OutOfOfficeEventDispatcherJobTest extends TestCase { ]); } - public function testDispatchStopEvent() { + public function testDispatchStopEvent(): void { $this->timezoneService->method('getUserTimezone')->with('user')->willReturn('Europe/Berlin'); $absence = new Absence(); @@ -126,7 +126,7 @@ class OutOfOfficeEventDispatcherJobTest extends TestCase { ]); } - public function testDoesntDispatchUnknownEvent() { + public function testDoesntDispatchUnknownEvent(): void { $this->timezoneService->method('getUserTimezone')->with('user')->willReturn('Europe/Berlin'); $absence = new Absence(); diff --git a/apps/dav/tests/unit/CalDAV/AppCalendar/AppCalendarTest.php b/apps/dav/tests/unit/CalDAV/AppCalendar/AppCalendarTest.php index b8983350348..f7fa114ff28 100644 --- a/apps/dav/tests/unit/CalDAV/AppCalendar/AppCalendarTest.php +++ b/apps/dav/tests/unit/CalDAV/AppCalendar/AppCalendarTest.php @@ -52,7 +52,7 @@ class AppCalendarTest extends TestCase { $this->appCalendar->delete(); } - public function testCreateFile() { + public function testCreateFile(): void { $this->writeableCalendar->expects($this->exactly(3)) ->method('createFromString') ->withConsecutive(['some-name', 'data'], ['other-name', ''], ['name', 'some data']); @@ -69,7 +69,7 @@ class AppCalendarTest extends TestCase { fclose($fp); } - public function testCreateFile_readOnly() { + public function testCreateFile_readOnly(): void { // If writing is not supported $this->expectException(\Sabre\DAV\Exception\Forbidden::class); $this->expectExceptionMessage('Creating a new entry is not allowed'); diff --git a/apps/dav/tests/unit/CalDAV/AppCalendar/CalendarObjectTest.php b/apps/dav/tests/unit/CalDAV/AppCalendar/CalendarObjectTest.php index 92288f5dfb0..a913c2dde6f 100644 --- a/apps/dav/tests/unit/CalDAV/AppCalendar/CalendarObjectTest.php +++ b/apps/dav/tests/unit/CalDAV/AppCalendar/CalendarObjectTest.php @@ -33,15 +33,15 @@ class CalendarObjectTest extends TestCase { $this->calendarObject = new CalendarObject($this->calendar, $this->backend, $this->vobject); } - public function testGetOwner() { + public function testGetOwner(): void { $this->assertEquals($this->calendarObject->getOwner(), 'owner'); } - public function testGetGroup() { + public function testGetGroup(): void { $this->assertEquals($this->calendarObject->getGroup(), 'group'); } - public function testGetACL() { + public function testGetACL(): void { $this->calendar->expects($this->exactly(2)) ->method('getPermissions') ->willReturnOnConsecutiveCalls(Constants::PERMISSION_READ, Constants::PERMISSION_ALL); @@ -70,17 +70,17 @@ class CalendarObjectTest extends TestCase { ]); } - public function testSetACL() { + public function testSetACL(): void { $this->expectException(\Sabre\DAV\Exception\Forbidden::class); $this->calendarObject->setACL([]); } - public function testPut_readOnlyBackend() { + public function testPut_readOnlyBackend(): void { $this->expectException(\Sabre\DAV\Exception\Forbidden::class); $this->calendarObject->put('foo'); } - public function testPut_noPermissions() { + public function testPut_noPermissions(): void { $this->expectException(\Sabre\DAV\Exception\Forbidden::class); $backend = $this->createMock(ICreateFromString::class); @@ -93,7 +93,7 @@ class CalendarObjectTest extends TestCase { $calendarObject->put('foo'); } - public function testPut() { + public function testPut(): void { $backend = $this->createMock(ICreateFromString::class); $calendarObject = new CalendarObject($this->calendar, $backend, $this->vobject); @@ -110,19 +110,19 @@ class CalendarObjectTest extends TestCase { $calendarObject->put('foo'); } - public function testGet() { + public function testGet(): void { $this->vobject->expects($this->once()) ->method('serialize') ->willReturn('foo'); $this->assertEquals($this->calendarObject->get(), 'foo'); } - public function testDelete_notWriteable() { + public function testDelete_notWriteable(): void { $this->expectException(\Sabre\DAV\Exception\Forbidden::class); $this->calendarObject->delete(); } - public function testDelete_noPermission() { + public function testDelete_noPermission(): void { $backend = $this->createMock(ICreateFromString::class); $calendarObject = new CalendarObject($this->calendar, $backend, $this->vobject); @@ -130,7 +130,7 @@ class CalendarObjectTest extends TestCase { $calendarObject->delete(); } - public function testDelete() { + public function testDelete(): void { $backend = $this->createMock(ICreateFromString::class); $calendarObject = new CalendarObject($this->calendar, $backend, $this->vobject); @@ -153,7 +153,7 @@ class CalendarObjectTest extends TestCase { $calendarObject->delete(); } - public function testGetName() { + public function testGetName(): void { $this->vobject->expects($this->exactly(2)) ->method('getBaseComponent') ->willReturnOnConsecutiveCalls((object)['UID' => 'someid'], (object)['UID' => 'someid', 'X-FILENAME' => 'real-filename.ics']); @@ -162,7 +162,7 @@ class CalendarObjectTest extends TestCase { $this->assertEquals($this->calendarObject->getName(), 'real-filename.ics'); } - public function testSetName() { + public function testSetName(): void { $this->expectException(\Sabre\DAV\Exception\Forbidden::class); $this->calendarObject->setName('Some name'); } diff --git a/apps/dav/tests/unit/CalDAV/CachedSubscriptionProviderTest.php b/apps/dav/tests/unit/CalDAV/CachedSubscriptionProviderTest.php index 22998eec3d9..be47b2bf640 100644 --- a/apps/dav/tests/unit/CalDAV/CachedSubscriptionProviderTest.php +++ b/apps/dav/tests/unit/CalDAV/CachedSubscriptionProviderTest.php @@ -47,7 +47,7 @@ class CachedSubscriptionProviderTest extends TestCase { $this->provider = new CachedSubscriptionProvider($this->backend); } - public function testGetCalendars() { + public function testGetCalendars(): void { $calendars = $this->provider->getCalendars( 'user-principal-123', [] @@ -58,7 +58,7 @@ class CachedSubscriptionProviderTest extends TestCase { $this->assertInstanceOf(CachedSubscriptionImpl::class, $calendars[1]); } - public function testGetCalendarsFilterByUri() { + public function testGetCalendarsFilterByUri(): void { $calendars = $this->provider->getCalendars( 'user-principal-123', ['subscription-1'] diff --git a/apps/dav/tests/unit/CalDAV/CalDavBackendTest.php b/apps/dav/tests/unit/CalDAV/CalDavBackendTest.php index ac4045ea757..c82ca350c90 100644 --- a/apps/dav/tests/unit/CalDAV/CalDavBackendTest.php +++ b/apps/dav/tests/unit/CalDAV/CalDavBackendTest.php @@ -1490,7 +1490,7 @@ EOD; self::assertSame(0, $deleted); } - public function testSearchAndExpandRecurrences() { + public function testSearchAndExpandRecurrences(): void { $calendarId = $this->createTestCalendar(); $calendarInfo = [ 'id' => $calendarId, @@ -1646,7 +1646,7 @@ EOD; self::assertEquals([$uri2], $changesAfter['deleted']); } - public function testSearchWithLimitAndTimeRange() { + public function testSearchWithLimitAndTimeRange(): void { $calendarId = $this->createTestCalendar(); $calendarInfo = [ 'id' => $calendarId, @@ -1703,7 +1703,7 @@ EOD; ); } - public function testSearchWithLimitAndTimeRangeShouldNotReturnMoreObjectsThenLimit() { + public function testSearchWithLimitAndTimeRangeShouldNotReturnMoreObjectsThenLimit(): void { $calendarId = $this->createTestCalendar(); $calendarInfo = [ 'id' => $calendarId, @@ -1753,7 +1753,7 @@ EOD; ); } - public function testSearchWithLimitAndTimeRangeShouldReturnObjectsInTheSameOrder() { + public function testSearchWithLimitAndTimeRangeShouldReturnObjectsInTheSameOrder(): void { $calendarId = $this->createTestCalendar(); $calendarInfo = [ 'id' => $calendarId, @@ -1810,7 +1810,7 @@ EOD; ); } - public function testSearchShouldReturnObjectsInTheSameOrderMissingDate() { + public function testSearchShouldReturnObjectsInTheSameOrderMissingDate(): void { $calendarId = $this->createTestCalendar(); $calendarInfo = [ 'id' => $calendarId, diff --git a/apps/dav/tests/unit/CalDAV/CalendarTest.php b/apps/dav/tests/unit/CalDAV/CalendarTest.php index a2854823cbc..6433af8c340 100644 --- a/apps/dav/tests/unit/CalDAV/CalendarTest.php +++ b/apps/dav/tests/unit/CalDAV/CalendarTest.php @@ -442,7 +442,7 @@ EOD; ]; } - public function testRemoveVAlarms() { + public function testRemoveVAlarms(): void { $publicObjectData = <<<EOD BEGIN:VCALENDAR VERSION:2.0 diff --git a/apps/dav/tests/unit/CalDAV/Schedule/IMipPluginTest.php b/apps/dav/tests/unit/CalDAV/Schedule/IMipPluginTest.php index 104f7cd7f51..36ce091fc69 100644 --- a/apps/dav/tests/unit/CalDAV/Schedule/IMipPluginTest.php +++ b/apps/dav/tests/unit/CalDAV/Schedule/IMipPluginTest.php @@ -202,7 +202,7 @@ class IMipPluginTest extends TestCase { $this->plugin->setVCalendar($oldVCalendar); $this->service->expects(self::once()) ->method('getLastOccurrence') - ->willReturn('1496912700'); + ->willReturn(1496912700); $this->mailer->expects(self::once()) ->method('validateMailAddress') ->with('frodo@hobb.it') @@ -248,7 +248,7 @@ class IMipPluginTest extends TestCase { ->willReturn('yes'); $this->service->expects(self::once()) ->method('createInvitationToken') - ->with($message, $newVevent, '1496912700') + ->with($message, $newVevent, 1496912700) ->willReturn('token'); $this->service->expects(self::once()) ->method('addResponseButtons') @@ -305,7 +305,7 @@ class IMipPluginTest extends TestCase { $this->plugin->setVCalendar($oldVCalendar); $this->service->expects(self::once()) ->method('getLastOccurrence') - ->willReturn('1496912700'); + ->willReturn(1496912700); $this->mailer->expects(self::once()) ->method('validateMailAddress') ->with('the-shire@hobb.it') @@ -406,7 +406,7 @@ class IMipPluginTest extends TestCase { $this->plugin->setVCalendar($oldVCalendar); $this->service->expects(self::once()) ->method('getLastOccurrence') - ->willReturn('1496912700'); + ->willReturn(1496912700); $this->mailer->expects(self::once()) ->method('validateMailAddress') ->with('frodo@hobb.it') @@ -452,7 +452,7 @@ class IMipPluginTest extends TestCase { ->willReturn('yes'); $this->service->expects(self::once()) ->method('createInvitationToken') - ->with($message, $newVevent, '1496912700') + ->with($message, $newVevent, 1496912700) ->willReturn('token'); $this->service->expects(self::once()) ->method('addResponseButtons') @@ -467,7 +467,7 @@ class IMipPluginTest extends TestCase { $this->assertEquals('1.1', $message->getScheduleStatus()); } - public function testEmailValidationFailed() { + public function testEmailValidationFailed(): void { $message = new Message(); $message->method = 'REQUEST'; $message->message = new VCalendar(); @@ -485,7 +485,7 @@ class IMipPluginTest extends TestCase { $this->service->expects(self::once()) ->method('getLastOccurrence') - ->willReturn('1496912700'); + ->willReturn(1496912700); $this->mailer->expects(self::once()) ->method('validateMailAddress') ->with('frodo@hobb.it') @@ -537,7 +537,7 @@ class IMipPluginTest extends TestCase { $this->plugin->setVCalendar($oldVcalendar); $this->service->expects(self::once()) ->method('getLastOccurrence') - ->willReturn('1496912700'); + ->willReturn(1496912700); $this->mailer->expects(self::once()) ->method('validateMailAddress') ->with('frodo@hobb.it') @@ -583,7 +583,7 @@ class IMipPluginTest extends TestCase { ->willReturn('yes'); $this->service->expects(self::once()) ->method('createInvitationToken') - ->with($message, $newVevent, '1496912700') + ->with($message, $newVevent, 1496912700) ->willReturn('token'); $this->service->expects(self::once()) ->method('addResponseButtons') @@ -650,7 +650,7 @@ class IMipPluginTest extends TestCase { // construct service mock returns $this->service->expects(self::once()) ->method('getLastOccurrence') - ->willReturn('1496912700'); + ->willReturn(1496912700); $this->service->expects(self::once()) ->method('getCurrentAttendee') ->with($message) @@ -676,7 +676,7 @@ class IMipPluginTest extends TestCase { ->willReturn(true); $this->service->expects(self::once()) ->method('createInvitationToken') - ->with($message, $event, '1496912700') + ->with($message, $event, 1496912700) ->willReturn('token'); $this->service->expects(self::once()) ->method('addResponseButtons') @@ -703,7 +703,7 @@ class IMipPluginTest extends TestCase { ->method('findServiceByAddress') ->with('user1', 'gandalf@wiz.ard') ->willReturn($this->mailService); - + $this->plugin->schedule($message); $this->assertEquals('1.1', $message->getScheduleStatus()); } @@ -737,7 +737,7 @@ class IMipPluginTest extends TestCase { } $this->service->expects(self::once()) ->method('getLastOccurrence') - ->willReturn('1496912700'); + ->willReturn(1496912700); $this->mailer->expects(self::once()) ->method('validateMailAddress') ->with('frodo@hobb.it') @@ -784,7 +784,7 @@ class IMipPluginTest extends TestCase { ->willReturn('yes'); $this->service->expects(self::once()) ->method('createInvitationToken') - ->with($message, $newVevent, '1496912700') + ->with($message, $newVevent, 1496912700) ->willReturn('token'); $this->service->expects(self::once()) ->method('addResponseButtons') @@ -830,7 +830,7 @@ class IMipPluginTest extends TestCase { } $this->service->expects(self::once()) ->method('getLastOccurrence') - ->willReturn('1496912700'); + ->willReturn(1496912700); $this->mailer->expects(self::once()) ->method('validateMailAddress') ->with('frodo@hobb.it') diff --git a/apps/dav/tests/unit/CalDAV/Schedule/PluginTest.php b/apps/dav/tests/unit/CalDAV/Schedule/PluginTest.php index aa2903b519f..8d98a765fc1 100644 --- a/apps/dav/tests/unit/CalDAV/Schedule/PluginTest.php +++ b/apps/dav/tests/unit/CalDAV/Schedule/PluginTest.php @@ -400,7 +400,7 @@ class PluginTest extends TestCase { * * Should generate 2 messages for attendees User 2 and User External */ - public function testCalendarObjectChangePersonalCalendarCreate() { + public function testCalendarObjectChangePersonalCalendarCreate(): void { // define place holders /** @var Message[] $iTipMessages */ @@ -504,7 +504,7 @@ class PluginTest extends TestCase { * * Should generate 3 messages for attendees User 2 (Sharee), User 3 (Non-Sharee) and User External */ - public function testCalendarObjectChangeSharedCalendarSharerCreate() { + public function testCalendarObjectChangeSharedCalendarSharerCreate(): void { // define place holders /** @var Message[] $iTipMessages */ @@ -620,7 +620,7 @@ class PluginTest extends TestCase { * * Should generate 3 messages for attendees User 1 (Sharer/Owner), User 3 (Non-Sharee) and User External */ - public function testCalendarObjectChangeSharedCalendarShreeCreate() { + public function testCalendarObjectChangeSharedCalendarShreeCreate(): void { // define place holders /** @var Message[] $iTipMessages */ diff --git a/apps/dav/tests/unit/CalDAV/WebcalCaching/ConnectionTest.php b/apps/dav/tests/unit/CalDAV/WebcalCaching/ConnectionTest.php index ee903a5e0fa..0d836e44949 100644 --- a/apps/dav/tests/unit/CalDAV/WebcalCaching/ConnectionTest.php +++ b/apps/dav/tests/unit/CalDAV/WebcalCaching/ConnectionTest.php @@ -37,7 +37,7 @@ class ConnectionTest extends TestCase { /** * @dataProvider runLocalURLDataProvider */ - public function testLocalUrl($source) { + public function testLocalUrl($source): void { $subscription = [ 'id' => 42, 'uri' => 'sub123', diff --git a/apps/dav/tests/unit/Controller/UpcomingEventsControllerTest.php b/apps/dav/tests/unit/Controller/UpcomingEventsControllerTest.php index 9e5c03bb245..bab0ef77bd0 100644 --- a/apps/dav/tests/unit/Controller/UpcomingEventsControllerTest.php +++ b/apps/dav/tests/unit/Controller/UpcomingEventsControllerTest.php @@ -28,7 +28,7 @@ class UpcomingEventsControllerTest extends TestCase { $this->service = $this->createMock(UpcomingEventsService::class); } - public function testGetEventsAnonymously() { + public function testGetEventsAnonymously(): void { $controller = new UpcomingEventsController( $this->request, null, @@ -41,7 +41,7 @@ class UpcomingEventsControllerTest extends TestCase { self::assertSame(401, $response->getStatus()); } - public function testGetEventsByLocation() { + public function testGetEventsByLocation(): void { $controller = new UpcomingEventsController( $this->request, 'u1', diff --git a/apps/dav/tests/unit/Service/AbsenceServiceTest.php b/apps/dav/tests/unit/Service/AbsenceServiceTest.php index 1bc5f53f18c..5cff29a6f61 100644 --- a/apps/dav/tests/unit/Service/AbsenceServiceTest.php +++ b/apps/dav/tests/unit/Service/AbsenceServiceTest.php @@ -62,7 +62,7 @@ class AbsenceServiceTest extends TestCase { ); } - public function testCreateAbsenceEmitsScheduledEvent() { + public function testCreateAbsenceEmitsScheduledEvent(): void { $tz = new DateTimeZone('Europe/Berlin'); $user = $this->createMock(IUser::class); $user->method('getUID') @@ -117,7 +117,7 @@ class AbsenceServiceTest extends TestCase { ); } - public function testUpdateAbsenceEmitsChangedEvent() { + public function testUpdateAbsenceEmitsChangedEvent(): void { $tz = new DateTimeZone('Europe/Berlin'); $user = $this->createMock(IUser::class); $user->method('getUID') @@ -181,7 +181,7 @@ class AbsenceServiceTest extends TestCase { ); } - public function testCreateAbsenceSchedulesBothJobs() { + public function testCreateAbsenceSchedulesBothJobs(): void { $tz = new DateTimeZone('Europe/Berlin'); $startDateString = '2023-01-05'; $startDate = new DateTimeImmutable($startDateString, $tz); @@ -230,7 +230,7 @@ class AbsenceServiceTest extends TestCase { ); } - public function testCreateAbsenceSchedulesOnlyEndJob() { + public function testCreateAbsenceSchedulesOnlyEndJob(): void { $tz = new DateTimeZone('Europe/Berlin'); $endDateString = '2023-01-10'; $endDate = new DateTimeImmutable($endDateString, $tz); @@ -271,7 +271,7 @@ class AbsenceServiceTest extends TestCase { ); } - public function testCreateAbsenceSchedulesNoJob() { + public function testCreateAbsenceSchedulesNoJob(): void { $tz = new DateTimeZone('Europe/Berlin'); $user = $this->createMock(IUser::class); $user->method('getUID') @@ -306,7 +306,7 @@ class AbsenceServiceTest extends TestCase { ); } - public function testUpdateAbsenceSchedulesBothJobs() { + public function testUpdateAbsenceSchedulesBothJobs(): void { $tz = new DateTimeZone('Europe/Berlin'); $startDateString = '2023-01-05'; $startDate = new DateTimeImmutable($startDateString, $tz); @@ -362,7 +362,7 @@ class AbsenceServiceTest extends TestCase { ); } - public function testUpdateSchedulesOnlyEndJob() { + public function testUpdateSchedulesOnlyEndJob(): void { $tz = new DateTimeZone('Europe/Berlin'); $endDateString = '2023-01-10'; $endDate = new DateTimeImmutable($endDateString, $tz); @@ -410,7 +410,7 @@ class AbsenceServiceTest extends TestCase { ); } - public function testUpdateAbsenceSchedulesNoJob() { + public function testUpdateAbsenceSchedulesNoJob(): void { $tz = new DateTimeZone('Europe/Berlin'); $user = $this->createMock(IUser::class); $user->method('getUID') diff --git a/apps/dav/tests/unit/Upload/AssemblyStreamTest.php b/apps/dav/tests/unit/Upload/AssemblyStreamTest.php index 89ae0bc1fea..a8517bf757c 100644 --- a/apps/dav/tests/unit/Upload/AssemblyStreamTest.php +++ b/apps/dav/tests/unit/Upload/AssemblyStreamTest.php @@ -57,9 +57,9 @@ class AssemblyStreamTest extends \Test\TestCase { $tonofnodes = []; $tonofdata = ''; for ($i = 0; $i < 101; $i++) { - $thisdata = rand(0, 100); // variable length and content + $thisdata = random_int(0, 100); // variable length and content $tonofdata .= $thisdata; - array_push($tonofnodes, $this->buildNode($i, $thisdata)); + $tonofnodes[] = $this->buildNode((string)$i, (string)$thisdata); } return[ diff --git a/apps/encryption/tests/Command/FixEncryptedVersionTest.php b/apps/encryption/tests/Command/FixEncryptedVersionTest.php index c021c366ad8..fd6e27e030b 100644 --- a/apps/encryption/tests/Command/FixEncryptedVersionTest.php +++ b/apps/encryption/tests/Command/FixEncryptedVersionTest.php @@ -75,7 +75,7 @@ class FixEncryptedVersionTest extends TestCase { * In this test the encrypted version of the file is less than the original value * but greater than zero */ - public function testEncryptedVersionLessThanOriginalValue() { + public function testEncryptedVersionLessThanOriginalValue(): void { $this->util->expects($this->once())->method('isMasterKeyEnabled') ->willReturn(true); @@ -143,7 +143,7 @@ Fixed the file: \"/$this->userId/files/world.txt\" with version 4", $output); * In this test the encrypted version of the file is greater than the original value * but greater than zero */ - public function testEncryptedVersionGreaterThanOriginalValue() { + public function testEncryptedVersionGreaterThanOriginalValue(): void { $this->util->expects($this->once())->method('isMasterKeyEnabled') ->willReturn(true); @@ -202,7 +202,7 @@ The file \"/$this->userId/files/world.txt\" is: OK Fixed the file: \"/$this->userId/files/world.txt\" with version 4", $output); } - public function testVersionIsRestoredToOriginalIfNoFixIsFound() { + public function testVersionIsRestoredToOriginalIfNoFixIsFound(): void { $this->util->expects($this->once())->method('isMasterKeyEnabled') ->willReturn(true); @@ -232,7 +232,7 @@ Fixed the file: \"/$this->userId/files/world.txt\" with version 4", $output); $this->assertEquals(15, $encryptedVersion); } - public function testRepairUnencryptedFileWhenVersionIsSet() { + public function testRepairUnencryptedFileWhenVersionIsSet(): void { $this->util->expects($this->once())->method('isMasterKeyEnabled') ->willReturn(true); @@ -275,7 +275,7 @@ Fixed the file: \"/$this->userId/files/hello.txt\" with version 0 (unencrypted)" /** * Test commands with a file path */ - public function testExecuteWithFilePathOption() { + public function testExecuteWithFilePathOption(): void { $this->util->expects($this->once())->method('isMasterKeyEnabled') ->willReturn(true); @@ -299,7 +299,7 @@ The file \"/$this->userId/files/hello.txt\" is: OK", $output); /** * Test commands with a directory path */ - public function testExecuteWithDirectoryPathOption() { + public function testExecuteWithDirectoryPathOption(): void { $this->util->expects($this->once())->method('isMasterKeyEnabled') ->willReturn(true); @@ -321,7 +321,7 @@ The file \"/$this->userId/files/sub/hello.txt\" is: OK", $output); $this->assertStringNotContainsString('world.txt', $output); } - public function testExecuteWithNoUser() { + public function testExecuteWithNoUser(): void { $this->util->expects($this->once())->method('isMasterKeyEnabled') ->willReturn(true); @@ -335,7 +335,7 @@ The file \"/$this->userId/files/sub/hello.txt\" is: OK", $output); $this->assertStringContainsString('Either a user id or --all needs to be provided', $output); } - public function testExecuteWithBadUser() { + public function testExecuteWithBadUser(): void { $this->util->expects($this->once())->method('isMasterKeyEnabled') ->willReturn(true); @@ -352,7 +352,7 @@ The file \"/$this->userId/files/sub/hello.txt\" is: OK", $output); /** * Test commands with a directory path */ - public function testExecuteWithNonExistentPath() { + public function testExecuteWithNonExistentPath(): void { $this->util->expects($this->once())->method('isMasterKeyEnabled') ->willReturn(true); @@ -369,7 +369,7 @@ The file \"/$this->userId/files/sub/hello.txt\" is: OK", $output); /** * Test commands without master key */ - public function testExecuteWithNoMasterKey() { + public function testExecuteWithNoMasterKey(): void { \OC::$server->getConfig()->setAppValue('encryption', 'useMasterKey', '0'); $this->util->expects($this->once())->method('isMasterKeyEnabled') ->willReturn(false); diff --git a/apps/encryption/tests/Command/TestEnableMasterKey.php b/apps/encryption/tests/Command/TestEnableMasterKey.php index 47bc978627d..2ed29becf2a 100644 --- a/apps/encryption/tests/Command/TestEnableMasterKey.php +++ b/apps/encryption/tests/Command/TestEnableMasterKey.php @@ -58,7 +58,7 @@ class TestEnableMasterKey extends TestCase { * @param bool $isAlreadyEnabled * @param string $answer */ - public function testExecute($isAlreadyEnabled, $answer) { + public function testExecute($isAlreadyEnabled, $answer): void { $this->util->expects($this->once())->method('isMasterKeyEnabled') ->willReturn($isAlreadyEnabled); diff --git a/apps/encryption/tests/Controller/RecoveryControllerTest.php b/apps/encryption/tests/Controller/RecoveryControllerTest.php index 955e9c7c964..8398a22039b 100644 --- a/apps/encryption/tests/Controller/RecoveryControllerTest.php +++ b/apps/encryption/tests/Controller/RecoveryControllerTest.php @@ -45,7 +45,7 @@ class RecoveryControllerTest extends TestCase { * @param $expectedMessage * @param $expectedStatus */ - public function testAdminRecovery($recoveryPassword, $passConfirm, $enableRecovery, $expectedMessage, $expectedStatus) { + public function testAdminRecovery($recoveryPassword, $passConfirm, $enableRecovery, $expectedMessage, $expectedStatus): void { $this->recoveryMock->expects($this->any()) ->method('enableAdminRecovery') ->willReturn(true); @@ -81,7 +81,7 @@ class RecoveryControllerTest extends TestCase { * @param $expectedMessage * @param $expectedStatus */ - public function testChangeRecoveryPassword($password, $confirmPassword, $oldPassword, $expectedMessage, $expectedStatus) { + public function testChangeRecoveryPassword($password, $confirmPassword, $oldPassword, $expectedMessage, $expectedStatus): void { $this->recoveryMock->expects($this->any()) ->method('changeRecoveryKeyPassword') ->with($password, $oldPassword) @@ -111,7 +111,7 @@ class RecoveryControllerTest extends TestCase { * @param $expectedMessage * @param $expectedStatus */ - public function testUserSetRecovery($enableRecovery, $expectedMessage, $expectedStatus) { + public function testUserSetRecovery($enableRecovery, $expectedMessage, $expectedStatus): void { $this->recoveryMock->expects($this->any()) ->method('setRecoveryForUser') ->with($enableRecovery) diff --git a/apps/encryption/tests/Controller/SettingsControllerTest.php b/apps/encryption/tests/Controller/SettingsControllerTest.php index ee49972001c..dcad23cd759 100644 --- a/apps/encryption/tests/Controller/SettingsControllerTest.php +++ b/apps/encryption/tests/Controller/SettingsControllerTest.php @@ -115,7 +115,7 @@ class SettingsControllerTest extends TestCase { /** * test updatePrivateKeyPassword() if wrong new password was entered */ - public function testUpdatePrivateKeyPasswordWrongNewPassword() { + public function testUpdatePrivateKeyPasswordWrongNewPassword(): void { $oldPassword = 'old'; $newPassword = 'new'; @@ -140,7 +140,7 @@ class SettingsControllerTest extends TestCase { /** * test updatePrivateKeyPassword() if wrong old password was entered */ - public function testUpdatePrivateKeyPasswordWrongOldPassword() { + public function testUpdatePrivateKeyPasswordWrongOldPassword(): void { $oldPassword = 'old'; $newPassword = 'new'; @@ -166,7 +166,7 @@ class SettingsControllerTest extends TestCase { /** * test updatePrivateKeyPassword() with the correct old and new password */ - public function testUpdatePrivateKeyPassword() { + public function testUpdatePrivateKeyPassword(): void { $oldPassword = 'old'; $newPassword = 'new'; @@ -227,7 +227,7 @@ class SettingsControllerTest extends TestCase { $data['message']); } - public function testSetEncryptHomeStorage() { + public function testSetEncryptHomeStorage(): void { $value = true; $this->utilMock->expects($this->once())->method('setEncryptHomeStorage')->with($value); $this->controller->setEncryptHomeStorage($value); diff --git a/apps/encryption/tests/Controller/StatusControllerTest.php b/apps/encryption/tests/Controller/StatusControllerTest.php index 26210946cce..c88b0497abf 100644 --- a/apps/encryption/tests/Controller/StatusControllerTest.php +++ b/apps/encryption/tests/Controller/StatusControllerTest.php @@ -60,7 +60,7 @@ class StatusControllerTest extends TestCase { * @param string $status * @param string $expectedStatus */ - public function testGetStatus($status, $expectedStatus) { + public function testGetStatus($status, $expectedStatus): void { $this->sessionMock->expects($this->once()) ->method('getStatus')->willReturn($status); $result = $this->controller->getStatus(); diff --git a/apps/encryption/tests/Crypto/CryptTest.php b/apps/encryption/tests/Crypto/CryptTest.php index 301ffaeaef3..a9869af99d9 100644 --- a/apps/encryption/tests/Crypto/CryptTest.php +++ b/apps/encryption/tests/Crypto/CryptTest.php @@ -53,7 +53,7 @@ class CryptTest extends TestCase { /** * test getOpenSSLConfig without any additional parameters */ - public function testGetOpenSSLConfigBasic() { + public function testGetOpenSSLConfigBasic(): void { $this->config->expects($this->once()) ->method('getSystemValue') ->with($this->equalTo('openssl'), $this->equalTo([])) @@ -68,7 +68,7 @@ class CryptTest extends TestCase { /** * test getOpenSSLConfig with additional parameters defined in config.php */ - public function testGetOpenSSLConfig() { + public function testGetOpenSSLConfig(): void { $this->config->expects($this->once()) ->method('getSystemValue') ->with($this->equalTo('openssl'), $this->equalTo([])) @@ -88,7 +88,7 @@ class CryptTest extends TestCase { * * @dataProvider dataTestGenerateHeader */ - public function testGenerateHeader($keyFormat, $expected) { + public function testGenerateHeader($keyFormat, $expected): void { $this->config->expects($this->once()) ->method('getSystemValueString') ->with($this->equalTo('cipher'), $this->equalTo('AES-256-CTR')) @@ -107,7 +107,7 @@ class CryptTest extends TestCase { * test generateHeader with invalid key format * */ - public function testGenerateHeaderInvalid() { + public function testGenerateHeaderInvalid(): void { $this->expectException(\InvalidArgumentException::class); $this->crypt->generateHeader('unknown'); @@ -124,7 +124,7 @@ class CryptTest extends TestCase { ]; } - public function testGetCipherWithInvalidCipher() { + public function testGetCipherWithInvalidCipher(): void { $this->config->expects($this->once()) ->method('getSystemValueString') ->with($this->equalTo('cipher'), $this->equalTo('AES-256-CTR')) @@ -142,7 +142,7 @@ class CryptTest extends TestCase { * @param string $configValue * @param string $expected */ - public function testGetCipher($configValue, $expected) { + public function testGetCipher($configValue, $expected): void { $this->config->expects($this->once()) ->method('getSystemValueString') ->with($this->equalTo('cipher'), $this->equalTo('AES-256-CTR')) @@ -172,7 +172,7 @@ class CryptTest extends TestCase { /** * test concatIV() */ - public function testConcatIV() { + public function testConcatIV(): void { $result = self::invokePrivate( $this->crypt, 'concatIV', @@ -186,7 +186,7 @@ class CryptTest extends TestCase { /** * @dataProvider dataTestSplitMetaData */ - public function testSplitMetaData($data, $expected) { + public function testSplitMetaData($data, $expected): void { $this->config->method('getSystemValueBool') ->with('encryption_skip_signature_check', false) ->willReturn(true); @@ -213,7 +213,7 @@ class CryptTest extends TestCase { /** * @dataProvider dataTestHasSignature */ - public function testHasSignature($data, $expected) { + public function testHasSignature($data, $expected): void { $this->config->method('getSystemValueBool') ->with('encryption_skip_signature_check', false) ->willReturn(true); @@ -232,7 +232,7 @@ class CryptTest extends TestCase { /** * @dataProvider dataTestHasSignatureFail */ - public function testHasSignatureFail($cipher) { + public function testHasSignatureFail($cipher): void { $this->expectException(\OCP\Encryption\Exceptions\GenericEncryptionException::class); $data = 'encryptedContent00iv001234567890123456xx'; @@ -251,7 +251,7 @@ class CryptTest extends TestCase { /** * test addPadding() */ - public function testAddPadding() { + public function testAddPadding(): void { $result = self::invokePrivate($this->crypt, 'addPadding', ['data']); $this->assertSame('dataxxx', $result); } @@ -263,7 +263,7 @@ class CryptTest extends TestCase { * @param $data * @param $expected */ - public function testRemovePadding($data, $expected) { + public function testRemovePadding($data, $expected): void { $result = self::invokePrivate($this->crypt, 'removePadding', [$data]); $this->assertSame($expected, $result); } @@ -283,7 +283,7 @@ class CryptTest extends TestCase { /** * test parseHeader() */ - public function testParseHeader() { + public function testParseHeader(): void { $header = 'HBEGIN:foo:bar:cipher:AES-256-CFB:encoding:binary:HEND'; $result = self::invokePrivate($this->crypt, 'parseHeader', [$header]); @@ -328,7 +328,7 @@ class CryptTest extends TestCase { * * @depends testEncrypt */ - public function testDecrypt($data) { + public function testDecrypt($data): void { $result = self::invokePrivate( $this->crypt, 'decrypt', @@ -342,7 +342,7 @@ class CryptTest extends TestCase { * * @dataProvider dataTestGetKeySize */ - public function testGetKeySize($cipher, $expected) { + public function testGetKeySize($cipher, $expected): void { $result = $this->invokePrivate($this->crypt, 'getKeySize', [$cipher]); $this->assertSame($expected, $result); } @@ -351,7 +351,7 @@ class CryptTest extends TestCase { * test exception if cipher is unknown * */ - public function testGetKeySizeFailure() { + public function testGetKeySizeFailure(): void { $this->expectException(\InvalidArgumentException::class); $this->invokePrivate($this->crypt, 'getKeySize', ['foo']); @@ -372,7 +372,7 @@ class CryptTest extends TestCase { /** * @dataProvider dataTestDecryptPrivateKey */ - public function testDecryptPrivateKey($header, $privateKey, $expectedCipher, $isValidKey, $expected) { + public function testDecryptPrivateKey($header, $privateKey, $expectedCipher, $isValidKey, $expected): void { $this->config->method('getSystemValueBool') ->withConsecutive(['encryption.legacy_format_support', false], ['encryption.use_legacy_base64_encoding', false]) @@ -430,7 +430,7 @@ class CryptTest extends TestCase { ]; } - public function testIsValidPrivateKey() { + public function testIsValidPrivateKey(): void { $res = openssl_pkey_new(); openssl_pkey_export($res, $privateKey); @@ -445,7 +445,7 @@ class CryptTest extends TestCase { ); } - public function testMultiKeyEncrypt() { + public function testMultiKeyEncrypt(): void { $res = openssl_pkey_new(); openssl_pkey_export($res, $privateKey); $publicKeyPem = openssl_pkey_get_details($res)['key']; diff --git a/apps/encryption/tests/Crypto/DecryptAllTest.php b/apps/encryption/tests/Crypto/DecryptAllTest.php index 2a46e542804..0d8543153ef 100644 --- a/apps/encryption/tests/Crypto/DecryptAllTest.php +++ b/apps/encryption/tests/Crypto/DecryptAllTest.php @@ -58,7 +58,7 @@ class DecryptAllTest extends TestCase { ); } - public function testUpdateSession() { + public function testUpdateSession(): void { $this->session->expects($this->once())->method('prepareDecryptAll') ->with('user1', 'key1'); @@ -71,7 +71,7 @@ class DecryptAllTest extends TestCase { * @param string $user * @param string $recoveryKeyId */ - public function testGetPrivateKey($user, $recoveryKeyId, $masterKeyId) { + public function testGetPrivateKey($user, $recoveryKeyId, $masterKeyId): void { $password = 'passwd'; $recoveryKey = 'recoveryKey'; $userKey = 'userKey'; diff --git a/apps/encryption/tests/Crypto/EncryptAllTest.php b/apps/encryption/tests/Crypto/EncryptAllTest.php index a63b826bf3c..f58ea2119e6 100644 --- a/apps/encryption/tests/Crypto/EncryptAllTest.php +++ b/apps/encryption/tests/Crypto/EncryptAllTest.php @@ -135,7 +135,7 @@ class EncryptAllTest extends TestCase { ); } - public function testEncryptAll() { + public function testEncryptAll(): void { /** @var EncryptAll | \PHPUnit\Framework\MockObject\MockObject $encryptAll */ $encryptAll = $this->getMockBuilder(EncryptAll::class) ->setConstructorArgs( @@ -164,7 +164,7 @@ class EncryptAllTest extends TestCase { $encryptAll->encryptAll($this->inputInterface, $this->outputInterface); } - public function testEncryptAllWithMasterKey() { + public function testEncryptAllWithMasterKey(): void { /** @var EncryptAll | \PHPUnit\Framework\MockObject\MockObject $encryptAll */ $encryptAll = $this->getMockBuilder(EncryptAll::class) ->setConstructorArgs( @@ -194,7 +194,7 @@ class EncryptAllTest extends TestCase { $encryptAll->encryptAll($this->inputInterface, $this->outputInterface); } - public function testCreateKeyPairs() { + public function testCreateKeyPairs(): void { /** @var EncryptAll | \PHPUnit\Framework\MockObject\MockObject $encryptAll */ $encryptAll = $this->getMockBuilder(EncryptAll::class) ->setConstructorArgs( @@ -244,7 +244,7 @@ class EncryptAllTest extends TestCase { $this->assertSame('', $userPasswords['user2']); } - public function testEncryptAllUsersFiles() { + public function testEncryptAllUsersFiles(): void { /** @var EncryptAll | \PHPUnit\Framework\MockObject\MockObject $encryptAll */ $encryptAll = $this->getMockBuilder(EncryptAll::class) ->setConstructorArgs( @@ -280,7 +280,7 @@ class EncryptAllTest extends TestCase { $this->invokePrivate($encryptAll, 'encryptAllUsersFiles'); } - public function testEncryptUsersFiles() { + public function testEncryptUsersFiles(): void { /** @var EncryptAll | \PHPUnit\Framework\MockObject\MockObject $encryptAll */ $encryptAll = $this->getMockBuilder(EncryptAll::class) ->setConstructorArgs( @@ -343,7 +343,7 @@ class EncryptAllTest extends TestCase { $this->invokePrivate($encryptAll, 'encryptUsersFiles', ['user1', $progressBar, '']); } - public function testGenerateOneTimePassword() { + public function testGenerateOneTimePassword(): void { $password = $this->invokePrivate($this->encryptAll, 'generateOneTimePassword', ['user1']); $this->assertTrue(is_string($password)); $this->assertSame(8, strlen($password)); @@ -357,7 +357,7 @@ class EncryptAllTest extends TestCase { * @dataProvider dataTestEncryptFile * @param $isEncrypted */ - public function testEncryptFile($isEncrypted) { + public function testEncryptFile($isEncrypted): void { $fileInfo = $this->createMock(FileInfo::class); $fileInfo->expects($this->any())->method('isEncrypted') ->willReturn($isEncrypted); diff --git a/apps/encryption/tests/Crypto/EncryptionTest.php b/apps/encryption/tests/Crypto/EncryptionTest.php index 4767d22339d..b07bd0a6b25 100644 --- a/apps/encryption/tests/Crypto/EncryptionTest.php +++ b/apps/encryption/tests/Crypto/EncryptionTest.php @@ -102,7 +102,7 @@ class EncryptionTest extends TestCase { /** * test if public key from one of the recipients is missing */ - public function testEndUser1() { + public function testEndUser1(): void { $this->sessionMock->expects($this->once()) ->method('decryptAllModeActivated') ->willReturn(false); @@ -115,7 +115,7 @@ class EncryptionTest extends TestCase { * test if public key from owner is missing * */ - public function testEndUser2() { + public function testEndUser2(): void { $this->sessionMock->expects($this->once()) ->method('decryptAllModeActivated') ->willReturn(false); @@ -167,7 +167,7 @@ class EncryptionTest extends TestCase { /** * @dataProvider dataProviderForTestGetPathToRealFile */ - public function testGetPathToRealFile($path, $expected) { + public function testGetPathToRealFile($path, $expected): void { $this->assertSame($expected, self::invokePrivate($this->instance, 'getPathToRealFile', [$path]) ); @@ -185,7 +185,7 @@ class EncryptionTest extends TestCase { /** * @dataProvider dataTestBegin */ - public function testBegin($mode, $header, $legacyCipher, $defaultCipher, $fileKey, $expected) { + public function testBegin($mode, $header, $legacyCipher, $defaultCipher, $fileKey, $expected): void { $this->sessionMock->expects($this->once()) ->method('decryptAllModeActivated') ->willReturn(false); @@ -239,7 +239,7 @@ class EncryptionTest extends TestCase { /** * test begin() if decryptAll mode was activated */ - public function testBeginDecryptAll() { + public function testBeginDecryptAll(): void { $path = '/user/files/foo.txt'; $fileKey = 'fileKey'; @@ -263,7 +263,7 @@ class EncryptionTest extends TestCase { * in this case we can initialize the encryption without a username/password * and continue */ - public function testBeginInitMasterKey() { + public function testBeginInitMasterKey(): void { $this->sessionMock->expects($this->once()) ->method('decryptAllModeActivated') ->willReturn(false); @@ -282,7 +282,7 @@ class EncryptionTest extends TestCase { * @param string $fileKey * @param boolean $expected */ - public function testUpdate($fileKey, $expected) { + public function testUpdate($fileKey, $expected): void { $this->keyManagerMock->expects($this->once()) ->method('getFileKey')->willReturn($fileKey); @@ -310,7 +310,7 @@ class EncryptionTest extends TestCase { ]; } - public function testUpdateNoUsers() { + public function testUpdateNoUsers(): void { $this->invokePrivate($this->instance, 'rememberVersion', [['path' => 2]]); $this->keyManagerMock->expects($this->never())->method('getFileKey'); @@ -329,7 +329,7 @@ class EncryptionTest extends TestCase { * Test case if the public key is missing. Nextcloud should still encrypt * the file for the remaining users */ - public function testUpdateMissingPublicKey() { + public function testUpdateMissingPublicKey(): void { $this->keyManagerMock->expects($this->once()) ->method('getFileKey')->willReturn('fileKey'); @@ -369,7 +369,7 @@ class EncryptionTest extends TestCase { * * @dataProvider dataTestShouldEncrypt */ - public function testShouldEncrypt($path, $shouldEncryptHomeStorage, $isHomeStorage, $expected) { + public function testShouldEncrypt($path, $shouldEncryptHomeStorage, $isHomeStorage, $expected): void { $this->utilMock->expects($this->once())->method('shouldEncryptHomeStorage') ->willReturn($shouldEncryptHomeStorage); @@ -402,14 +402,14 @@ class EncryptionTest extends TestCase { } - public function testDecrypt() { + public function testDecrypt(): void { $this->expectException(\OC\Encryption\Exceptions\DecryptionFailedException::class); $this->expectExceptionMessage('Cannot decrypt this file, probably this is a shared file. Please ask the file owner to reshare the file with you.'); $this->instance->decrypt('abc'); } - public function testPrepareDecryptAll() { + public function testPrepareDecryptAll(): void { /** @var \Symfony\Component\Console\Input\InputInterface $input */ $input = $this->createMock(InputInterface::class); /** @var \Symfony\Component\Console\Output\OutputInterface $output */ diff --git a/apps/encryption/tests/EncryptedStorageTest.php b/apps/encryption/tests/EncryptedStorageTest.php index 26d5d9c4941..7671eab4992 100644 --- a/apps/encryption/tests/EncryptedStorageTest.php +++ b/apps/encryption/tests/EncryptedStorageTest.php @@ -30,7 +30,7 @@ class EncryptedStorageTest extends TestCase { use EncryptionTrait; use UserTrait; - public function testMoveFromEncrypted() { + public function testMoveFromEncrypted(): void { $this->createUser('test1', 'test2'); $this->setupForUser('test1', 'test2'); diff --git a/apps/encryption/tests/HookManagerTest.php b/apps/encryption/tests/HookManagerTest.php index 4a662f3bc4a..ad1fac3407f 100644 --- a/apps/encryption/tests/HookManagerTest.php +++ b/apps/encryption/tests/HookManagerTest.php @@ -20,7 +20,7 @@ class HookManagerTest extends TestCase { private static $instance; - public function testRegisterHookWithArray() { + public function testRegisterHookWithArray(): void { self::$instance->registerHook([ $this->getMockBuilder(IHook::class)->disableOriginalConstructor()->getMock(), $this->getMockBuilder(IHook::class)->disableOriginalConstructor()->getMock(), @@ -41,7 +41,7 @@ class HookManagerTest extends TestCase { } - public function testRegisterHooksWithInstance() { + public function testRegisterHooksWithInstance(): void { $mock = $this->getMockBuilder(IHook::class)->disableOriginalConstructor()->getMock(); /** @var \OCA\Encryption\Hooks\Contracts\IHook $mock */ self::$instance->registerHook($mock); diff --git a/apps/encryption/tests/Hooks/UserHooksTest.php b/apps/encryption/tests/Hooks/UserHooksTest.php index 5c67a5313b6..3bb0b559fdf 100644 --- a/apps/encryption/tests/Hooks/UserHooksTest.php +++ b/apps/encryption/tests/Hooks/UserHooksTest.php @@ -76,7 +76,7 @@ class UserHooksTest extends TestCase { private $params = ['uid' => 'testUser', 'password' => 'password']; - public function testLogin() { + public function testLogin(): void { $this->userSetupMock->expects($this->once()) ->method('setupUser') ->willReturnOnConsecutiveCalls(true, false); @@ -88,14 +88,14 @@ class UserHooksTest extends TestCase { $this->assertNull($this->instance->login($this->params)); } - public function testLogout() { + public function testLogout(): void { $this->sessionMock->expects($this->once()) ->method('clear'); $this->instance->logout(); $this->addToAssertionCount(1); } - public function testPostCreateUser() { + public function testPostCreateUser(): void { $this->userSetupMock->expects($this->once()) ->method('setupUser'); @@ -103,7 +103,7 @@ class UserHooksTest extends TestCase { $this->addToAssertionCount(1); } - public function testPostDeleteUser() { + public function testPostDeleteUser(): void { $this->keyManagerMock->expects($this->once()) ->method('deletePublicKey') ->with('testUser'); @@ -112,7 +112,7 @@ class UserHooksTest extends TestCase { $this->addToAssertionCount(1); } - public function testPrePasswordReset() { + public function testPrePasswordReset(): void { $params = ['uid' => 'user1']; $expected = ['user1' => true]; $this->instance->prePasswordReset($params); @@ -121,7 +121,7 @@ class UserHooksTest extends TestCase { $this->assertSame($expected, $passwordResetUsers); } - public function testPostPasswordReset() { + public function testPostPasswordReset(): void { $params = ['uid' => 'user1', 'password' => 'password']; $this->invokePrivate($this->instance, 'passwordResetUsers', [['user1' => true]]); $this->keyManagerMock->expects($this->once())->method('backupUserKeys') @@ -139,7 +139,7 @@ class UserHooksTest extends TestCase { /** * @dataProvider dataTestPreSetPassphrase */ - public function testPreSetPassphrase($canChange) { + public function testPreSetPassphrase($canChange): void { /** @var UserHooks | \PHPUnit\Framework\MockObject\MockObject $instance */ $instance = $this->getMockBuilder(UserHooks::class) ->setConstructorArgs( @@ -269,7 +269,7 @@ class UserHooksTest extends TestCase { $this->assertNull($this->instance->setPassphrase($this->params)); } - public function testSetPassphraseResetUserMode() { + public function testSetPassphraseResetUserMode(): void { $params = ['uid' => 'user1', 'password' => 'password']; $this->invokePrivate($this->instance, 'passwordResetUsers', [[$params['uid'] => true]]); $this->sessionMock->expects($this->never())->method('getPrivateKey'); diff --git a/apps/encryption/tests/KeyManagerTest.php b/apps/encryption/tests/KeyManagerTest.php index b408c9e180b..a9919e8eab4 100644 --- a/apps/encryption/tests/KeyManagerTest.php +++ b/apps/encryption/tests/KeyManagerTest.php @@ -95,7 +95,7 @@ class KeyManagerTest extends TestCase { ); } - public function testDeleteShareKey() { + public function testDeleteShareKey(): void { $this->keyStorageMock->expects($this->any()) ->method('deleteFileKey') ->with($this->equalTo('/path'), $this->equalTo('keyId.shareKey')) @@ -106,7 +106,7 @@ class KeyManagerTest extends TestCase { ); } - public function testGetPrivateKey() { + public function testGetPrivateKey(): void { $this->keyStorageMock->expects($this->any()) ->method('getUserKey') ->with($this->equalTo($this->userId), $this->equalTo('privateKey')) @@ -118,7 +118,7 @@ class KeyManagerTest extends TestCase { ); } - public function testGetPublicKey() { + public function testGetPublicKey(): void { $this->keyStorageMock->expects($this->any()) ->method('getUserKey') ->with($this->equalTo($this->userId), $this->equalTo('publicKey')) @@ -130,7 +130,7 @@ class KeyManagerTest extends TestCase { ); } - public function testRecoveryKeyExists() { + public function testRecoveryKeyExists(): void { $this->keyStorageMock->expects($this->any()) ->method('getSystemUserKey') ->with($this->equalTo($this->systemKeyId . '.publicKey')) @@ -140,7 +140,7 @@ class KeyManagerTest extends TestCase { $this->assertTrue($this->instance->recoveryKeyExists()); } - public function testCheckRecoveryKeyPassword() { + public function testCheckRecoveryKeyPassword(): void { $this->keyStorageMock->expects($this->any()) ->method('getSystemUserKey') ->with($this->equalTo($this->systemKeyId . '.privateKey')) @@ -153,7 +153,7 @@ class KeyManagerTest extends TestCase { $this->assertTrue($this->instance->checkRecoveryPassword('pass')); } - public function testSetPublicKey() { + public function testSetPublicKey(): void { $this->keyStorageMock->expects($this->any()) ->method('setUserKey') ->with( @@ -168,7 +168,7 @@ class KeyManagerTest extends TestCase { ); } - public function testSetPrivateKey() { + public function testSetPrivateKey(): void { $this->keyStorageMock->expects($this->any()) ->method('setUserKey') ->with( @@ -186,7 +186,7 @@ class KeyManagerTest extends TestCase { /** * @dataProvider dataTestUserHasKeys */ - public function testUserHasKeys($key, $expected) { + public function testUserHasKeys($key, $expected): void { $this->keyStorageMock->expects($this->exactly(2)) ->method('getUserKey') ->with($this->equalTo($this->userId), $this->anything()) @@ -206,7 +206,7 @@ class KeyManagerTest extends TestCase { } - public function testUserHasKeysMissingPrivateKey() { + public function testUserHasKeysMissingPrivateKey(): void { $this->expectException(\OCA\Encryption\Exceptions\PrivateKeyMissingException::class); $this->keyStorageMock->expects($this->exactly(2)) @@ -222,7 +222,7 @@ class KeyManagerTest extends TestCase { } - public function testUserHasKeysMissingPublicKey() { + public function testUserHasKeysMissingPublicKey(): void { $this->expectException(\OCA\Encryption\Exceptions\PublicKeyMissingException::class); $this->keyStorageMock->expects($this->exactly(2)) @@ -242,7 +242,7 @@ class KeyManagerTest extends TestCase { * * @param bool $useMasterKey */ - public function testInit($useMasterKey) { + public function testInit($useMasterKey): void { /** @var \OCA\Encryption\KeyManager|\PHPUnit\Framework\MockObject\MockObject $instance */ $instance = $this->getMockBuilder(KeyManager::class) ->setConstructorArgs( @@ -297,7 +297,7 @@ class KeyManagerTest extends TestCase { } - public function testSetRecoveryKey() { + public function testSetRecoveryKey(): void { $this->keyStorageMock->expects($this->exactly(2)) ->method('setSystemUserKey') ->willReturn(true); @@ -313,7 +313,7 @@ class KeyManagerTest extends TestCase { ); } - public function testSetSystemPrivateKey() { + public function testSetSystemPrivateKey(): void { $this->keyStorageMock->expects($this->exactly(1)) ->method('setSystemUserKey') ->with($this->equalTo('keyId.privateKey'), $this->equalTo('key')) @@ -325,7 +325,7 @@ class KeyManagerTest extends TestCase { ); } - public function testGetSystemPrivateKey() { + public function testGetSystemPrivateKey(): void { $this->keyStorageMock->expects($this->exactly(1)) ->method('getSystemUserKey') ->with($this->equalTo('keyId.privateKey')) @@ -337,7 +337,7 @@ class KeyManagerTest extends TestCase { ); } - public function testGetEncryptedFileKey() { + public function testGetEncryptedFileKey(): void { $this->keyStorageMock->expects($this->once()) ->method('getFileKey') ->with('/', 'fileKey') @@ -375,7 +375,7 @@ class KeyManagerTest extends TestCase { * @param $privateKey * @param $expected */ - public function testGetFileKey($uid, $isMasterKeyEnabled, $privateKey, $encryptedFileKey, $expected) { + public function testGetFileKey($uid, $isMasterKeyEnabled, $privateKey, $encryptedFileKey, $expected): void { $path = '/foo.txt'; if ($isMasterKeyEnabled) { @@ -446,7 +446,7 @@ class KeyManagerTest extends TestCase { ); } - public function testDeletePrivateKey() { + public function testDeletePrivateKey(): void { $this->keyStorageMock->expects($this->once()) ->method('deleteUserKey') ->with('user1', 'privateKey') @@ -457,7 +457,7 @@ class KeyManagerTest extends TestCase { [$this->userId])); } - public function testDeleteAllFileKeys() { + public function testDeleteAllFileKeys(): void { $this->keyStorageMock->expects($this->once()) ->method('deleteAllFileKeys') ->willReturn(true); @@ -475,7 +475,7 @@ class KeyManagerTest extends TestCase { * @param string $uid * @param array $expectedKeys */ - public function testAddSystemKeys($accessList, $publicKeys, $uid, $expectedKeys) { + public function testAddSystemKeys($accessList, $publicKeys, $uid, $expectedKeys): void { $publicShareKeyId = 'publicShareKey'; $recoveryKeyId = 'recoveryKey'; @@ -521,11 +521,11 @@ class KeyManagerTest extends TestCase { ]; } - public function testGetMasterKeyId() { + public function testGetMasterKeyId(): void { $this->assertSame('systemKeyId', $this->instance->getMasterKeyId()); } - public function testGetPublicMasterKey() { + public function testGetPublicMasterKey(): void { $this->keyStorageMock->expects($this->once())->method('getSystemUserKey') ->with('systemKeyId.publicKey', \OCA\Encryption\Crypto\Encryption::ID) ->willReturn(true); @@ -535,7 +535,7 @@ class KeyManagerTest extends TestCase { ); } - public function testGetMasterKeyPassword() { + public function testGetMasterKeyPassword(): void { $this->configMock->expects($this->once())->method('getSystemValue')->with('secret') ->willReturn('password'); @@ -545,7 +545,7 @@ class KeyManagerTest extends TestCase { } - public function testGetMasterKeyPasswordException() { + public function testGetMasterKeyPasswordException(): void { $this->expectException(\Exception::class); $this->configMock->expects($this->once())->method('getSystemValue')->with('secret') @@ -559,7 +559,7 @@ class KeyManagerTest extends TestCase { * * @param $masterKey */ - public function testValidateMasterKey($masterKey) { + public function testValidateMasterKey($masterKey): void { /** @var \OCA\Encryption\KeyManager | \PHPUnit\Framework\MockObject\MockObject $instance */ $instance = $this->getMockBuilder(KeyManager::class) ->setConstructorArgs( @@ -607,7 +607,7 @@ class KeyManagerTest extends TestCase { $instance->validateMasterKey(); } - public function testValidateMasterKeyLocked() { + public function testValidateMasterKeyLocked(): void { /** @var \OCA\Encryption\KeyManager | \PHPUnit_Framework_MockObject_MockObject $instance */ $instance = $this->getMockBuilder(KeyManager::class) ->setConstructorArgs( @@ -650,7 +650,7 @@ class KeyManagerTest extends TestCase { ]; } - public function testGetVersionWithoutFileInfo() { + public function testGetVersionWithoutFileInfo(): void { $view = $this->getMockBuilder(View::class) ->disableOriginalConstructor()->getMock(); $view->expects($this->once()) @@ -662,7 +662,7 @@ class KeyManagerTest extends TestCase { $this->assertSame(0, $this->instance->getVersion('/admin/files/myfile.txt', $view)); } - public function testGetVersionWithFileInfo() { + public function testGetVersionWithFileInfo(): void { $view = $this->getMockBuilder(View::class) ->disableOriginalConstructor()->getMock(); $fileInfo = $this->getMockBuilder(FileInfo::class) @@ -679,7 +679,7 @@ class KeyManagerTest extends TestCase { $this->assertSame(1337, $this->instance->getVersion('/admin/files/myfile.txt', $view)); } - public function testSetVersionWithFileInfo() { + public function testSetVersionWithFileInfo(): void { $view = $this->getMockBuilder(View::class) ->disableOriginalConstructor()->getMock(); $cache = $this->getMockBuilder(ICache::class) @@ -709,7 +709,7 @@ class KeyManagerTest extends TestCase { $this->instance->setVersion('/admin/files/myfile.txt', 5, $view); } - public function testSetVersionWithoutFileInfo() { + public function testSetVersionWithoutFileInfo(): void { $view = $this->getMockBuilder(View::class) ->disableOriginalConstructor()->getMock(); $view->expects($this->once()) @@ -721,7 +721,7 @@ class KeyManagerTest extends TestCase { $this->instance->setVersion('/admin/files/myfile.txt', 5, $view); } - public function testBackupUserKeys() { + public function testBackupUserKeys(): void { $this->keyStorageMock->expects($this->once())->method('backupUserKeys') ->with('OC_DEFAULT_MODULE', 'test', 'user1'); $this->instance->backupUserKeys('test', 'user1'); diff --git a/apps/encryption/tests/RecoveryTest.php b/apps/encryption/tests/RecoveryTest.php index a4f4ff7fd02..4b28d408844 100644 --- a/apps/encryption/tests/RecoveryTest.php +++ b/apps/encryption/tests/RecoveryTest.php @@ -53,7 +53,7 @@ class RecoveryTest extends TestCase { */ private $instance; - public function testEnableAdminRecoverySuccessful() { + public function testEnableAdminRecoverySuccessful(): void { $this->keyManagerMock->expects($this->exactly(2)) ->method('recoveryKeyExists') ->willReturnOnConsecutiveCalls(false, true); @@ -80,7 +80,7 @@ class RecoveryTest extends TestCase { $this->assertTrue($this->instance->enableAdminRecovery('password')); } - public function testEnableAdminRecoveryCouldNotCheckPassword() { + public function testEnableAdminRecoveryCouldNotCheckPassword(): void { $this->keyManagerMock->expects($this->exactly(2)) ->method('recoveryKeyExists') ->willReturnOnConsecutiveCalls(false, true); @@ -107,7 +107,7 @@ class RecoveryTest extends TestCase { $this->assertFalse($this->instance->enableAdminRecovery('password')); } - public function testEnableAdminRecoveryCouldNotCreateKey() { + public function testEnableAdminRecoveryCouldNotCreateKey(): void { $this->keyManagerMock->expects($this->once()) ->method('recoveryKeyExists') ->willReturn(false); @@ -119,7 +119,7 @@ class RecoveryTest extends TestCase { $this->assertFalse($this->instance->enableAdminRecovery('password')); } - public function testChangeRecoveryKeyPasswordSuccessful() { + public function testChangeRecoveryKeyPasswordSuccessful(): void { $this->assertFalse($this->instance->changeRecoveryKeyPassword('password', 'passwordOld')); @@ -137,7 +137,7 @@ class RecoveryTest extends TestCase { 'passwordOld')); } - public function testChangeRecoveryKeyPasswordCouldNotDecryptPrivateRecoveryKey() { + public function testChangeRecoveryKeyPasswordCouldNotDecryptPrivateRecoveryKey(): void { $this->assertFalse($this->instance->changeRecoveryKeyPassword('password', 'passwordOld')); $this->keyManagerMock->expects($this->once()) @@ -150,7 +150,7 @@ class RecoveryTest extends TestCase { $this->assertFalse($this->instance->changeRecoveryKeyPassword('password', 'passwordOld')); } - public function testDisableAdminRecovery() { + public function testDisableAdminRecovery(): void { $this->keyManagerMock->expects($this->exactly(2)) ->method('checkRecoveryPassword') ->willReturnOnConsecutiveCalls(true, false); @@ -162,7 +162,7 @@ class RecoveryTest extends TestCase { $this->assertFalse($this->instance->disableAdminRecovery('password')); } - public function testIsRecoveryEnabledForUser() { + public function testIsRecoveryEnabledForUser(): void { $this->configMock->expects($this->exactly(2)) ->method('getUserValue') ->willReturnOnConsecutiveCalls('1', '0'); @@ -171,13 +171,13 @@ class RecoveryTest extends TestCase { $this->assertFalse($this->instance->isRecoveryEnabledForUser('admin')); } - public function testIsRecoveryKeyEnabled() { + public function testIsRecoveryKeyEnabled(): void { $this->assertFalse($this->instance->isRecoveryKeyEnabled()); self::$tempStorage['recoveryAdminEnabled'] = '1'; $this->assertTrue($this->instance->isRecoveryKeyEnabled()); } - public function testSetRecoveryFolderForUser() { + public function testSetRecoveryFolderForUser(): void { $this->viewMock->expects($this->exactly(2)) ->method('getDirectoryContent') ->willReturn([]); @@ -185,7 +185,7 @@ class RecoveryTest extends TestCase { $this->assertTrue($this->instance->setRecoveryForUser('1')); } - public function testRecoverUserFiles() { + public function testRecoverUserFiles(): void { $this->viewMock->expects($this->once()) ->method('getDirectoryContent') ->willReturn([]); @@ -197,7 +197,7 @@ class RecoveryTest extends TestCase { $this->addToAssertionCount(1); } - public function testRecoverFile() { + public function testRecoverFile(): void { $this->keyManagerMock->expects($this->once()) ->method('getEncryptedFileKey') ->willReturn(true); diff --git a/apps/encryption/tests/SessionTest.php b/apps/encryption/tests/SessionTest.php index 61e57f66611..10c699898fc 100644 --- a/apps/encryption/tests/SessionTest.php +++ b/apps/encryption/tests/SessionTest.php @@ -21,7 +21,7 @@ class SessionTest extends TestCase { private $sessionMock; - public function testThatGetPrivateKeyThrowsExceptionWhenNotSet() { + public function testThatGetPrivateKeyThrowsExceptionWhenNotSet(): void { $this->expectException(\OCA\Encryption\Exceptions\PrivateKeyMissingException::class); $this->expectExceptionMessage('Private Key missing for user: please try to log-out and log-in again'); @@ -31,7 +31,7 @@ class SessionTest extends TestCase { /** * @depends testThatGetPrivateKeyThrowsExceptionWhenNotSet */ - public function testSetAndGetPrivateKey() { + public function testSetAndGetPrivateKey(): void { $this->instance->setPrivateKey('dummyPrivateKey'); $this->assertEquals('dummyPrivateKey', $this->instance->getPrivateKey()); } @@ -39,7 +39,7 @@ class SessionTest extends TestCase { /** * @depends testSetAndGetPrivateKey */ - public function testIsPrivateKeySet() { + public function testIsPrivateKeySet(): void { $this->instance->setPrivateKey('dummyPrivateKey'); $this->assertTrue($this->instance->isPrivateKeySet()); @@ -50,21 +50,21 @@ class SessionTest extends TestCase { self::$tempStorage['privateKey'] = 'dummyPrivateKey'; } - public function testDecryptAllModeActivated() { + public function testDecryptAllModeActivated(): void { $this->instance->prepareDecryptAll('user1', 'usersKey'); $this->assertTrue($this->instance->decryptAllModeActivated()); $this->assertSame('user1', $this->instance->getDecryptAllUid()); $this->assertSame('usersKey', $this->instance->getDecryptAllKey()); } - public function testDecryptAllModeDeactivated() { + public function testDecryptAllModeDeactivated(): void { $this->assertFalse($this->instance->decryptAllModeActivated()); } /** * @expectExceptionMessage 'Please activate decrypt all mode first' */ - public function testGetDecryptAllUidException() { + public function testGetDecryptAllUidException(): void { $this->expectException(\Exception::class); $this->instance->getDecryptAllUid(); @@ -73,7 +73,7 @@ class SessionTest extends TestCase { /** * @expectExceptionMessage 'No uid found while in decrypt all mode' */ - public function testGetDecryptAllUidException2() { + public function testGetDecryptAllUidException2(): void { $this->expectException(\Exception::class); $this->instance->prepareDecryptAll(null, 'key'); @@ -83,7 +83,7 @@ class SessionTest extends TestCase { /** * @expectExceptionMessage 'Please activate decrypt all mode first' */ - public function testGetDecryptAllKeyException() { + public function testGetDecryptAllKeyException(): void { $this->expectException(\OCA\Encryption\Exceptions\PrivateKeyMissingException::class); $this->instance->getDecryptAllKey(); @@ -92,7 +92,7 @@ class SessionTest extends TestCase { /** * @expectExceptionMessage 'No key found while in decrypt all mode' */ - public function testGetDecryptAllKeyException2() { + public function testGetDecryptAllKeyException2(): void { $this->expectException(\OCA\Encryption\Exceptions\PrivateKeyMissingException::class); $this->instance->prepareDecryptAll('user', null); @@ -100,7 +100,7 @@ class SessionTest extends TestCase { } - public function testSetAndGetStatusWillSetAndReturn() { + public function testSetAndGetStatusWillSetAndReturn(): void { // Check if get status will return 0 if it has not been set before $this->assertEquals(0, $this->instance->getStatus()); @@ -120,7 +120,7 @@ class SessionTest extends TestCase { * @param int $status * @param bool $expected */ - public function testIsReady($status, $expected) { + public function testIsReady($status, $expected): void { /** @var Session | \PHPUnit\Framework\MockObject\MockObject $instance */ $instance = $this->getMockBuilder(Session::class) ->setConstructorArgs([$this->sessionMock]) @@ -167,7 +167,7 @@ class SessionTest extends TestCase { } - public function testClearWillRemoveValues() { + public function testClearWillRemoveValues(): void { $this->instance->setPrivateKey('privateKey'); $this->instance->setStatus('initStatus'); $this->instance->prepareDecryptAll('user', 'key'); diff --git a/apps/encryption/tests/Settings/AdminTest.php b/apps/encryption/tests/Settings/AdminTest.php index 80f7803badd..4ddaeb1b84d 100644 --- a/apps/encryption/tests/Settings/AdminTest.php +++ b/apps/encryption/tests/Settings/AdminTest.php @@ -51,7 +51,7 @@ class AdminTest extends TestCase { ); } - public function testGetForm() { + public function testGetForm(): void { $this->config ->method('getAppValue') ->will($this->returnCallback(function ($app, $key, $default) { @@ -73,11 +73,11 @@ class AdminTest extends TestCase { $this->assertEquals($expected, $this->admin->getForm()); } - public function testGetSection() { + public function testGetSection(): void { $this->assertSame('security', $this->admin->getSection()); } - public function testGetPriority() { + public function testGetPriority(): void { $this->assertSame(11, $this->admin->getPriority()); } } diff --git a/apps/encryption/tests/Users/SetupTest.php b/apps/encryption/tests/Users/SetupTest.php index 96d2357269e..92f24a0627c 100644 --- a/apps/encryption/tests/Users/SetupTest.php +++ b/apps/encryption/tests/Users/SetupTest.php @@ -42,7 +42,7 @@ class SetupTest extends TestCase { } - public function testSetupSystem() { + public function testSetupSystem(): void { $this->keyManagerMock->expects($this->once())->method('validateShareKey'); $this->keyManagerMock->expects($this->once())->method('validateMasterKey'); @@ -55,7 +55,7 @@ class SetupTest extends TestCase { * @param bool $hasKeys * @param bool $expected */ - public function testSetupUser($hasKeys, $expected) { + public function testSetupUser($hasKeys, $expected): void { $this->keyManagerMock->expects($this->once())->method('userHasKeys') ->with('uid')->willReturn($hasKeys); diff --git a/apps/encryption/tests/UtilTest.php b/apps/encryption/tests/UtilTest.php index 3bfc0efb516..6f2eec1ebf4 100644 --- a/apps/encryption/tests/UtilTest.php +++ b/apps/encryption/tests/UtilTest.php @@ -37,12 +37,12 @@ class UtilTest extends TestCase { /** @var Util */ private $instance; - public function testSetRecoveryForUser() { + public function testSetRecoveryForUser(): void { $this->instance->setRecoveryForUser('1'); $this->assertArrayHasKey('recoveryEnabled', self::$tempStorage); } - public function testIsRecoveryEnabledForUser() { + public function testIsRecoveryEnabledForUser(): void { $this->assertTrue($this->instance->isRecoveryEnabledForUser('admin')); // Assert recovery will return default value if not set @@ -50,7 +50,7 @@ class UtilTest extends TestCase { $this->assertEquals(0, $this->instance->isRecoveryEnabledForUser('admin')); } - public function testUserHasFiles() { + public function testUserHasFiles(): void { $this->filesMock->expects($this->once()) ->method('file_exists') ->willReturn(true); @@ -126,7 +126,7 @@ class UtilTest extends TestCase { * @param string $value * @param bool $expect */ - public function testIsMasterKeyEnabled($value, $expect) { + public function testIsMasterKeyEnabled($value, $expect): void { $this->configMock->expects($this->once())->method('getAppValue') ->with('encryption', 'useMasterKey', '1')->willReturn($value); $this->assertSame($expect, @@ -146,7 +146,7 @@ class UtilTest extends TestCase { * @param string $returnValue return value from getAppValue() * @param bool $expected */ - public function testShouldEncryptHomeStorage($returnValue, $expected) { + public function testShouldEncryptHomeStorage($returnValue, $expected): void { $this->configMock->expects($this->once())->method('getAppValue') ->with('encryption', 'encryptHomeStorage', '1') ->willReturn($returnValue); @@ -167,7 +167,7 @@ class UtilTest extends TestCase { * @param $value * @param $expected */ - public function testSetEncryptHomeStorage($value, $expected) { + public function testSetEncryptHomeStorage($value, $expected): void { $this->configMock->expects($this->once())->method('setAppValue') ->with('encryption', 'encryptHomeStorage', $expected); $this->instance->setEncryptHomeStorage($value); @@ -180,7 +180,7 @@ class UtilTest extends TestCase { ]; } - public function testGetStorage() { + public function testGetStorage(): void { $return = $this->getMockBuilder(Storage::class) ->disableOriginalConstructor() ->getMock(); diff --git a/apps/federatedfilesharing/tests/AddressHandlerTest.php b/apps/federatedfilesharing/tests/AddressHandlerTest.php index 3fb2a938a66..e235314e008 100644 --- a/apps/federatedfilesharing/tests/AddressHandlerTest.php +++ b/apps/federatedfilesharing/tests/AddressHandlerTest.php @@ -96,7 +96,7 @@ class AddressHandlerTest extends \Test\TestCase { * @param string $expectedUser * @param string $expectedUrl */ - public function testSplitUserRemote($remote, $expectedUser, $expectedUrl) { + public function testSplitUserRemote($remote, $expectedUser, $expectedUrl): void { $this->contactsManager->expects($this->any()) ->method('search') ->willReturn([]); @@ -129,7 +129,7 @@ class AddressHandlerTest extends \Test\TestCase { * * @param string $id */ - public function testSplitUserRemoteError($id) { + public function testSplitUserRemoteError($id): void { $this->expectException(\OCP\HintException::class); $this->addressHandler->splitUserRemote($id); @@ -144,7 +144,7 @@ class AddressHandlerTest extends \Test\TestCase { * @param string $server2 * @param bool $expected */ - public function testCompareAddresses($user1, $server1, $user2, $server2, $expected) { + public function testCompareAddresses($user1, $server1, $user2, $server2, $expected): void { $this->assertSame($expected, $this->addressHandler->compareAddresses($user1, $server1, $user2, $server2) ); @@ -176,7 +176,7 @@ class AddressHandlerTest extends \Test\TestCase { * @param string $url * @param string $expectedResult */ - public function testRemoveProtocolFromUrl($url, $expectedResult) { + public function testRemoveProtocolFromUrl($url, $expectedResult): void { $result = $this->addressHandler->removeProtocolFromUrl($url); $this->assertSame($expectedResult, $result); } @@ -195,7 +195,7 @@ class AddressHandlerTest extends \Test\TestCase { * @param string $url * @param bool $expectedResult */ - public function testUrlContainProtocol($url, $expectedResult) { + public function testUrlContainProtocol($url, $expectedResult): void { $result = $this->addressHandler->urlContainProtocol($url); $this->assertSame($expectedResult, $result); } diff --git a/apps/federatedfilesharing/tests/Controller/MountPublicLinkControllerTest.php b/apps/federatedfilesharing/tests/Controller/MountPublicLinkControllerTest.php index 61487689cde..6eb7ce30274 100644 --- a/apps/federatedfilesharing/tests/Controller/MountPublicLinkControllerTest.php +++ b/apps/federatedfilesharing/tests/Controller/MountPublicLinkControllerTest.php @@ -130,7 +130,7 @@ class MountPublicLinkControllerTest extends \Test\TestCase { $createSuccessful, $expectedReturnData, $permissions - ) { + ): void { $this->federatedShareProvider->expects($this->any()) ->method('isOutgoingServer2serverShareEnabled') ->willReturn($outgoingSharesAllowed); diff --git a/apps/federatedfilesharing/tests/Controller/RequestHandlerControllerTest.php b/apps/federatedfilesharing/tests/Controller/RequestHandlerControllerTest.php index dc128021b28..cce1ee8830a 100644 --- a/apps/federatedfilesharing/tests/Controller/RequestHandlerControllerTest.php +++ b/apps/federatedfilesharing/tests/Controller/RequestHandlerControllerTest.php @@ -130,7 +130,7 @@ class RequestHandlerControllerTest extends \Test\TestCase { ); } - public function testCreateShare() { + public function testCreateShare(): void { $this->cloudFederationFactory->expects($this->once())->method('getCloudFederationShare') ->with( $this->user2, @@ -160,7 +160,7 @@ class RequestHandlerControllerTest extends \Test\TestCase { $this->assertInstanceOf(DataResponse::class, $result); } - public function testDeclineShare() { + public function testDeclineShare(): void { $id = 42; $notification = [ @@ -183,7 +183,7 @@ class RequestHandlerControllerTest extends \Test\TestCase { } - public function testAcceptShare() { + public function testAcceptShare(): void { $id = 42; $notification = [ diff --git a/apps/federatedfilesharing/tests/FederatedShareProviderTest.php b/apps/federatedfilesharing/tests/FederatedShareProviderTest.php index 8f54207626f..5255a84b461 100644 --- a/apps/federatedfilesharing/tests/FederatedShareProviderTest.php +++ b/apps/federatedfilesharing/tests/FederatedShareProviderTest.php @@ -139,7 +139,7 @@ class FederatedShareProviderTest extends \Test\TestCase { /** * @dataProvider dataTestCreate */ - public function testCreate($expirationDate, $expectedDataDate) { + public function testCreate($expirationDate, $expectedDataDate): void { $share = $this->shareManager->newShare(); /** @var File|MockObject $node */ @@ -222,7 +222,7 @@ class FederatedShareProviderTest extends \Test\TestCase { $this->assertEquals($expirationDate, $share->getExpirationDate()); } - public function testCreateCouldNotFindServer() { + public function testCreateCouldNotFindServer(): void { $share = $this->shareManager->newShare(); $node = $this->getMockBuilder(File::class)->getMock(); @@ -283,7 +283,7 @@ class FederatedShareProviderTest extends \Test\TestCase { $this->assertFalse($data); } - public function testCreateException() { + public function testCreateException(): void { $share = $this->shareManager->newShare(); $node = $this->getMockBuilder(File::class)->getMock(); @@ -344,7 +344,7 @@ class FederatedShareProviderTest extends \Test\TestCase { $this->assertFalse($data); } - public function testCreateShareWithSelf() { + public function testCreateShareWithSelf(): void { $share = $this->shareManager->newShare(); $node = $this->getMockBuilder(File::class)->getMock(); @@ -387,7 +387,7 @@ class FederatedShareProviderTest extends \Test\TestCase { $this->assertFalse($data); } - public function testCreateAlreadyShared() { + public function testCreateAlreadyShared(): void { $share = $this->shareManager->newShare(); $node = $this->getMockBuilder(File::class)->getMock(); @@ -441,7 +441,7 @@ class FederatedShareProviderTest extends \Test\TestCase { /** * @dataProvider dataTestUpdate */ - public function testUpdate($owner, $sharedBy, $expirationDate) { + public function testUpdate($owner, $sharedBy, $expirationDate): void { $this->provider = $this->getMockBuilder('OCA\FederatedFileSharing\FederatedShareProvider') ->setConstructorArgs( [ @@ -525,7 +525,7 @@ class FederatedShareProviderTest extends \Test\TestCase { ]; } - public function testGetSharedBy() { + public function testGetSharedBy(): void { $node = $this->getMockBuilder(File::class)->getMock(); $node->method('getId')->willReturn(42); $node->method('getName')->willReturn('myFile'); @@ -571,7 +571,7 @@ class FederatedShareProviderTest extends \Test\TestCase { $this->assertEquals('sharedBy', $shares[0]->getSharedBy()); } - public function testGetSharedByWithNode() { + public function testGetSharedByWithNode(): void { $node = $this->getMockBuilder(File::class)->getMock(); $node->method('getId')->willReturn(42); $node->method('getName')->willReturn('myFile'); @@ -618,7 +618,7 @@ class FederatedShareProviderTest extends \Test\TestCase { $this->assertEquals(43, $shares[0]->getNodeId()); } - public function testGetSharedByWithReshares() { + public function testGetSharedByWithReshares(): void { $node = $this->getMockBuilder(File::class)->getMock(); $node->method('getId')->willReturn(42); $node->method('getName')->willReturn('myFile'); @@ -660,7 +660,7 @@ class FederatedShareProviderTest extends \Test\TestCase { $this->assertCount(2, $shares); } - public function testGetSharedByWithLimit() { + public function testGetSharedByWithLimit(): void { $node = $this->getMockBuilder(File::class)->getMock(); $node->method('getId')->willReturn(42); $node->method('getName')->willReturn('myFile'); @@ -730,7 +730,7 @@ class FederatedShareProviderTest extends \Test\TestCase { * @param string $deletedUser The user that is deleted * @param bool $rowDeleted Is the row deleted in this setup */ - public function testDeleteUser($owner, $initiator, $recipient, $deletedUser, $rowDeleted) { + public function testDeleteUser($owner, $initiator, $recipient, $deletedUser, $rowDeleted): void { $qb = $this->connection->getQueryBuilder(); $qb->insert('share') ->setValue('share_type', $qb->createNamedParameter(IShare::TYPE_REMOTE)) @@ -765,7 +765,7 @@ class FederatedShareProviderTest extends \Test\TestCase { * @param string $isEnabled * @param bool $expected */ - public function testIsOutgoingServer2serverShareEnabled($internalOnly, $isEnabled, $expected) { + public function testIsOutgoingServer2serverShareEnabled($internalOnly, $isEnabled, $expected): void { $this->gsConfig->expects($this->once())->method('onlyInternalFederation') ->willReturn($internalOnly); $this->config->expects($this->any())->method('getAppValue') @@ -792,7 +792,7 @@ class FederatedShareProviderTest extends \Test\TestCase { * @param string $isEnabled * @param bool $expected */ - public function testIsIncomingServer2serverShareEnabled($onlyInternal, $isEnabled, $expected) { + public function testIsIncomingServer2serverShareEnabled($onlyInternal, $isEnabled, $expected): void { $this->gsConfig->expects($this->once())->method('onlyInternalFederation') ->willReturn($onlyInternal); $this->config->expects($this->any())->method('getAppValue') @@ -819,7 +819,7 @@ class FederatedShareProviderTest extends \Test\TestCase { * @param string $isEnabled * @param bool $expected */ - public function testIsLookupServerQueriesEnabled($gsEnabled, $isEnabled, $expected) { + public function testIsLookupServerQueriesEnabled($gsEnabled, $isEnabled, $expected): void { $this->gsConfig->expects($this->once())->method('isGlobalScaleEnabled') ->willReturn($gsEnabled); $this->config->expects($this->any())->method('getAppValue') @@ -847,7 +847,7 @@ class FederatedShareProviderTest extends \Test\TestCase { * @param string $isEnabled * @param bool $expected */ - public function testIsLookupServerUploadEnabled($gsEnabled, $isEnabled, $expected) { + public function testIsLookupServerUploadEnabled($gsEnabled, $isEnabled, $expected): void { $this->gsConfig->expects($this->once())->method('isGlobalScaleEnabled') ->willReturn($gsEnabled); $this->config->expects($this->any())->method('getAppValue') @@ -868,7 +868,7 @@ class FederatedShareProviderTest extends \Test\TestCase { ]; } - public function testGetSharesInFolder() { + public function testGetSharesInFolder(): void { $userManager = \OC::$server->getUserManager(); $rootFolder = \OC::$server->getRootFolder(); @@ -922,7 +922,7 @@ class FederatedShareProviderTest extends \Test\TestCase { $u2->delete(); } - public function testGetAccessList() { + public function testGetAccessList(): void { $userManager = \OC::$server->getUserManager(); $rootFolder = \OC::$server->getRootFolder(); diff --git a/apps/federatedfilesharing/tests/NotificationsTest.php b/apps/federatedfilesharing/tests/NotificationsTest.php index d0f5283e7a9..868591cb4dd 100644 --- a/apps/federatedfilesharing/tests/NotificationsTest.php +++ b/apps/federatedfilesharing/tests/NotificationsTest.php @@ -102,7 +102,7 @@ class NotificationsTest extends \Test\TestCase { * @param array $httpRequestResult * @param bool $expected */ - public function testSendUpdateToRemote($try, $httpRequestResult, $expected) { + public function testSendUpdateToRemote($try, $httpRequestResult, $expected): void { $remote = 'http://remote'; $id = 42; $timestamp = 63576; diff --git a/apps/federatedfilesharing/tests/Settings/AdminTest.php b/apps/federatedfilesharing/tests/Settings/AdminTest.php index 29f15b0199d..031d19c2cb8 100644 --- a/apps/federatedfilesharing/tests/Settings/AdminTest.php +++ b/apps/federatedfilesharing/tests/Settings/AdminTest.php @@ -58,7 +58,7 @@ class AdminTest extends TestCase { * @dataProvider sharingStateProvider * @param bool $state */ - public function testGetForm($state) { + public function testGetForm($state): void { $this->federatedShareProvider ->expects($this->once()) ->method('isOutgoingServer2serverShareEnabled') @@ -112,11 +112,11 @@ class AdminTest extends TestCase { $this->assertEquals($expected, $this->admin->getForm()); } - public function testGetSection() { + public function testGetSection(): void { $this->assertSame('sharing', $this->admin->getSection()); } - public function testGetPriority() { + public function testGetPriority(): void { $this->assertSame(20, $this->admin->getPriority()); } } diff --git a/apps/federatedfilesharing/tests/TokenHandlerTest.php b/apps/federatedfilesharing/tests/TokenHandlerTest.php index f6b4a2fa9e9..9ed20779857 100644 --- a/apps/federatedfilesharing/tests/TokenHandlerTest.php +++ b/apps/federatedfilesharing/tests/TokenHandlerTest.php @@ -29,7 +29,7 @@ class TokenHandlerTest extends \Test\TestCase { $this->tokenHandler = new TokenHandler($this->secureRandom); } - public function testGenerateToken() { + public function testGenerateToken(): void { $this->secureRandom->expects($this->once())->method('generate') ->with( $this->expectedTokenLength, diff --git a/apps/federation/tests/BackgroundJob/GetSharedSecretTest.php b/apps/federation/tests/BackgroundJob/GetSharedSecretTest.php index bc3e971fad2..4fcb579d6f9 100644 --- a/apps/federation/tests/BackgroundJob/GetSharedSecretTest.php +++ b/apps/federation/tests/BackgroundJob/GetSharedSecretTest.php @@ -152,7 +152,7 @@ class GetSharedSecretTest extends TestCase { * * @param int $statusCode */ - public function testRun($statusCode) { + public function testRun($statusCode): void { $target = 'targetURL'; $source = 'sourceURL'; $token = 'token'; @@ -210,7 +210,7 @@ class GetSharedSecretTest extends TestCase { ]; } - public function testRunExpired() { + public function testRunExpired(): void { $target = 'targetURL'; $source = 'sourceURL'; $token = 'token'; @@ -240,7 +240,7 @@ class GetSharedSecretTest extends TestCase { $this->invokePrivate($this->getSharedSecret, 'run', [$argument]); } - public function testRunConnectionError() { + public function testRunConnectionError(): void { $target = 'targetURL'; $source = 'sourceURL'; $token = 'token'; diff --git a/apps/federation/tests/BackgroundJob/RequestSharedSecretTest.php b/apps/federation/tests/BackgroundJob/RequestSharedSecretTest.php index 7d67de38f5f..63b8324ad2e 100644 --- a/apps/federation/tests/BackgroundJob/RequestSharedSecretTest.php +++ b/apps/federation/tests/BackgroundJob/RequestSharedSecretTest.php @@ -87,7 +87,7 @@ class RequestSharedSecretTest extends TestCase { * @param bool $isTrustedServer * @param bool $retainBackgroundJob */ - public function testStart($isTrustedServer, $retainBackgroundJob) { + public function testStart($isTrustedServer, $retainBackgroundJob): void { /** @var RequestSharedSecret |MockObject $requestSharedSecret */ $requestSharedSecret = $this->getMockBuilder('OCA\Federation\BackgroundJob\RequestSharedSecret') ->setConstructorArgs( @@ -196,7 +196,7 @@ class RequestSharedSecretTest extends TestCase { ]; } - public function testRunExpired() { + public function testRunExpired(): void { $target = 'targetURL'; $source = 'sourceURL'; $token = 'token'; @@ -226,7 +226,7 @@ class RequestSharedSecretTest extends TestCase { $this->invokePrivate($this->requestSharedSecret, 'run', [$argument]); } - public function testRunConnectionError() { + public function testRunConnectionError(): void { $target = 'targetURL'; $source = 'sourceURL'; $token = 'token'; diff --git a/apps/federation/tests/DAV/FedAuthTest.php b/apps/federation/tests/DAV/FedAuthTest.php index 2d71137ae38..d059fff0481 100644 --- a/apps/federation/tests/DAV/FedAuthTest.php +++ b/apps/federation/tests/DAV/FedAuthTest.php @@ -20,7 +20,7 @@ class FedAuthTest extends TestCase { * @param string $user * @param string $password */ - public function testFedAuth($expected, $user, $password) { + public function testFedAuth($expected, $user, $password): void { /** @var DbHandler | \PHPUnit\Framework\MockObject\MockObject $db */ $db = $this->getMockBuilder('OCA\Federation\DbHandler')->disableOriginalConstructor()->getMock(); $db->method('auth')->willReturn(true); diff --git a/apps/federation/tests/DbHandlerTest.php b/apps/federation/tests/DbHandlerTest.php index df8cd36d8a8..aabbf1472e7 100644 --- a/apps/federation/tests/DbHandlerTest.php +++ b/apps/federation/tests/DbHandlerTest.php @@ -62,7 +62,7 @@ class DbHandlerTest extends TestCase { * @param string $expectedUrl the url we expect to be written to the db * @param string $expectedHash the hash value we expect to be written to the db */ - public function testAddServer($url, $expectedUrl, $expectedHash) { + public function testAddServer($url, $expectedUrl, $expectedHash): void { $id = $this->dbHandler->addServer($url); $query = $this->connection->getQueryBuilder()->select('*')->from($this->dbTable); @@ -85,7 +85,7 @@ class DbHandlerTest extends TestCase { ]; } - public function testRemove() { + public function testRemove(): void { $id1 = $this->dbHandler->addServer('server1'); $id2 = $this->dbHandler->addServer('server2'); @@ -112,7 +112,7 @@ class DbHandlerTest extends TestCase { } - public function testGetServerById() { + public function testGetServerById(): void { $this->dbHandler->addServer('server1'); $id = $this->dbHandler->addServer('server2'); @@ -120,7 +120,7 @@ class DbHandlerTest extends TestCase { $this->assertSame('server2', $result['url']); } - public function testGetAll() { + public function testGetAll(): void { $id1 = $this->dbHandler->addServer('server1'); $id2 = $this->dbHandler->addServer('server2'); @@ -139,7 +139,7 @@ class DbHandlerTest extends TestCase { * @param string $checkForServer * @param bool $expected */ - public function testServerExists($serverInTable, $checkForServer, $expected) { + public function testServerExists($serverInTable, $checkForServer, $expected): void { $this->dbHandler->addServer($serverInTable); $this->assertSame($expected, $this->dbHandler->serverExists($checkForServer) @@ -173,7 +173,7 @@ class DbHandlerTest extends TestCase { $this->assertSame('token', $result[0]['token']); } - public function testGetToken() { + public function testGetToken(): void { $this->dbHandler->addServer('server1'); $this->dbHandler->addToken('http://server1', 'token'); $this->assertSame('token', @@ -200,7 +200,7 @@ class DbHandlerTest extends TestCase { $this->assertSame('secret', $result[0]['shared_secret']); } - public function testGetSharedSecret() { + public function testGetSharedSecret(): void { $this->dbHandler->addServer('server1'); $this->dbHandler->addSharedSecret('http://server1', 'secret'); $this->assertSame('secret', @@ -208,7 +208,7 @@ class DbHandlerTest extends TestCase { ); } - public function testSetServerStatus() { + public function testSetServerStatus(): void { $this->dbHandler->addServer('server1'); $query = $this->connection->getQueryBuilder()->select('*')->from($this->dbTable); @@ -227,7 +227,7 @@ class DbHandlerTest extends TestCase { $this->assertSame(TrustedServers::STATUS_OK, (int)$result[0]['status']); } - public function testGetServerStatus() { + public function testGetServerStatus(): void { $this->dbHandler->addServer('server1'); $this->dbHandler->setServerStatus('http://server1', TrustedServers::STATUS_OK); $this->assertSame(TrustedServers::STATUS_OK, @@ -248,7 +248,7 @@ class DbHandlerTest extends TestCase { * @param string $url * @param string $expected */ - public function testHash($url, $expected) { + public function testHash($url, $expected): void { $this->assertSame($expected, $this->invokePrivate($this->dbHandler, 'hash', [$url]) ); @@ -269,7 +269,7 @@ class DbHandlerTest extends TestCase { * @param string $url * @param string $expected */ - public function testNormalizeUrl($url, $expected) { + public function testNormalizeUrl($url, $expected): void { $this->assertSame($expected, $this->invokePrivate($this->dbHandler, 'normalizeUrl', [$url]) ); @@ -288,7 +288,7 @@ class DbHandlerTest extends TestCase { /** * @dataProvider providesAuth */ - public function testAuth($expectedResult, $user, $password) { + public function testAuth($expectedResult, $user, $password): void { if ($expectedResult) { $this->dbHandler->addServer('url1'); $this->dbHandler->addSharedSecret('url1', $password); diff --git a/apps/federation/tests/Middleware/AddServerMiddlewareTest.php b/apps/federation/tests/Middleware/AddServerMiddlewareTest.php index 85b918a80f1..d5ee241a85a 100644 --- a/apps/federation/tests/Middleware/AddServerMiddlewareTest.php +++ b/apps/federation/tests/Middleware/AddServerMiddlewareTest.php @@ -49,7 +49,7 @@ class AddServerMiddlewareTest extends TestCase { * @param \Exception $exception * @param string $hint */ - public function testAfterException($exception, $hint) { + public function testAfterException($exception, $hint): void { $this->logger->expects($this->once())->method('error'); $this->l10n->expects($this->any())->method('t') diff --git a/apps/federation/tests/Settings/AdminTest.php b/apps/federation/tests/Settings/AdminTest.php index 3bbf4c4a9e7..3d58fae2d7b 100644 --- a/apps/federation/tests/Settings/AdminTest.php +++ b/apps/federation/tests/Settings/AdminTest.php @@ -26,7 +26,7 @@ class AdminTest extends TestCase { ); } - public function testGetForm() { + public function testGetForm(): void { $this->trustedServers ->expects($this->once()) ->method('getServers') @@ -39,11 +39,11 @@ class AdminTest extends TestCase { $this->assertEquals($expected, $this->admin->getForm()); } - public function testGetSection() { + public function testGetSection(): void { $this->assertSame('sharing', $this->admin->getSection()); } - public function testGetPriority() { + public function testGetPriority(): void { $this->assertSame(30, $this->admin->getPriority()); } } diff --git a/apps/federation/tests/SyncFederationAddressbooksTest.php b/apps/federation/tests/SyncFederationAddressbooksTest.php index 0f13dd0ec51..6d826741292 100644 --- a/apps/federation/tests/SyncFederationAddressbooksTest.php +++ b/apps/federation/tests/SyncFederationAddressbooksTest.php @@ -33,7 +33,7 @@ class SyncFederationAddressbooksTest extends \Test\TestCase { $this->logger = $this->createMock(LoggerInterface::class); } - public function testSync() { + public function testSync(): void { /** @var DbHandler | MockObject $dbHandler */ $dbHandler = $this->getMockBuilder('OCA\Federation\DbHandler') ->disableOriginalConstructor() @@ -63,7 +63,7 @@ class SyncFederationAddressbooksTest extends \Test\TestCase { $this->assertEquals('1', count($this->callBacks)); } - public function testException() { + public function testException(): void { /** @var DbHandler | MockObject $dbHandler */ $dbHandler = $this->getMockBuilder('OCA\Federation\DbHandler')-> disableOriginalConstructor()-> @@ -91,7 +91,7 @@ class SyncFederationAddressbooksTest extends \Test\TestCase { $this->assertEquals(2, count($this->callBacks)); } - public function testSuccessfulSyncWithoutChangesAfterFailure() { + public function testSuccessfulSyncWithoutChangesAfterFailure(): void { /** @var DbHandler | MockObject $dbHandler */ $dbHandler = $this->getMockBuilder('OCA\Federation\DbHandler') ->disableOriginalConstructor() diff --git a/apps/federation/tests/TrustedServersTest.php b/apps/federation/tests/TrustedServersTest.php index 93c66ea8831..67b59c87bdb 100644 --- a/apps/federation/tests/TrustedServersTest.php +++ b/apps/federation/tests/TrustedServersTest.php @@ -173,13 +173,13 @@ class TrustedServersTest extends TestCase { ); } - public function testSetServerStatus() { + public function testSetServerStatus(): void { $this->dbHandler->expects($this->once())->method('setServerStatus') ->with('url', 1); $this->trustedServers->setServerStatus('url', 1); } - public function testGetServerStatus() { + public function testGetServerStatus(): void { $this->dbHandler->expects($this->once())->method('getServerStatus') ->with('url')->willReturn(1); $this->assertSame( diff --git a/apps/files/l10n/de.js b/apps/files/l10n/de.js index d2658884f7a..dcd0fef4958 100644 --- a/apps/files/l10n/de.js +++ b/apps/files/l10n/de.js @@ -189,6 +189,8 @@ OC.L10N.register( "\"{displayName}\" action failed" : "Aktion \"{displayName}\" fehlgeschlagen", "Toggle selection for file \"{displayName}\"" : "Auswahl für die Datei \"{displayName}\" umschalten", "Toggle selection for folder \"{displayName}\"" : "Auswahl für den Ordner \"{displayName}\" umschalten", + "File is loading" : "Datei wird geladen", + "Folder is loading" : "Ordner wird geladen", "Rename file" : "Datei umbenennen", "Filename" : "Dateiname", "Folder name" : "Ordnername", @@ -205,6 +207,7 @@ OC.L10N.register( "Remove filter" : "Filter entfernen", "Total rows summary" : "Zusammenfassung aller Zeilen", "Toggle selection for all files and folders" : "Auswahl für alle Dateien und Ordner umschalten", + "(selected)" : "(ausgewählt)", "\"{displayName}\" failed on some elements " : "\"{displayName}\" ist bei einigen Elementen fehlgeschlagen", "\"{displayName}\" batch action executed successfully" : "Stapelaktion \"{displayName}\" erfolgreich ausgeführt", "{count} selected" : "{count} ausgewählt", @@ -379,6 +382,10 @@ OC.L10N.register( "Copy direct link (only works for users who have access to this file/folder)" : "Direkten Link kopieren (funktioniert nur für Benutzer, die Zugriff auf diese(n) Datei/Ordner haben)", "\"remote user\"" : "„Externer Benutzer“", "{newName} already exists." : "{newName} existiert bereits.", + "\"{segment}\" is not allowed inside a filename." : "\"{segment}\" ist in einem Dateinamen unzulässig.", + "\"{segment}\" is a forbidden file or folder name." : "\"{segment}\" ist ein unzulässiger Datei- oder Ordnername.", + "\"{segment}\" is not an allowed filetype." : "\"{segment}\" ist kein zulässiger Dateityp.", + "Filenames must not end with \"{segment}\"." : "Dateinamen dürfen nicht mit \"{segment}\" enden.", "Name cannot be empty" : "Der Name darf nicht leer sein", "Another entry with the same name already exists" : "Ein anderer Eintrag mit diesem Namen existiert bereits.", "Storage informations" : "Speicherinformationen", diff --git a/apps/files/l10n/de.json b/apps/files/l10n/de.json index dd06a727e77..e45f2139365 100644 --- a/apps/files/l10n/de.json +++ b/apps/files/l10n/de.json @@ -187,6 +187,8 @@ "\"{displayName}\" action failed" : "Aktion \"{displayName}\" fehlgeschlagen", "Toggle selection for file \"{displayName}\"" : "Auswahl für die Datei \"{displayName}\" umschalten", "Toggle selection for folder \"{displayName}\"" : "Auswahl für den Ordner \"{displayName}\" umschalten", + "File is loading" : "Datei wird geladen", + "Folder is loading" : "Ordner wird geladen", "Rename file" : "Datei umbenennen", "Filename" : "Dateiname", "Folder name" : "Ordnername", @@ -203,6 +205,7 @@ "Remove filter" : "Filter entfernen", "Total rows summary" : "Zusammenfassung aller Zeilen", "Toggle selection for all files and folders" : "Auswahl für alle Dateien und Ordner umschalten", + "(selected)" : "(ausgewählt)", "\"{displayName}\" failed on some elements " : "\"{displayName}\" ist bei einigen Elementen fehlgeschlagen", "\"{displayName}\" batch action executed successfully" : "Stapelaktion \"{displayName}\" erfolgreich ausgeführt", "{count} selected" : "{count} ausgewählt", @@ -377,6 +380,10 @@ "Copy direct link (only works for users who have access to this file/folder)" : "Direkten Link kopieren (funktioniert nur für Benutzer, die Zugriff auf diese(n) Datei/Ordner haben)", "\"remote user\"" : "„Externer Benutzer“", "{newName} already exists." : "{newName} existiert bereits.", + "\"{segment}\" is not allowed inside a filename." : "\"{segment}\" ist in einem Dateinamen unzulässig.", + "\"{segment}\" is a forbidden file or folder name." : "\"{segment}\" ist ein unzulässiger Datei- oder Ordnername.", + "\"{segment}\" is not an allowed filetype." : "\"{segment}\" ist kein zulässiger Dateityp.", + "Filenames must not end with \"{segment}\"." : "Dateinamen dürfen nicht mit \"{segment}\" enden.", "Name cannot be empty" : "Der Name darf nicht leer sein", "Another entry with the same name already exists" : "Ein anderer Eintrag mit diesem Namen existiert bereits.", "Storage informations" : "Speicherinformationen", diff --git a/apps/files/l10n/es.js b/apps/files/l10n/es.js index d16176df9ee..91a7b8b0ab4 100644 --- a/apps/files/l10n/es.js +++ b/apps/files/l10n/es.js @@ -156,11 +156,20 @@ OC.L10N.register( "A file has been added to or removed from your <strong>favorites</strong>" : "Un archivo fue agregado o borrado de tus <strong>favoritos</strong>", "A file or folder has been <strong>changed</strong>" : "Se ha <strong>modificado</strong> un archivo o carpeta", "A favorite file or folder has been <strong>changed</strong>" : "Un archivo o carpeta favorito ha sido <strong>cambiado</strong>", + "Failed to authorize" : "Fallo al autorizar", + "Invalid folder path" : "Ruta de carpeta inválida", + "Folder not found" : "Carpeta no encontrada", "Upload (max. %s)" : "Subida (máx. %s)", + "Files compatibility" : "Compatibilidad de archivos", + "Allow to restrict filenames to ensure files can be synced with all clients. By default all filenames valid on POSIX (e.g. Linux or macOS) are allowed." : "Permitir la restricción en nombres de archivo para asegurar que los archivos se puedan sincronizar con todos los clientes. Por defecto, se permiten todos los nombres de archivos válidos en POSIX (por ejemplo, Linux o macOS).", + "Enforce Windows compatibility" : "Forzar la compatibilidad con Windows", + "This will block filenames not valid on Windows systems, like using reserved names or special characters. But this will not enforce compatibility of case sensitivity." : "Esto bloqueará los nombres de archivos inválidos en sistemas Windows, tales como usar nombres reservados o caracteres especiales. Pero no forzará la compatibilidad del uso de mayúsculas y minúsculas.", "Accept" : "Aceptar", "Reject" : "Rechazar", "Incoming ownership transfer from {user}" : "Ha llegado una transferencia de propiedad de {user}", "Do you want to accept {path}?\n\nNote: The transfer process after accepting may take up to 1 hour." : "¿Deseas aceptar {path}?\n\nNota: El proceso de transferencia tras aceptar podría tardar hasta 1 hora.", + "Ownership transfer denied" : "Se denegó la transferencia de propiedad", + "Your ownership transfer of {path} was denied by {user}." : "Su transferencia de propiedad de {path} fue denegada por {user}.", "Ownership transfer failed" : "Fallo al transferir la propiedad", "Your ownership transfer of {path} to {user} failed." : "Ha fallado tu transferencia de propiedad de {path} a {user}.", "The ownership transfer of {path} from {user} failed." : "Ha fallado la transferencia de propiedad de {path} desde {user}.", @@ -168,6 +177,7 @@ OC.L10N.register( "Your ownership transfer of {path} to {user} has completed." : "Se ha completado su transferencia de propiedad de {path} a {user}.", "The ownership transfer of {path} from {user} has completed." : "Se ha completado la transferencia de propiedad de {path} a {user}.", "in %s" : "en %s", + "Transferred from %1$s on %2$s" : "Se transfirió desde %1$s en %2$s", "File Management" : "Gestión de archivos", "Current directory path" : "Dirección de la carpeta actual", "Reload current directory" : "Recargar carpeta actual", @@ -179,10 +189,14 @@ OC.L10N.register( "\"{displayName}\" action failed" : "la acción \"{displayName}\" falló", "Toggle selection for file \"{displayName}\"" : "Alternar selección para archivo \"{displayName}\"", "Toggle selection for folder \"{displayName}\"" : "Alternar selección para la carpeta \"{displayName}\"", + "File is loading" : "El archivo se está cargando", + "Folder is loading" : "La carpeta se está cargando", "Rename file" : "Renombrar archivo", "Filename" : "Nombre de archivo", "Folder name" : "Nombre de la carpeta", "This node is unavailable" : "Este nodo no está disponible", + "Another entry with the same name already exists." : "Ya existe otra entrada con el mismo nombre.", + "Invalid filename." : "Nombre de archivo inválido.", "Renamed \"{oldName}\" to \"{newName}\"" : "Renombrado \"{oldName}\" a \"{newName}\"", "Could not rename \"{oldName}\", it does not exist any more" : "No se ha podido renombrar \"{oldName}\", ya no existe", "The name \"{newName}\" is already used in the folder \"{dir}\". Please choose a different name." : "El nombre \"{newName}\" ya está en uso en la carpeta \"{dir}\". Por favor, escoja un nombre diferente.", @@ -193,6 +207,7 @@ OC.L10N.register( "Remove filter" : "Quitar filtro", "Total rows summary" : "Resumen de filas totales", "Toggle selection for all files and folders" : "Seleccionar/deseleccionar todos los archivos y carpetas", + "(selected)" : "(seleccionado)", "\"{displayName}\" failed on some elements " : "\"{displayName}\" fallo en algunos elementos", "\"{displayName}\" batch action executed successfully" : "la acción en lotes \"{displayName}\" se ejecutó exitósamente", "{count} selected" : "{count} seleccionados", @@ -200,11 +215,16 @@ OC.L10N.register( "Column headers with buttons are sortable." : "Las columnas con botones en la cabecera son ordenables.", "This list is not fully rendered for performance reasons. The files will be rendered as you navigate through the list." : "Esta lista no se muestra completamente por motivos de rendimiento. Los archivos se mostrarán a medida que navega por la lista.", "File not found" : "No se ha encontrado el archivo", + "Storage information" : "Información de almacenamiento", + "Storage quota" : "Cuota de almacenamiento", "{usedQuotaByte} used" : "{usedQuotaByte} utilizados", "{relative}% used" : "{relative}% utilizado", "Could not refresh storage stats" : "No fue posible refrescar las estadísticas de almacenamiento", "Your storage is full, files can not be updated or synced anymore!" : "Su almacenamiento está lleno, ¡Ya no se pueden subir ni sincronizarse más archivos!", "Create" : "Crear", + "This name is already in use." : "Este nombre ya está en uso.", + "Fill template fields" : "Rellenar los campos de la plantilla", + "Submitting fields…" : "Enviando campos…", "Submit" : "Enviar", "Transfer ownership of a file or folder" : "Transferir la propiedad de un archivo o carpeta", "Choose file or folder to transfer" : "Elegir archivo o carpeta para transferir", @@ -234,6 +254,7 @@ OC.L10N.register( "Error during upload: {message}" : "Error durante la subida: {message}", "Error during upload, status code {status}" : "Error durante la subida, código de estado {status}", "Unknown error during upload" : "Error desconocido durante la subida", + "Filter filenames…" : "Filtrar nombres de archivo…", "Views" : "Vistas", "Files settings" : "Configuración de archivos", "File cannot be accessed" : "El archivo no puede ser accesado", @@ -245,6 +266,7 @@ OC.L10N.register( "Show hidden files" : "Mostrar archivos ocultos", "Crop image previews" : "Recortar la previsualización de las imágenes", "Enable the grid view" : "Habilitar vista de cuadrícula", + "Enable folder tree" : "Habilitar el árbol de carpetas", "Additional settings" : "Ajustes adicionales", "WebDAV" : "WebDAV", "WebDAV URL" : "WebDAV URL", @@ -267,9 +289,14 @@ OC.L10N.register( "Disconnect storages" : "Desconectar almacenamientos", "Delete files" : "Eliminar archivos", "Delete folders" : "Eliminar carpetas", + "_You are about to permanently delete {count} item_::_You are about to permanently delete {count} items_" : ["Está a punto de eliminar {count} elemento permanentemente","Está a punto de eliminar {count} elementos permanentemente.","Está a punto de eliminar {count} elementos permanentemente"], + "_You are about to delete {count} item_::_You are about to delete {count} items_" : ["Está a punto de eliminar {count} elemento","Está a punto de eliminar {count} elementos","Está a punto de eliminar {count} elementos"], "Confirm deletion" : "Confirmar eliminación", "Cancel" : "Cancelar", + "Edit file locally" : "Editar archivo localmente", "The file should now open locally. If you don't see this happening, make sure that the desktop client is installed on your system." : "El archivo debería abrirse ahora de forma local. Si no ve que esto suceda, asegúrese de que el cliente de escritorio esté instalado en su sistema.", + "Retry local edit" : "Reintentar la edición local", + "Edit online" : "Editar en línea", "Destination is not a folder" : "El destino no es una carpeta", "This file/folder is already in that directory" : "Este archivo/carpeta ya está en ese directorio", "You cannot move a file/folder onto itself or into a subfolder of itself" : "No puede mover un archivo/carpeta a sí mismo o a una sub-carpeta de sí mismo", @@ -283,6 +310,7 @@ OC.L10N.register( "Copy to {target}" : "Copiar a {target}", "Move to {target}" : "Mover a {target}", "Move or copy operation failed" : "La operación de mover o copiar falló", + "Cancelled move or copy of \"{filename}\"." : "Se canceló la operación de mover o copiar de \"{filename}\".", "Cancelled move or copy operation" : "Se canceló la operación de mover o copiar", "Open folder {displayName}" : "Abrir carpeta {displayName}", "Open in Files" : "Abrir en Archivos", @@ -290,12 +318,20 @@ OC.L10N.register( "Today" : "Hoy", "Last 7 days" : "Últimos 7 días", "Last 30 days" : "Últimos 30 días", + "This year ({year})" : "Este año ({year})", + "Last year ({year})" : "El año pasado ({year})", "Documents" : "Documentos", + "Spreadsheets" : "Hojas de cálculo", + "Presentations" : "Presentaciones", + "PDFs" : "PDFs", "Folders" : "Carpetas", "Audio" : "Audio", + "Photos and images" : "Fotos e imágenes", "Videos" : "Vídeos", + "New folder creation cancelled" : "Se canceló la creación de la carpeta nueva", "Created new folder \"{name}\"" : "Se creó la carpeta nueva \"{name}\"", "Unable to initialize the templates directory" : "No se ha podido iniciar la carpeta de plantillas", + "Create templates folder" : "Crear carpeta de plantillas", "Templates" : "Plantillas", "New template folder" : "Nueva carpeta de plantillas", "In folder" : "En carpeta", @@ -318,6 +354,11 @@ OC.L10N.register( "_1 file and {folderCount} folder_::_1 file and {folderCount} folders_" : ["1 archivo y {folderCount} carpeta","1 archivo y {folderCount} carpetas","1 archivo y {folderCount} carpetas"], "_{fileCount} file and 1 folder_::_{fileCount} files and 1 folder_" : ["{fileCount} archivo y 1 carpeta","{fileCount} archivos y 1 carpeta","{fileCount} archivos y 1 carpeta"], "{fileCount} files and {folderCount} folders" : "{fileCount} archivos y {folderCount} carpetas", + "Filename must not be empty." : "El nombre de archivo no debe estar vacío.", + "\"{char}\" is not allowed inside a filename." : "\"{char}\" no está permitido en el nombre de archivo.", + "\"{segment}\" is a reserved name and not allowed for filenames." : "\"{segment}\" es un nombre reservado y no se permite para los nombres de archivo.", + "\"{extension}\" is not an allowed filetype." : "\"{extension}\" no es un tipo de archivo permitido.", + "Filenames must not end with \"{extension}\"." : "Los nombres de archivo no puede terminar con \"{extension}\".", "List of favorites files and folders." : "Lista de archivos y carpetas favoritos.", "No favorites yet" : "Aún no hay favoritos", "Files and folders you mark as favorite will show up here" : "Aquí aparecerán los archivos y carpetas que has marcado como favoritos", @@ -341,6 +382,10 @@ OC.L10N.register( "Copy direct link (only works for users who have access to this file/folder)" : "Copiar enlace directo (solo funciona para usuarios que tienen acceso a este archivo/carpeta)", "\"remote user\"" : "\"usuario remoto\"", "{newName} already exists." : "{newName} ya existe.", + "\"{segment}\" is not allowed inside a filename." : "\"{segment}\" no se permite dentro de los nombres de archivo.", + "\"{segment}\" is a forbidden file or folder name." : "\"{segment}\" no se permite como nombre de archivo o carpeta.", + "\"{segment}\" is not an allowed filetype." : "\"{segment}\" no es un tipo de archivo permitido.", + "Filenames must not end with \"{segment}\"." : "Los nombres de archivo no pueden terminar con \"{segment}\".", "Name cannot be empty" : "El nombre no puede estar vacío", "Another entry with the same name already exists" : "Ya existe otra entrada con el mismo nombre", "Storage informations" : "Informaciones de almacenamiento", diff --git a/apps/files/l10n/es.json b/apps/files/l10n/es.json index 71544a02417..8c7ea4867ce 100644 --- a/apps/files/l10n/es.json +++ b/apps/files/l10n/es.json @@ -154,11 +154,20 @@ "A file has been added to or removed from your <strong>favorites</strong>" : "Un archivo fue agregado o borrado de tus <strong>favoritos</strong>", "A file or folder has been <strong>changed</strong>" : "Se ha <strong>modificado</strong> un archivo o carpeta", "A favorite file or folder has been <strong>changed</strong>" : "Un archivo o carpeta favorito ha sido <strong>cambiado</strong>", + "Failed to authorize" : "Fallo al autorizar", + "Invalid folder path" : "Ruta de carpeta inválida", + "Folder not found" : "Carpeta no encontrada", "Upload (max. %s)" : "Subida (máx. %s)", + "Files compatibility" : "Compatibilidad de archivos", + "Allow to restrict filenames to ensure files can be synced with all clients. By default all filenames valid on POSIX (e.g. Linux or macOS) are allowed." : "Permitir la restricción en nombres de archivo para asegurar que los archivos se puedan sincronizar con todos los clientes. Por defecto, se permiten todos los nombres de archivos válidos en POSIX (por ejemplo, Linux o macOS).", + "Enforce Windows compatibility" : "Forzar la compatibilidad con Windows", + "This will block filenames not valid on Windows systems, like using reserved names or special characters. But this will not enforce compatibility of case sensitivity." : "Esto bloqueará los nombres de archivos inválidos en sistemas Windows, tales como usar nombres reservados o caracteres especiales. Pero no forzará la compatibilidad del uso de mayúsculas y minúsculas.", "Accept" : "Aceptar", "Reject" : "Rechazar", "Incoming ownership transfer from {user}" : "Ha llegado una transferencia de propiedad de {user}", "Do you want to accept {path}?\n\nNote: The transfer process after accepting may take up to 1 hour." : "¿Deseas aceptar {path}?\n\nNota: El proceso de transferencia tras aceptar podría tardar hasta 1 hora.", + "Ownership transfer denied" : "Se denegó la transferencia de propiedad", + "Your ownership transfer of {path} was denied by {user}." : "Su transferencia de propiedad de {path} fue denegada por {user}.", "Ownership transfer failed" : "Fallo al transferir la propiedad", "Your ownership transfer of {path} to {user} failed." : "Ha fallado tu transferencia de propiedad de {path} a {user}.", "The ownership transfer of {path} from {user} failed." : "Ha fallado la transferencia de propiedad de {path} desde {user}.", @@ -166,6 +175,7 @@ "Your ownership transfer of {path} to {user} has completed." : "Se ha completado su transferencia de propiedad de {path} a {user}.", "The ownership transfer of {path} from {user} has completed." : "Se ha completado la transferencia de propiedad de {path} a {user}.", "in %s" : "en %s", + "Transferred from %1$s on %2$s" : "Se transfirió desde %1$s en %2$s", "File Management" : "Gestión de archivos", "Current directory path" : "Dirección de la carpeta actual", "Reload current directory" : "Recargar carpeta actual", @@ -177,10 +187,14 @@ "\"{displayName}\" action failed" : "la acción \"{displayName}\" falló", "Toggle selection for file \"{displayName}\"" : "Alternar selección para archivo \"{displayName}\"", "Toggle selection for folder \"{displayName}\"" : "Alternar selección para la carpeta \"{displayName}\"", + "File is loading" : "El archivo se está cargando", + "Folder is loading" : "La carpeta se está cargando", "Rename file" : "Renombrar archivo", "Filename" : "Nombre de archivo", "Folder name" : "Nombre de la carpeta", "This node is unavailable" : "Este nodo no está disponible", + "Another entry with the same name already exists." : "Ya existe otra entrada con el mismo nombre.", + "Invalid filename." : "Nombre de archivo inválido.", "Renamed \"{oldName}\" to \"{newName}\"" : "Renombrado \"{oldName}\" a \"{newName}\"", "Could not rename \"{oldName}\", it does not exist any more" : "No se ha podido renombrar \"{oldName}\", ya no existe", "The name \"{newName}\" is already used in the folder \"{dir}\". Please choose a different name." : "El nombre \"{newName}\" ya está en uso en la carpeta \"{dir}\". Por favor, escoja un nombre diferente.", @@ -191,6 +205,7 @@ "Remove filter" : "Quitar filtro", "Total rows summary" : "Resumen de filas totales", "Toggle selection for all files and folders" : "Seleccionar/deseleccionar todos los archivos y carpetas", + "(selected)" : "(seleccionado)", "\"{displayName}\" failed on some elements " : "\"{displayName}\" fallo en algunos elementos", "\"{displayName}\" batch action executed successfully" : "la acción en lotes \"{displayName}\" se ejecutó exitósamente", "{count} selected" : "{count} seleccionados", @@ -198,11 +213,16 @@ "Column headers with buttons are sortable." : "Las columnas con botones en la cabecera son ordenables.", "This list is not fully rendered for performance reasons. The files will be rendered as you navigate through the list." : "Esta lista no se muestra completamente por motivos de rendimiento. Los archivos se mostrarán a medida que navega por la lista.", "File not found" : "No se ha encontrado el archivo", + "Storage information" : "Información de almacenamiento", + "Storage quota" : "Cuota de almacenamiento", "{usedQuotaByte} used" : "{usedQuotaByte} utilizados", "{relative}% used" : "{relative}% utilizado", "Could not refresh storage stats" : "No fue posible refrescar las estadísticas de almacenamiento", "Your storage is full, files can not be updated or synced anymore!" : "Su almacenamiento está lleno, ¡Ya no se pueden subir ni sincronizarse más archivos!", "Create" : "Crear", + "This name is already in use." : "Este nombre ya está en uso.", + "Fill template fields" : "Rellenar los campos de la plantilla", + "Submitting fields…" : "Enviando campos…", "Submit" : "Enviar", "Transfer ownership of a file or folder" : "Transferir la propiedad de un archivo o carpeta", "Choose file or folder to transfer" : "Elegir archivo o carpeta para transferir", @@ -232,6 +252,7 @@ "Error during upload: {message}" : "Error durante la subida: {message}", "Error during upload, status code {status}" : "Error durante la subida, código de estado {status}", "Unknown error during upload" : "Error desconocido durante la subida", + "Filter filenames…" : "Filtrar nombres de archivo…", "Views" : "Vistas", "Files settings" : "Configuración de archivos", "File cannot be accessed" : "El archivo no puede ser accesado", @@ -243,6 +264,7 @@ "Show hidden files" : "Mostrar archivos ocultos", "Crop image previews" : "Recortar la previsualización de las imágenes", "Enable the grid view" : "Habilitar vista de cuadrícula", + "Enable folder tree" : "Habilitar el árbol de carpetas", "Additional settings" : "Ajustes adicionales", "WebDAV" : "WebDAV", "WebDAV URL" : "WebDAV URL", @@ -265,9 +287,14 @@ "Disconnect storages" : "Desconectar almacenamientos", "Delete files" : "Eliminar archivos", "Delete folders" : "Eliminar carpetas", + "_You are about to permanently delete {count} item_::_You are about to permanently delete {count} items_" : ["Está a punto de eliminar {count} elemento permanentemente","Está a punto de eliminar {count} elementos permanentemente.","Está a punto de eliminar {count} elementos permanentemente"], + "_You are about to delete {count} item_::_You are about to delete {count} items_" : ["Está a punto de eliminar {count} elemento","Está a punto de eliminar {count} elementos","Está a punto de eliminar {count} elementos"], "Confirm deletion" : "Confirmar eliminación", "Cancel" : "Cancelar", + "Edit file locally" : "Editar archivo localmente", "The file should now open locally. If you don't see this happening, make sure that the desktop client is installed on your system." : "El archivo debería abrirse ahora de forma local. Si no ve que esto suceda, asegúrese de que el cliente de escritorio esté instalado en su sistema.", + "Retry local edit" : "Reintentar la edición local", + "Edit online" : "Editar en línea", "Destination is not a folder" : "El destino no es una carpeta", "This file/folder is already in that directory" : "Este archivo/carpeta ya está en ese directorio", "You cannot move a file/folder onto itself or into a subfolder of itself" : "No puede mover un archivo/carpeta a sí mismo o a una sub-carpeta de sí mismo", @@ -281,6 +308,7 @@ "Copy to {target}" : "Copiar a {target}", "Move to {target}" : "Mover a {target}", "Move or copy operation failed" : "La operación de mover o copiar falló", + "Cancelled move or copy of \"{filename}\"." : "Se canceló la operación de mover o copiar de \"{filename}\".", "Cancelled move or copy operation" : "Se canceló la operación de mover o copiar", "Open folder {displayName}" : "Abrir carpeta {displayName}", "Open in Files" : "Abrir en Archivos", @@ -288,12 +316,20 @@ "Today" : "Hoy", "Last 7 days" : "Últimos 7 días", "Last 30 days" : "Últimos 30 días", + "This year ({year})" : "Este año ({year})", + "Last year ({year})" : "El año pasado ({year})", "Documents" : "Documentos", + "Spreadsheets" : "Hojas de cálculo", + "Presentations" : "Presentaciones", + "PDFs" : "PDFs", "Folders" : "Carpetas", "Audio" : "Audio", + "Photos and images" : "Fotos e imágenes", "Videos" : "Vídeos", + "New folder creation cancelled" : "Se canceló la creación de la carpeta nueva", "Created new folder \"{name}\"" : "Se creó la carpeta nueva \"{name}\"", "Unable to initialize the templates directory" : "No se ha podido iniciar la carpeta de plantillas", + "Create templates folder" : "Crear carpeta de plantillas", "Templates" : "Plantillas", "New template folder" : "Nueva carpeta de plantillas", "In folder" : "En carpeta", @@ -316,6 +352,11 @@ "_1 file and {folderCount} folder_::_1 file and {folderCount} folders_" : ["1 archivo y {folderCount} carpeta","1 archivo y {folderCount} carpetas","1 archivo y {folderCount} carpetas"], "_{fileCount} file and 1 folder_::_{fileCount} files and 1 folder_" : ["{fileCount} archivo y 1 carpeta","{fileCount} archivos y 1 carpeta","{fileCount} archivos y 1 carpeta"], "{fileCount} files and {folderCount} folders" : "{fileCount} archivos y {folderCount} carpetas", + "Filename must not be empty." : "El nombre de archivo no debe estar vacío.", + "\"{char}\" is not allowed inside a filename." : "\"{char}\" no está permitido en el nombre de archivo.", + "\"{segment}\" is a reserved name and not allowed for filenames." : "\"{segment}\" es un nombre reservado y no se permite para los nombres de archivo.", + "\"{extension}\" is not an allowed filetype." : "\"{extension}\" no es un tipo de archivo permitido.", + "Filenames must not end with \"{extension}\"." : "Los nombres de archivo no puede terminar con \"{extension}\".", "List of favorites files and folders." : "Lista de archivos y carpetas favoritos.", "No favorites yet" : "Aún no hay favoritos", "Files and folders you mark as favorite will show up here" : "Aquí aparecerán los archivos y carpetas que has marcado como favoritos", @@ -339,6 +380,10 @@ "Copy direct link (only works for users who have access to this file/folder)" : "Copiar enlace directo (solo funciona para usuarios que tienen acceso a este archivo/carpeta)", "\"remote user\"" : "\"usuario remoto\"", "{newName} already exists." : "{newName} ya existe.", + "\"{segment}\" is not allowed inside a filename." : "\"{segment}\" no se permite dentro de los nombres de archivo.", + "\"{segment}\" is a forbidden file or folder name." : "\"{segment}\" no se permite como nombre de archivo o carpeta.", + "\"{segment}\" is not an allowed filetype." : "\"{segment}\" no es un tipo de archivo permitido.", + "Filenames must not end with \"{segment}\"." : "Los nombres de archivo no pueden terminar con \"{segment}\".", "Name cannot be empty" : "El nombre no puede estar vacío", "Another entry with the same name already exists" : "Ya existe otra entrada con el mismo nombre", "Storage informations" : "Informaciones de almacenamiento", diff --git a/apps/files/l10n/fr.js b/apps/files/l10n/fr.js index 514e90f0a80..1cfde430252 100644 --- a/apps/files/l10n/fr.js +++ b/apps/files/l10n/fr.js @@ -207,6 +207,7 @@ OC.L10N.register( "Remove filter" : "Retirer le filtre", "Total rows summary" : "Récapitulatif du nombre total de lignes", "Toggle selection for all files and folders" : "Basculer la sélection pour tous les fichiers et dossiers", + "(selected)" : "(sélectionné)", "\"{displayName}\" failed on some elements " : "\"{displayName}\" a échoué sur certains éléments", "\"{displayName}\" batch action executed successfully" : "L’action « {displayName} » par lot a été exécutée avec succès", "{count} selected" : "{count} sélectionné(s)", diff --git a/apps/files/l10n/fr.json b/apps/files/l10n/fr.json index 780c6d18a17..b9c63aa22d2 100644 --- a/apps/files/l10n/fr.json +++ b/apps/files/l10n/fr.json @@ -205,6 +205,7 @@ "Remove filter" : "Retirer le filtre", "Total rows summary" : "Récapitulatif du nombre total de lignes", "Toggle selection for all files and folders" : "Basculer la sélection pour tous les fichiers et dossiers", + "(selected)" : "(sélectionné)", "\"{displayName}\" failed on some elements " : "\"{displayName}\" a échoué sur certains éléments", "\"{displayName}\" batch action executed successfully" : "L’action « {displayName} » par lot a été exécutée avec succès", "{count} selected" : "{count} sélectionné(s)", diff --git a/apps/files/l10n/ja.js b/apps/files/l10n/ja.js index 22906f7a90c..9b500b4e748 100644 --- a/apps/files/l10n/ja.js +++ b/apps/files/l10n/ja.js @@ -207,6 +207,7 @@ OC.L10N.register( "Remove filter" : "フィルターを削除", "Total rows summary" : "総行数のサマリー", "Toggle selection for all files and folders" : "すべてのファイルとフォルダの選択を切り替える", + "(selected)" : "(選択済み)", "\"{displayName}\" failed on some elements " : "いくつかの要素で \"{displayName}\" が失敗しました。", "\"{displayName}\" batch action executed successfully" : "\"{displayName}\" バッチアクションが正常に実行されました。", "{count} selected" : "{count} 選択", diff --git a/apps/files/l10n/ja.json b/apps/files/l10n/ja.json index 5cdac70eb44..0b5e8ffc83f 100644 --- a/apps/files/l10n/ja.json +++ b/apps/files/l10n/ja.json @@ -205,6 +205,7 @@ "Remove filter" : "フィルターを削除", "Total rows summary" : "総行数のサマリー", "Toggle selection for all files and folders" : "すべてのファイルとフォルダの選択を切り替える", + "(selected)" : "(選択済み)", "\"{displayName}\" failed on some elements " : "いくつかの要素で \"{displayName}\" が失敗しました。", "\"{displayName}\" batch action executed successfully" : "\"{displayName}\" バッチアクションが正常に実行されました。", "{count} selected" : "{count} 選択", diff --git a/apps/files/l10n/pt_BR.js b/apps/files/l10n/pt_BR.js index 694e6d5d8f4..87e4f9702c6 100644 --- a/apps/files/l10n/pt_BR.js +++ b/apps/files/l10n/pt_BR.js @@ -207,6 +207,7 @@ OC.L10N.register( "Remove filter" : "Remover filtro", "Total rows summary" : "Resumo total de linhas", "Toggle selection for all files and folders" : "Alternar seleção para todos os arquivos e pastas", + "(selected)" : "(selecionado)", "\"{displayName}\" failed on some elements " : "\"{displayName}\" falhou em alguns elementos", "\"{displayName}\" batch action executed successfully" : "Ação em lote \"{displayName}\" executada com sucesso", "{count} selected" : "{count} selecionados", diff --git a/apps/files/l10n/pt_BR.json b/apps/files/l10n/pt_BR.json index b3ef2c95aa4..be65430c70b 100644 --- a/apps/files/l10n/pt_BR.json +++ b/apps/files/l10n/pt_BR.json @@ -205,6 +205,7 @@ "Remove filter" : "Remover filtro", "Total rows summary" : "Resumo total de linhas", "Toggle selection for all files and folders" : "Alternar seleção para todos os arquivos e pastas", + "(selected)" : "(selecionado)", "\"{displayName}\" failed on some elements " : "\"{displayName}\" falhou em alguns elementos", "\"{displayName}\" batch action executed successfully" : "Ação em lote \"{displayName}\" executada com sucesso", "{count} selected" : "{count} selecionados", diff --git a/apps/files/l10n/sk.js b/apps/files/l10n/sk.js index b54a4a6ffe8..1548b331933 100644 --- a/apps/files/l10n/sk.js +++ b/apps/files/l10n/sk.js @@ -187,6 +187,8 @@ OC.L10N.register( "\"{displayName}\" action failed" : "\"{displayName}\" akcia zlýhala", "Toggle selection for file \"{displayName}\"" : "Prepnúť výber pre súbor \"{displayName}\"", "Toggle selection for folder \"{displayName}\"" : "Prepnúť výber pre adresár \"{displayName}\"", + "File is loading" : "Súbor sa nahráva", + "Folder is loading" : "Adresár sa nahráva", "Rename file" : "Premenovať súbor", "Filename" : "Názov súboru", "Folder name" : "Názov priečinka", @@ -203,6 +205,7 @@ OC.L10N.register( "Remove filter" : "Odstrániť filter", "Total rows summary" : "Súčet všetkých riadkov", "Toggle selection for all files and folders" : "Prepnúť výber pre všetky súbory a adresáre", + "(selected)" : "(vybrané)", "\"{displayName}\" failed on some elements " : "\"{displayName}\" zlyhalo na niektorých prvkoch.", "\"{displayName}\" batch action executed successfully" : "Hromadná operácia \"{displayName}\" bola úspešne vykonaná", "{count} selected" : "{count} vybraných", @@ -321,7 +324,9 @@ OC.L10N.register( "PDFs" : "PDFká", "Folders" : "Priečinky", "Audio" : "Zvuk", + "Photos and images" : "Fotky a obrázky", "Videos" : "Videá", + "New folder creation cancelled" : "Vytvorenie adresára bolo zrušené", "Created new folder \"{name}\"" : "Vytvorený nový priečinok \"{name}\"", "Unable to initialize the templates directory" : "Nemôžem inicializovať priečinok so šablónami", "Create templates folder" : "Vytvoriť adresár pre šablóny", @@ -375,6 +380,10 @@ OC.L10N.register( "Copy direct link (only works for users who have access to this file/folder)" : "Kopírovať priamy odkaz (funguje iba pre používateľov, ktorí majú prístup k tomuto súboru/priečinku)", "\"remote user\"" : "\"vzdialený používateľ\"", "{newName} already exists." : "{newName} už existuje.", + "\"{segment}\" is not allowed inside a filename." : "\"{segment}\" nie je možné použiť v názve súboru.", + "\"{segment}\" is a forbidden file or folder name." : "\"{segment}\" je zakázané pre názov súboru alebo adresára.", + "\"{segment}\" is not an allowed filetype." : "\"{segment}\" nie je povolený typ súboru.", + "Filenames must not end with \"{segment}\"." : "Názov súboru nesmie končit na \"{segment}\".", "Name cannot be empty" : "Názov nemôže byť prázdny", "Another entry with the same name already exists" : "Názov už existuje", "Storage informations" : "Úložiskové informácie", diff --git a/apps/files/l10n/sk.json b/apps/files/l10n/sk.json index 287313d17a4..16bd5524f35 100644 --- a/apps/files/l10n/sk.json +++ b/apps/files/l10n/sk.json @@ -185,6 +185,8 @@ "\"{displayName}\" action failed" : "\"{displayName}\" akcia zlýhala", "Toggle selection for file \"{displayName}\"" : "Prepnúť výber pre súbor \"{displayName}\"", "Toggle selection for folder \"{displayName}\"" : "Prepnúť výber pre adresár \"{displayName}\"", + "File is loading" : "Súbor sa nahráva", + "Folder is loading" : "Adresár sa nahráva", "Rename file" : "Premenovať súbor", "Filename" : "Názov súboru", "Folder name" : "Názov priečinka", @@ -201,6 +203,7 @@ "Remove filter" : "Odstrániť filter", "Total rows summary" : "Súčet všetkých riadkov", "Toggle selection for all files and folders" : "Prepnúť výber pre všetky súbory a adresáre", + "(selected)" : "(vybrané)", "\"{displayName}\" failed on some elements " : "\"{displayName}\" zlyhalo na niektorých prvkoch.", "\"{displayName}\" batch action executed successfully" : "Hromadná operácia \"{displayName}\" bola úspešne vykonaná", "{count} selected" : "{count} vybraných", @@ -319,7 +322,9 @@ "PDFs" : "PDFká", "Folders" : "Priečinky", "Audio" : "Zvuk", + "Photos and images" : "Fotky a obrázky", "Videos" : "Videá", + "New folder creation cancelled" : "Vytvorenie adresára bolo zrušené", "Created new folder \"{name}\"" : "Vytvorený nový priečinok \"{name}\"", "Unable to initialize the templates directory" : "Nemôžem inicializovať priečinok so šablónami", "Create templates folder" : "Vytvoriť adresár pre šablóny", @@ -373,6 +378,10 @@ "Copy direct link (only works for users who have access to this file/folder)" : "Kopírovať priamy odkaz (funguje iba pre používateľov, ktorí majú prístup k tomuto súboru/priečinku)", "\"remote user\"" : "\"vzdialený používateľ\"", "{newName} already exists." : "{newName} už existuje.", + "\"{segment}\" is not allowed inside a filename." : "\"{segment}\" nie je možné použiť v názve súboru.", + "\"{segment}\" is a forbidden file or folder name." : "\"{segment}\" je zakázané pre názov súboru alebo adresára.", + "\"{segment}\" is not an allowed filetype." : "\"{segment}\" nie je povolený typ súboru.", + "Filenames must not end with \"{segment}\"." : "Názov súboru nesmie končit na \"{segment}\".", "Name cannot be empty" : "Názov nemôže byť prázdny", "Another entry with the same name already exists" : "Názov už existuje", "Storage informations" : "Úložiskové informácie", diff --git a/apps/files/l10n/uk.js b/apps/files/l10n/uk.js index d243bcccfc5..257193163c1 100644 --- a/apps/files/l10n/uk.js +++ b/apps/files/l10n/uk.js @@ -207,6 +207,7 @@ OC.L10N.register( "Remove filter" : "Вилучити фільтр", "Total rows summary" : "Загалом рядків", "Toggle selection for all files and folders" : "Перемкнути вибір для всіх файлів та каталогів", + "(selected)" : "(вибрано)", "\"{displayName}\" failed on some elements " : "\"{displayName}\" не показується в окремих елементах", "\"{displayName}\" batch action executed successfully" : "Операцію \"{displayName}\" успішно виконано", "{count} selected" : "{count} вибрано", diff --git a/apps/files/l10n/uk.json b/apps/files/l10n/uk.json index 7b4ea699249..554793051b5 100644 --- a/apps/files/l10n/uk.json +++ b/apps/files/l10n/uk.json @@ -205,6 +205,7 @@ "Remove filter" : "Вилучити фільтр", "Total rows summary" : "Загалом рядків", "Toggle selection for all files and folders" : "Перемкнути вибір для всіх файлів та каталогів", + "(selected)" : "(вибрано)", "\"{displayName}\" failed on some elements " : "\"{displayName}\" не показується в окремих елементах", "\"{displayName}\" batch action executed successfully" : "Операцію \"{displayName}\" успішно виконано", "{count} selected" : "{count} вибрано", diff --git a/apps/files/lib/Helper.php b/apps/files/lib/Helper.php index f79d4bc5f9c..6126c1270eb 100644 --- a/apps/files/lib/Helper.php +++ b/apps/files/lib/Helper.php @@ -119,16 +119,18 @@ class Helper { public static function formatFileInfo(FileInfo $i) { $entry = []; - $entry['id'] = $i['fileid']; - $entry['parentId'] = $i['parent']; - $entry['mtime'] = $i['mtime'] * 1000; + $entry['id'] = $i->getId(); + $entry['parentId'] = $i->getParentId(); + $entry['mtime'] = $i->getMtime() * 1000; // only pick out the needed attributes $entry['name'] = $i->getName(); - $entry['permissions'] = $i['permissions']; - $entry['mimetype'] = $i['mimetype']; - $entry['size'] = $i['size']; - $entry['type'] = $i['type']; - $entry['etag'] = $i['etag']; + $entry['permissions'] = $i->getPermissions(); + $entry['mimetype'] = $i->getMimetype(); + $entry['size'] = $i->getSize(); + $entry['type'] = $i->getType(); + $entry['etag'] = $i->getEtag(); + // TODO: this is using the private implementation of FileInfo + // the array access is not part of the public interface if (isset($i['tags'])) { $entry['tags'] = $i['tags']; } @@ -138,6 +140,10 @@ class Helper { if (isset($i['is_share_mount_point'])) { $entry['isShareMountPoint'] = $i['is_share_mount_point']; } + if (isset($i['extraData'])) { + $entry['extraData'] = $i['extraData']; + } + $mountType = null; $mount = $i->getMountPoint(); $mountType = $mount->getMountType(); @@ -147,9 +153,6 @@ class Helper { } $entry['mountType'] = $mountType; } - if (isset($i['extraData'])) { - $entry['extraData'] = $i['extraData']; - } return $entry; } diff --git a/apps/files/src/components/FilesListVirtual.vue b/apps/files/src/components/FilesListVirtual.vue index 7e2decde31a..035d4702e32 100644 --- a/apps/files/src/components/FilesListVirtual.vue +++ b/apps/files/src/components/FilesListVirtual.vue @@ -65,6 +65,7 @@ import type { UserConfig } from '../types' import { getFileListHeaders, Folder, View, getFileActions, FileType } from '@nextcloud/files' import { showError } from '@nextcloud/dialogs' import { translate as t } from '@nextcloud/l10n' +import { subscribe, unsubscribe } from '@nextcloud/event-bus' import { defineComponent } from 'vue' import { action as sidebarAction } from '../actions/sidebarAction.ts' @@ -200,8 +201,12 @@ export default defineComponent({ handler() { // wait for scrolling and updating the actions to settle this.$nextTick(() => { - if (this.fileId && this.openFile) { - this.handleOpenFile(this.fileId) + if (this.fileId) { + if (this.openFile) { + this.handleOpenFile(this.fileId) + } else { + this.unselectFile() + } } }) }, @@ -214,6 +219,8 @@ export default defineComponent({ const mainContent = window.document.querySelector('main.app-content') as HTMLElement mainContent.addEventListener('dragover', this.onDragOver) + subscribe('files:sidebar:closed', this.unselectFile) + // If the file list is mounted with a fileId specified // then we need to open the sidebar initially if (this.fileId) { @@ -224,6 +231,8 @@ export default defineComponent({ beforeDestroy() { const mainContent = window.document.querySelector('main.app-content') as HTMLElement mainContent.removeEventListener('dragover', this.onDragOver) + + unsubscribe('files:sidebar:closed', this.unselectFile) }, methods: { @@ -251,15 +260,22 @@ export default defineComponent({ } }, + unselectFile() { + // If the Sidebar is closed and if openFile is false, remove the file id from the URL + if (!this.openFile && OCA.Files.Sidebar.file === '') { + window.OCP.Files.Router.goToRoute( + null, + { ...this.$route.params, fileid: String(this.currentFolder.fileid ?? '') }, + this.$route.query, + ) + } + }, + /** * Handle opening a file (e.g. by ?openfile=true) * @param fileId File to open */ handleOpenFile(fileId: number|null) { - if (!this.openFile) { - return - } - if (fileId === null || this.openFileId === fileId) { return } diff --git a/apps/files/tests/Activity/Filter/GenericTest.php b/apps/files/tests/Activity/Filter/GenericTest.php index 6f4dd594582..347bea0f643 100644 --- a/apps/files/tests/Activity/Filter/GenericTest.php +++ b/apps/files/tests/Activity/Filter/GenericTest.php @@ -28,7 +28,7 @@ class GenericTest extends TestCase { * @dataProvider dataFilters * @param string $filterClass */ - public function testImplementsInterface($filterClass) { + public function testImplementsInterface($filterClass): void { $filter = \OC::$server->query($filterClass); $this->assertInstanceOf(IFilter::class, $filter); } @@ -37,7 +37,7 @@ class GenericTest extends TestCase { * @dataProvider dataFilters * @param string $filterClass */ - public function testGetIdentifier($filterClass) { + public function testGetIdentifier($filterClass): void { /** @var IFilter $filter */ $filter = \OC::$server->query($filterClass); $this->assertIsString($filter->getIdentifier()); @@ -47,7 +47,7 @@ class GenericTest extends TestCase { * @dataProvider dataFilters * @param string $filterClass */ - public function testGetName($filterClass) { + public function testGetName($filterClass): void { /** @var IFilter $filter */ $filter = \OC::$server->query($filterClass); $this->assertIsString($filter->getName()); @@ -57,7 +57,7 @@ class GenericTest extends TestCase { * @dataProvider dataFilters * @param string $filterClass */ - public function testGetPriority($filterClass) { + public function testGetPriority($filterClass): void { /** @var IFilter $filter */ $filter = \OC::$server->query($filterClass); $priority = $filter->getPriority(); @@ -70,7 +70,7 @@ class GenericTest extends TestCase { * @dataProvider dataFilters * @param string $filterClass */ - public function testGetIcon($filterClass) { + public function testGetIcon($filterClass): void { /** @var IFilter $filter */ $filter = \OC::$server->query($filterClass); $this->assertIsString($filter->getIcon()); @@ -81,7 +81,7 @@ class GenericTest extends TestCase { * @dataProvider dataFilters * @param string $filterClass */ - public function testFilterTypes($filterClass) { + public function testFilterTypes($filterClass): void { /** @var IFilter $filter */ $filter = \OC::$server->query($filterClass); $this->assertIsArray($filter->filterTypes([])); @@ -91,7 +91,7 @@ class GenericTest extends TestCase { * @dataProvider dataFilters * @param string $filterClass */ - public function testAllowedApps($filterClass) { + public function testAllowedApps($filterClass): void { /** @var IFilter $filter */ $filter = \OC::$server->query($filterClass); $this->assertIsArray($filter->allowedApps()); diff --git a/apps/files/tests/Activity/ProviderTest.php b/apps/files/tests/Activity/ProviderTest.php index 1716ccfe100..73c726dac3c 100644 --- a/apps/files/tests/Activity/ProviderTest.php +++ b/apps/files/tests/Activity/ProviderTest.php @@ -104,7 +104,7 @@ class ProviderTest extends TestCase { * @param string $name * @param string $path */ - public function testGetFile($parameter, $eventId, $id, $name, $path) { + public function testGetFile($parameter, $eventId, $id, $name, $path): void { $provider = $this->getProvider(); if ($eventId !== null) { @@ -131,7 +131,7 @@ class ProviderTest extends TestCase { } - public function testGetFileThrows() { + public function testGetFileThrows(): void { $this->expectException(\InvalidArgumentException::class); $provider = $this->getProvider(); diff --git a/apps/files/tests/Activity/Setting/GenericTest.php b/apps/files/tests/Activity/Setting/GenericTest.php index c124106140a..1cce876cbcf 100644 --- a/apps/files/tests/Activity/Setting/GenericTest.php +++ b/apps/files/tests/Activity/Setting/GenericTest.php @@ -23,7 +23,7 @@ class GenericTest extends TestCase { * @dataProvider dataSettings * @param string $settingClass */ - public function testImplementsInterface($settingClass) { + public function testImplementsInterface($settingClass): void { $setting = \OC::$server->query($settingClass); $this->assertInstanceOf(ISetting::class, $setting); } @@ -32,7 +32,7 @@ class GenericTest extends TestCase { * @dataProvider dataSettings * @param string $settingClass */ - public function testGetIdentifier($settingClass) { + public function testGetIdentifier($settingClass): void { /** @var ISetting $setting */ $setting = \OC::$server->query($settingClass); $this->assertIsString($setting->getIdentifier()); @@ -42,7 +42,7 @@ class GenericTest extends TestCase { * @dataProvider dataSettings * @param string $settingClass */ - public function testGetName($settingClass) { + public function testGetName($settingClass): void { /** @var ISetting $setting */ $setting = \OC::$server->query($settingClass); $this->assertIsString($setting->getName()); @@ -52,7 +52,7 @@ class GenericTest extends TestCase { * @dataProvider dataSettings * @param string $settingClass */ - public function testGetPriority($settingClass) { + public function testGetPriority($settingClass): void { /** @var ISetting $setting */ $setting = \OC::$server->query($settingClass); $priority = $setting->getPriority(); @@ -65,7 +65,7 @@ class GenericTest extends TestCase { * @dataProvider dataSettings * @param string $settingClass */ - public function testCanChangeStream($settingClass) { + public function testCanChangeStream($settingClass): void { /** @var ISetting $setting */ $setting = \OC::$server->query($settingClass); $this->assertIsBool($setting->canChangeStream()); @@ -75,7 +75,7 @@ class GenericTest extends TestCase { * @dataProvider dataSettings * @param string $settingClass */ - public function testIsDefaultEnabledStream($settingClass) { + public function testIsDefaultEnabledStream($settingClass): void { /** @var ISetting $setting */ $setting = \OC::$server->query($settingClass); $this->assertIsBool($setting->isDefaultEnabledStream()); @@ -85,7 +85,7 @@ class GenericTest extends TestCase { * @dataProvider dataSettings * @param string $settingClass */ - public function testCanChangeMail($settingClass) { + public function testCanChangeMail($settingClass): void { /** @var ISetting $setting */ $setting = \OC::$server->query($settingClass); $this->assertIsBool($setting->canChangeMail()); @@ -95,7 +95,7 @@ class GenericTest extends TestCase { * @dataProvider dataSettings * @param string $settingClass */ - public function testIsDefaultEnabledMail($settingClass) { + public function testIsDefaultEnabledMail($settingClass): void { /** @var ISetting $setting */ $setting = \OC::$server->query($settingClass); $this->assertIsBool($setting->isDefaultEnabledMail()); diff --git a/apps/files/tests/BackgroundJob/DeleteOrphanedItemsJobTest.php b/apps/files/tests/BackgroundJob/DeleteOrphanedItemsJobTest.php index fb8ff9884af..1ce2d7bd8f7 100644 --- a/apps/files/tests/BackgroundJob/DeleteOrphanedItemsJobTest.php +++ b/apps/files/tests/BackgroundJob/DeleteOrphanedItemsJobTest.php @@ -51,7 +51,7 @@ class DeleteOrphanedItemsJobTest extends \Test\TestCase { /** * Test clearing orphaned system tag mappings */ - public function testClearSystemTagMappings() { + public function testClearSystemTagMappings(): void { $this->cleanMapping('systemtag_object_mapping'); $query = $this->connection->getQueryBuilder(); @@ -100,7 +100,7 @@ class DeleteOrphanedItemsJobTest extends \Test\TestCase { /** * Test clearing orphaned system tag mappings */ - public function testClearUserTagMappings() { + public function testClearUserTagMappings(): void { $this->cleanMapping('vcategory_to_object'); $query = $this->connection->getQueryBuilder(); @@ -149,7 +149,7 @@ class DeleteOrphanedItemsJobTest extends \Test\TestCase { /** * Test clearing orphaned system tag mappings */ - public function testClearComments() { + public function testClearComments(): void { $this->cleanMapping('comments'); $query = $this->connection->getQueryBuilder(); @@ -200,7 +200,7 @@ class DeleteOrphanedItemsJobTest extends \Test\TestCase { /** * Test clearing orphaned system tag mappings */ - public function testClearCommentReadMarks() { + public function testClearCommentReadMarks(): void { $this->cleanMapping('comments_read_markers'); $query = $this->connection->getQueryBuilder(); diff --git a/apps/files/tests/BackgroundJob/ScanFilesTest.php b/apps/files/tests/BackgroundJob/ScanFilesTest.php index e4ba8348d64..0fb5163143f 100644 --- a/apps/files/tests/BackgroundJob/ScanFilesTest.php +++ b/apps/files/tests/BackgroundJob/ScanFilesTest.php @@ -79,7 +79,7 @@ class ScanFilesTest extends TestCase { return $storage; } - public function testAllScanned() { + public function testAllScanned(): void { $this->setupStorage('foouser', '/foousers/files/foo'); $this->scanFiles->expects($this->never()) @@ -87,7 +87,7 @@ class ScanFilesTest extends TestCase { $this->runJob(); } - public function testUnscanned() { + public function testUnscanned(): void { $storage = $this->setupStorage('foouser', '/foousers/files/foo'); $storage->getCache()->put('foo', ['size' => -1]); diff --git a/apps/files/tests/Command/DeleteOrphanedFilesTest.php b/apps/files/tests/Command/DeleteOrphanedFilesTest.php index ed9a1866d26..1205e204ec4 100644 --- a/apps/files/tests/Command/DeleteOrphanedFilesTest.php +++ b/apps/files/tests/Command/DeleteOrphanedFilesTest.php @@ -82,7 +82,7 @@ class DeleteOrphanedFilesTest extends TestCase { /** * Test clearing orphaned files */ - public function testClearFiles() { + public function testClearFiles(): void { $input = $this->getMockBuilder(InputInterface::class) ->disableOriginalConstructor() ->getMock(); diff --git a/apps/files/tests/Controller/ApiControllerTest.php b/apps/files/tests/Controller/ApiControllerTest.php index f79a5c7bb64..ad2a6a15b2b 100644 --- a/apps/files/tests/Controller/ApiControllerTest.php +++ b/apps/files/tests/Controller/ApiControllerTest.php @@ -113,12 +113,12 @@ class ApiControllerTest extends TestCase { ); } - public function testUpdateFileTagsEmpty() { + public function testUpdateFileTagsEmpty(): void { $expected = new DataResponse([]); $this->assertEquals($expected, $this->apiController->updateFileTags('/path.txt')); } - public function testUpdateFileTagsWorking() { + public function testUpdateFileTagsWorking(): void { $this->tagService->expects($this->once()) ->method('updateFileTags') ->with('/path.txt', ['Tag1', 'Tag2']); @@ -132,7 +132,7 @@ class ApiControllerTest extends TestCase { $this->assertEquals($expected, $this->apiController->updateFileTags('/path.txt', ['Tag1', 'Tag2'])); } - public function testUpdateFileTagsNotFoundException() { + public function testUpdateFileTagsNotFoundException(): void { $this->tagService->expects($this->once()) ->method('updateFileTags') ->with('/path.txt', ['Tag1', 'Tag2']) @@ -142,7 +142,7 @@ class ApiControllerTest extends TestCase { $this->assertEquals($expected, $this->apiController->updateFileTags('/path.txt', ['Tag1', 'Tag2'])); } - public function testUpdateFileTagsStorageNotAvailableException() { + public function testUpdateFileTagsStorageNotAvailableException(): void { $this->tagService->expects($this->once()) ->method('updateFileTags') ->with('/path.txt', ['Tag1', 'Tag2']) @@ -152,7 +152,7 @@ class ApiControllerTest extends TestCase { $this->assertEquals($expected, $this->apiController->updateFileTags('/path.txt', ['Tag1', 'Tag2'])); } - public function testUpdateFileTagsStorageGenericException() { + public function testUpdateFileTagsStorageGenericException(): void { $this->tagService->expects($this->once()) ->method('updateFileTags') ->with('/path.txt', ['Tag1', 'Tag2']) @@ -162,7 +162,7 @@ class ApiControllerTest extends TestCase { $this->assertEquals($expected, $this->apiController->updateFileTags('/path.txt', ['Tag1', 'Tag2'])); } - public function testGetThumbnailInvalidSize() { + public function testGetThumbnailInvalidSize(): void { $this->userFolder->method('get') ->with($this->equalTo('')) ->willThrowException(new NotFoundException()); @@ -170,7 +170,7 @@ class ApiControllerTest extends TestCase { $this->assertEquals($expected, $this->apiController->getThumbnail(0, 0, '')); } - public function testGetThumbnailInvalidImage() { + public function testGetThumbnailInvalidImage(): void { $file = $this->createMock(File::class); $file->method('getId')->willReturn(123); $this->userFolder->method('get') @@ -184,7 +184,7 @@ class ApiControllerTest extends TestCase { $this->assertEquals($expected, $this->apiController->getThumbnail(10, 10, 'unknown.jpg')); } - public function testGetThumbnailInvalidPartFile() { + public function testGetThumbnailInvalidPartFile(): void { $file = $this->createMock(File::class); $file->method('getId')->willReturn(0); $this->userFolder->method('get') @@ -194,7 +194,7 @@ class ApiControllerTest extends TestCase { $this->assertEquals($expected, $this->apiController->getThumbnail(10, 10, 'unknown.jpg')); } - public function testGetThumbnail() { + public function testGetThumbnail(): void { $file = $this->createMock(File::class); $file->method('getId')->willReturn(123); $this->userFolder->method('get') @@ -214,7 +214,7 @@ class ApiControllerTest extends TestCase { $this->assertInstanceOf(Http\FileDisplayResponse::class, $ret); } - public function testShowHiddenFiles() { + public function testShowHiddenFiles(): void { $show = false; $this->config->expects($this->once()) @@ -227,7 +227,7 @@ class ApiControllerTest extends TestCase { $this->assertEquals($expected, $actual); } - public function testCropImagePreviews() { + public function testCropImagePreviews(): void { $crop = true; $this->config->expects($this->once()) diff --git a/apps/files/tests/Controller/ViewControllerTest.php b/apps/files/tests/Controller/ViewControllerTest.php index c1bc27d42b5..a6eba1f9eaf 100644 --- a/apps/files/tests/Controller/ViewControllerTest.php +++ b/apps/files/tests/Controller/ViewControllerTest.php @@ -97,7 +97,7 @@ class ViewControllerTest extends TestCase { ->getMock(); } - public function testIndexWithRegularBrowser() { + public function testIndexWithRegularBrowser(): void { $this->viewController ->expects($this->any()) ->method('getStorageInfo') @@ -145,7 +145,7 @@ class ViewControllerTest extends TestCase { $this->assertEquals($expected, $this->viewController->index('MyDir', 'MyView')); } - public function testShowFileRouteWithTrashedFile() { + public function testShowFileRouteWithTrashedFile(): void { $this->appManager->expects($this->once()) ->method('isEnabledForUser') ->with('files_trashbin') diff --git a/apps/files/tests/HelperTest.php b/apps/files/tests/HelperTest.php index 2bafb25dffa..fdcef8f7125 100644 --- a/apps/files/tests/HelperTest.php +++ b/apps/files/tests/HelperTest.php @@ -74,7 +74,7 @@ class HelperTest extends \Test\TestCase { /** * @dataProvider sortDataProvider */ - public function testSortByName(string $sort, bool $sortDescending, array $expectedOrder) { + public function testSortByName(string $sort, bool $sortDescending, array $expectedOrder): void { if (($sort === 'mtime') && (PHP_INT_SIZE < 8)) { $this->markTestSkipped('Skip mtime sorting on 32bit'); } @@ -90,7 +90,7 @@ class HelperTest extends \Test\TestCase { ); } - public function testPopulateTags() { + public function testPopulateTags(): void { $tagManager = $this->createMock(\OCP\ITagManager::class); $tagger = $this->createMock(\OCP\ITags::class); diff --git a/apps/files/tests/Service/TagServiceTest.php b/apps/files/tests/Service/TagServiceTest.php index 7a2084f21d8..7922c45a639 100644 --- a/apps/files/tests/Service/TagServiceTest.php +++ b/apps/files/tests/Service/TagServiceTest.php @@ -101,7 +101,7 @@ class TagServiceTest extends \Test\TestCase { } } - public function testUpdateFileTags() { + public function testUpdateFileTags(): void { $tag1 = 'tag1'; $tag2 = 'tag2'; @@ -142,7 +142,7 @@ class TagServiceTest extends \Test\TestCase { $subdir->delete(); } - public function testFavoriteActivity() { + public function testFavoriteActivity(): void { $subdir = $this->root->newFolder('subdir'); $file = $subdir->newFile('test.txt'); diff --git a/apps/files_external/appinfo/routes.php b/apps/files_external/appinfo/routes.php index b3f82cbad74..18418cc19c3 100644 --- a/apps/files_external/appinfo/routes.php +++ b/apps/files_external/appinfo/routes.php @@ -40,10 +40,5 @@ return [ 'url' => '/api/v1/mounts', 'verb' => 'GET', ], - [ - 'name' => 'Api#askNativeAuth', - 'url' => '/api/v1/auth', - 'verb' => 'GET', - ], ], ]; diff --git a/apps/files_external/l10n/ar.js b/apps/files_external/l10n/ar.js index d69dbc23fa7..2705bfbeaa6 100644 --- a/apps/files_external/l10n/ar.js +++ b/apps/files_external/l10n/ar.js @@ -115,9 +115,14 @@ OC.L10N.register( "External storage support" : "دعم التخزين الخارجي", "Adds basic external storage support" : "يُضيف دعماً أساسيّاً للتخزين الخارجي", "This application enables administrators to configure connections to external storage providers, such as FTP servers, S3 or SWIFT object stores, other Nextcloud servers, WebDAV servers, and more. Administration can choose which types of storage to enable and can mount these storage locations for an account, a group, or the entire system. Users will see a new folder appear in their root Nextcloud directory, which they can access and use like any other Nextcloud folder. External storage also allows people to share files stored in these external locations. In these cases, the credentials for the owner of the file are used when the recipient requests the file from external storage, thereby ensuring that the recipient can access the shared file.\n\nExternal storage can be configured using the GUI or at the command line. This second option provides the administration with more flexibility for configuring bulk external storage mounts and setting mount priorities. More information is available in the external storage GUI documentation and the external storage Configuration File documentation." : "يُمكّن هذا التطبيق المشرفين من تكوين الاتصالات بمُوفّري التخزين الخارجي؛ مثل خوادم FTP، ومخازن عناصر S3 أو SWIFT، و خوادم نكست الأخرى، و خوادم WebDAV و غيرها. يمكن للمشرفين اختيار أنواع التخزين التي يرغبون في تمكينها، ويمكنهم إمطاء mountg مواقع التخزين هذه لمستخدمٍ أو لمجموعة مستخدمين أو للنظام بأكمله. سيرى المستخدمون مُجلّدًا جديدًا يظهر في دليل نكست كلاود الجذري الخاص بهم والذي يمكنهم الوصول إليه واستخدامه مثل أي مجلد آخر من نكست كلاود. \nتتيح وحدة التخزين الخارجية أيضًا للمستخدمين مشاركة الملفات المُخزّنة في هذه المواقع الخارجية. في هذه الحالة، يتم استخدام حيثيات الدخول لمالك الملف عندما يطلب المستلم الملف من وحدة التخزين الخارجية؛ ممّا يضمن إمكانية وصول المستلم إلى الملف المشترك. \nيمكن تكوين التخزين الخارجي عن طريق واجهة المستخدم الرسومية أو عن طريق سطر الأوامر. يوفر الخيار الثاني للمستخدم المتقدم مزيدًا من المرونة لتكوين ممتطيات mounts لوحدات التخزين الخارجية بالجملة و تحديد أولويات الامتطاء. \nللمزيد من المعلومات، أنظر في توثيق واجهة المستخدم الرسومية للتخزين الخارجي، و توثيق تكوين وحدة التخزين الخارجية لتطبيق الملفات Files .", - "Enter missing credentials" : "أدخِل حيثيات الدخول الناقصة", + "Storage credentials" : "حيثيّات وحدة التخزين", + "To access the storage, you need to provide the authentification informations." : "للوصول إلى وحدة التخزين، يتوجب عليك إعطاء بيانات التصديق.", + "Enter the storage login" : "التسجيل للدخول إلى وحدة التخزين", + "Enter the storage password" : "أدخِل كلمة المرور لوحدة التخزين", + "Submit" : "إرسال ", "Unable to update this external storage config. {statusMessage}" : "تعذّر تحديث تهيئة وحدة التخزين الخارجية هذه. {statusMessage}", "New configuration successfully saved" : "تمّ حفظ التهيئة الجديدة بنجاحٍ", + "Enter missing credentials" : "أدخِل حيثيات الدخول الناقصة", "There was an error with this external storage." : "هنالك خطأ في وحدة التخزين الخارجية هذه.", "We were unable to check the external storage {basename}" : "لم نستطع التحقق من وحدة التخزين الخارجية {basename}", "Examine this faulty external storage configuration" : "إفحَص التهيئة الخاطئة لوحدة التخزين الخارجية هذه", diff --git a/apps/files_external/l10n/ar.json b/apps/files_external/l10n/ar.json index 90888d764a6..e13d35f1187 100644 --- a/apps/files_external/l10n/ar.json +++ b/apps/files_external/l10n/ar.json @@ -113,9 +113,14 @@ "External storage support" : "دعم التخزين الخارجي", "Adds basic external storage support" : "يُضيف دعماً أساسيّاً للتخزين الخارجي", "This application enables administrators to configure connections to external storage providers, such as FTP servers, S3 or SWIFT object stores, other Nextcloud servers, WebDAV servers, and more. Administration can choose which types of storage to enable and can mount these storage locations for an account, a group, or the entire system. Users will see a new folder appear in their root Nextcloud directory, which they can access and use like any other Nextcloud folder. External storage also allows people to share files stored in these external locations. In these cases, the credentials for the owner of the file are used when the recipient requests the file from external storage, thereby ensuring that the recipient can access the shared file.\n\nExternal storage can be configured using the GUI or at the command line. This second option provides the administration with more flexibility for configuring bulk external storage mounts and setting mount priorities. More information is available in the external storage GUI documentation and the external storage Configuration File documentation." : "يُمكّن هذا التطبيق المشرفين من تكوين الاتصالات بمُوفّري التخزين الخارجي؛ مثل خوادم FTP، ومخازن عناصر S3 أو SWIFT، و خوادم نكست الأخرى، و خوادم WebDAV و غيرها. يمكن للمشرفين اختيار أنواع التخزين التي يرغبون في تمكينها، ويمكنهم إمطاء mountg مواقع التخزين هذه لمستخدمٍ أو لمجموعة مستخدمين أو للنظام بأكمله. سيرى المستخدمون مُجلّدًا جديدًا يظهر في دليل نكست كلاود الجذري الخاص بهم والذي يمكنهم الوصول إليه واستخدامه مثل أي مجلد آخر من نكست كلاود. \nتتيح وحدة التخزين الخارجية أيضًا للمستخدمين مشاركة الملفات المُخزّنة في هذه المواقع الخارجية. في هذه الحالة، يتم استخدام حيثيات الدخول لمالك الملف عندما يطلب المستلم الملف من وحدة التخزين الخارجية؛ ممّا يضمن إمكانية وصول المستلم إلى الملف المشترك. \nيمكن تكوين التخزين الخارجي عن طريق واجهة المستخدم الرسومية أو عن طريق سطر الأوامر. يوفر الخيار الثاني للمستخدم المتقدم مزيدًا من المرونة لتكوين ممتطيات mounts لوحدات التخزين الخارجية بالجملة و تحديد أولويات الامتطاء. \nللمزيد من المعلومات، أنظر في توثيق واجهة المستخدم الرسومية للتخزين الخارجي، و توثيق تكوين وحدة التخزين الخارجية لتطبيق الملفات Files .", - "Enter missing credentials" : "أدخِل حيثيات الدخول الناقصة", + "Storage credentials" : "حيثيّات وحدة التخزين", + "To access the storage, you need to provide the authentification informations." : "للوصول إلى وحدة التخزين، يتوجب عليك إعطاء بيانات التصديق.", + "Enter the storage login" : "التسجيل للدخول إلى وحدة التخزين", + "Enter the storage password" : "أدخِل كلمة المرور لوحدة التخزين", + "Submit" : "إرسال ", "Unable to update this external storage config. {statusMessage}" : "تعذّر تحديث تهيئة وحدة التخزين الخارجية هذه. {statusMessage}", "New configuration successfully saved" : "تمّ حفظ التهيئة الجديدة بنجاحٍ", + "Enter missing credentials" : "أدخِل حيثيات الدخول الناقصة", "There was an error with this external storage." : "هنالك خطأ في وحدة التخزين الخارجية هذه.", "We were unable to check the external storage {basename}" : "لم نستطع التحقق من وحدة التخزين الخارجية {basename}", "Examine this faulty external storage configuration" : "إفحَص التهيئة الخاطئة لوحدة التخزين الخارجية هذه", diff --git a/apps/files_external/l10n/ast.js b/apps/files_external/l10n/ast.js index 1b93f48eaa6..5a079da6028 100644 --- a/apps/files_external/l10n/ast.js +++ b/apps/files_external/l10n/ast.js @@ -114,9 +114,10 @@ OC.L10N.register( "External storage support" : "Compatibilidá con almacenamientos esternos", "Adds basic external storage support" : "Amiesta compatibilidá básica p'almacenamientos esternos", "This application enables administrators to configure connections to external storage providers, such as FTP servers, S3 or SWIFT object stores, other Nextcloud servers, WebDAV servers, and more. Administration can choose which types of storage to enable and can mount these storage locations for an account, a group, or the entire system. Users will see a new folder appear in their root Nextcloud directory, which they can access and use like any other Nextcloud folder. External storage also allows people to share files stored in these external locations. In these cases, the credentials for the owner of the file are used when the recipient requests the file from external storage, thereby ensuring that the recipient can access the shared file.\n\nExternal storage can be configured using the GUI or at the command line. This second option provides the administration with more flexibility for configuring bulk external storage mounts and setting mount priorities. More information is available in the external storage GUI documentation and the external storage Configuration File documentation." : "Esta aplicación permite a l'alministración configurar les conexones a fornidores d'almacenamientu esternu, como sirvidores FTP, S3 o almacenes d'oxetos SWIFT, otros sirvidores Nextcloud, sirvidores WebDAV y munchos más. L'alministración pue escoyer los tipos d'almacenamientu qu'activa y pue montalos pa una cuenta, un grupu o tol sistema. Los usuarios van ver qu'apaez una carpeta neuva nel direutoriu raigañu de Nextcloud, al que puen acceder y usar como otra carpeta cualquiera. L'almacenamientu esternu tamién permite a les persones compartir ficheros atroxaos nestos llugares esternos. Nesos casos, úsense les credenciales del propietariu del ficheru cuando'l destinatariu solicita el ficheru del almacenamientu esternu, d'esti mou asegúrase de que'l destinatariu pue acceder al ficheru compartíu.\n\nPues configurar l'almacenamientu esternu cola GUI o la llinia de comandos. Esta postrer opción forne una alministración más flexible pa configurar grupos de montaxes d'almacenamientu esternu y configurar les prioridaes del montaxe. Tienes más información disponible na documentación de la GUI d'almacenamientos esternos y la documentación de los ficheros de configuración de los almacenamientos esternos.", - "Enter missing credentials" : "Instroduz les credenciales que falten", + "Submit" : "Unviar", "Unable to update this external storage config. {statusMessage}" : "Nun ye posible anovar la configuración d'esti almacenamientu esternu. {statusMessage}", "New configuration successfully saved" : "La configuración nueva guardóse correutamente", + "Enter missing credentials" : "Instroduz les credenciales que falten", "There was an error with this external storage." : "Hebo un error con esti almacenamientu esternu.", "We were unable to check the external storage {basename}" : "Nun fuimos a comprobar l'almacenamientu esternu «{basename}»", "Examine this faulty external storage configuration" : "Esaminar esta configuración defectuosa del almacenamientu esternu", diff --git a/apps/files_external/l10n/ast.json b/apps/files_external/l10n/ast.json index 12eb4fe5da6..3f3e39fda6a 100644 --- a/apps/files_external/l10n/ast.json +++ b/apps/files_external/l10n/ast.json @@ -112,9 +112,10 @@ "External storage support" : "Compatibilidá con almacenamientos esternos", "Adds basic external storage support" : "Amiesta compatibilidá básica p'almacenamientos esternos", "This application enables administrators to configure connections to external storage providers, such as FTP servers, S3 or SWIFT object stores, other Nextcloud servers, WebDAV servers, and more. Administration can choose which types of storage to enable and can mount these storage locations for an account, a group, or the entire system. Users will see a new folder appear in their root Nextcloud directory, which they can access and use like any other Nextcloud folder. External storage also allows people to share files stored in these external locations. In these cases, the credentials for the owner of the file are used when the recipient requests the file from external storage, thereby ensuring that the recipient can access the shared file.\n\nExternal storage can be configured using the GUI or at the command line. This second option provides the administration with more flexibility for configuring bulk external storage mounts and setting mount priorities. More information is available in the external storage GUI documentation and the external storage Configuration File documentation." : "Esta aplicación permite a l'alministración configurar les conexones a fornidores d'almacenamientu esternu, como sirvidores FTP, S3 o almacenes d'oxetos SWIFT, otros sirvidores Nextcloud, sirvidores WebDAV y munchos más. L'alministración pue escoyer los tipos d'almacenamientu qu'activa y pue montalos pa una cuenta, un grupu o tol sistema. Los usuarios van ver qu'apaez una carpeta neuva nel direutoriu raigañu de Nextcloud, al que puen acceder y usar como otra carpeta cualquiera. L'almacenamientu esternu tamién permite a les persones compartir ficheros atroxaos nestos llugares esternos. Nesos casos, úsense les credenciales del propietariu del ficheru cuando'l destinatariu solicita el ficheru del almacenamientu esternu, d'esti mou asegúrase de que'l destinatariu pue acceder al ficheru compartíu.\n\nPues configurar l'almacenamientu esternu cola GUI o la llinia de comandos. Esta postrer opción forne una alministración más flexible pa configurar grupos de montaxes d'almacenamientu esternu y configurar les prioridaes del montaxe. Tienes más información disponible na documentación de la GUI d'almacenamientos esternos y la documentación de los ficheros de configuración de los almacenamientos esternos.", - "Enter missing credentials" : "Instroduz les credenciales que falten", + "Submit" : "Unviar", "Unable to update this external storage config. {statusMessage}" : "Nun ye posible anovar la configuración d'esti almacenamientu esternu. {statusMessage}", "New configuration successfully saved" : "La configuración nueva guardóse correutamente", + "Enter missing credentials" : "Instroduz les credenciales que falten", "There was an error with this external storage." : "Hebo un error con esti almacenamientu esternu.", "We were unable to check the external storage {basename}" : "Nun fuimos a comprobar l'almacenamientu esternu «{basename}»", "Examine this faulty external storage configuration" : "Esaminar esta configuración defectuosa del almacenamientu esternu", diff --git a/apps/files_external/l10n/bg.js b/apps/files_external/l10n/bg.js index b407a3b8017..a05a350908e 100644 --- a/apps/files_external/l10n/bg.js +++ b/apps/files_external/l10n/bg.js @@ -103,6 +103,7 @@ OC.L10N.register( "External storage" : "Външно хранилище", "External storage support" : "Поддръжка на външно хранилище", "Adds basic external storage support" : "Добавя основна поддръжка за външно хранилище", + "Submit" : "Изпращане", "External mount error" : "Външна грешка при външно монтиране", "Storage type" : "Тип хранилище", "Unknown" : "Неизвестен", diff --git a/apps/files_external/l10n/bg.json b/apps/files_external/l10n/bg.json index 39f5fc0a94d..57c73ebd789 100644 --- a/apps/files_external/l10n/bg.json +++ b/apps/files_external/l10n/bg.json @@ -101,6 +101,7 @@ "External storage" : "Външно хранилище", "External storage support" : "Поддръжка на външно хранилище", "Adds basic external storage support" : "Добавя основна поддръжка за външно хранилище", + "Submit" : "Изпращане", "External mount error" : "Външна грешка при външно монтиране", "Storage type" : "Тип хранилище", "Unknown" : "Неизвестен", diff --git a/apps/files_external/l10n/ca.js b/apps/files_external/l10n/ca.js index bb356057755..cd535d546cf 100644 --- a/apps/files_external/l10n/ca.js +++ b/apps/files_external/l10n/ca.js @@ -114,9 +114,10 @@ OC.L10N.register( "External storage support" : "Compatibilitat amb emmagatzematge extern", "Adds basic external storage support" : "Afegeix compatibilitat bàsica amb emmagatzematge extern", "This application enables administrators to configure connections to external storage providers, such as FTP servers, S3 or SWIFT object stores, other Nextcloud servers, WebDAV servers, and more. Administration can choose which types of storage to enable and can mount these storage locations for an account, a group, or the entire system. Users will see a new folder appear in their root Nextcloud directory, which they can access and use like any other Nextcloud folder. External storage also allows people to share files stored in these external locations. In these cases, the credentials for the owner of the file are used when the recipient requests the file from external storage, thereby ensuring that the recipient can access the shared file.\n\nExternal storage can be configured using the GUI or at the command line. This second option provides the administration with more flexibility for configuring bulk external storage mounts and setting mount priorities. More information is available in the external storage GUI documentation and the external storage Configuration File documentation." : "Aquesta aplicació permet als administradors configurar les connexions amb proveïdors d'emmagatzematge externs, com ara servidors FTP, magatzems d'objectes S3 o SWIFT, altres servidors del Nextcloud, servidors WebDAV i molt més. L'administració pot triar quins tipus d'emmagatzematge permet i pot muntar aquestes ubicacions d'emmagatzematge per a un compte, un grup o tot el sistema. Els usuaris veuran que apareixerà una nova carpeta en la carpeta arrel del Nextcloud, que podran obrir i utilitzar com qualsevol altra carpeta del Nextcloud. L'emmagatzematge extern també permet a les persones compartir fitxers emmagatzemats en aquestes ubicacions externes. En aquests casos, s'utilitzen les credencials del propietari del fitxer quan el destinatari sol·licita el fitxer des d'un emmagatzematge extern, de manera que es garanteix que el destinatari pot accedir al fitxer compartit.\n\nL'emmagatzematge extern es pot configurar mitjançant la interfície gràfica d'usuari o des de la línia d'ordres. Aquesta segona opció proporciona a l'administració més flexibilitat per a configurar muntatges d'emmagatzematge extern en massa i establir prioritats de muntatge. Podeu obtenir més informació en la documentació de la GUI d'emmagatzematge extern i la documentació del fitxer de configuració de l'emmagatzematge extern.", - "Enter missing credentials" : "Introdueix les credencials que falten", + "Submit" : "Envia", "Unable to update this external storage config. {statusMessage}" : "No s'ha pogut actualitzar la configuració d'aquest emmagatzematge extern. {statusMessage}", "New configuration successfully saved" : "La configuració nova s'ha desat correctament", + "Enter missing credentials" : "Introdueix les credencials que falten", "There was an error with this external storage." : "S'ha produït un error amb aquest emmagatzematge extern.", "We were unable to check the external storage {basename}" : "No s'ha pogut comprovar l'emmagatzematge extern {basename}", "Examine this faulty external storage configuration" : "Examina la configuració d'aquest emmagatzematge extern amb errors", diff --git a/apps/files_external/l10n/ca.json b/apps/files_external/l10n/ca.json index 7ed6219297e..3cfa7c64c40 100644 --- a/apps/files_external/l10n/ca.json +++ b/apps/files_external/l10n/ca.json @@ -112,9 +112,10 @@ "External storage support" : "Compatibilitat amb emmagatzematge extern", "Adds basic external storage support" : "Afegeix compatibilitat bàsica amb emmagatzematge extern", "This application enables administrators to configure connections to external storage providers, such as FTP servers, S3 or SWIFT object stores, other Nextcloud servers, WebDAV servers, and more. Administration can choose which types of storage to enable and can mount these storage locations for an account, a group, or the entire system. Users will see a new folder appear in their root Nextcloud directory, which they can access and use like any other Nextcloud folder. External storage also allows people to share files stored in these external locations. In these cases, the credentials for the owner of the file are used when the recipient requests the file from external storage, thereby ensuring that the recipient can access the shared file.\n\nExternal storage can be configured using the GUI or at the command line. This second option provides the administration with more flexibility for configuring bulk external storage mounts and setting mount priorities. More information is available in the external storage GUI documentation and the external storage Configuration File documentation." : "Aquesta aplicació permet als administradors configurar les connexions amb proveïdors d'emmagatzematge externs, com ara servidors FTP, magatzems d'objectes S3 o SWIFT, altres servidors del Nextcloud, servidors WebDAV i molt més. L'administració pot triar quins tipus d'emmagatzematge permet i pot muntar aquestes ubicacions d'emmagatzematge per a un compte, un grup o tot el sistema. Els usuaris veuran que apareixerà una nova carpeta en la carpeta arrel del Nextcloud, que podran obrir i utilitzar com qualsevol altra carpeta del Nextcloud. L'emmagatzematge extern també permet a les persones compartir fitxers emmagatzemats en aquestes ubicacions externes. En aquests casos, s'utilitzen les credencials del propietari del fitxer quan el destinatari sol·licita el fitxer des d'un emmagatzematge extern, de manera que es garanteix que el destinatari pot accedir al fitxer compartit.\n\nL'emmagatzematge extern es pot configurar mitjançant la interfície gràfica d'usuari o des de la línia d'ordres. Aquesta segona opció proporciona a l'administració més flexibilitat per a configurar muntatges d'emmagatzematge extern en massa i establir prioritats de muntatge. Podeu obtenir més informació en la documentació de la GUI d'emmagatzematge extern i la documentació del fitxer de configuració de l'emmagatzematge extern.", - "Enter missing credentials" : "Introdueix les credencials que falten", + "Submit" : "Envia", "Unable to update this external storage config. {statusMessage}" : "No s'ha pogut actualitzar la configuració d'aquest emmagatzematge extern. {statusMessage}", "New configuration successfully saved" : "La configuració nova s'ha desat correctament", + "Enter missing credentials" : "Introdueix les credencials que falten", "There was an error with this external storage." : "S'ha produït un error amb aquest emmagatzematge extern.", "We were unable to check the external storage {basename}" : "No s'ha pogut comprovar l'emmagatzematge extern {basename}", "Examine this faulty external storage configuration" : "Examina la configuració d'aquest emmagatzematge extern amb errors", diff --git a/apps/files_external/l10n/cs.js b/apps/files_external/l10n/cs.js index 0c223fe275f..d6826399042 100644 --- a/apps/files_external/l10n/cs.js +++ b/apps/files_external/l10n/cs.js @@ -114,9 +114,10 @@ OC.L10N.register( "External storage support" : "Podpora pro externí úložiště", "Adds basic external storage support" : "Přidá základní podporu externí úložiště", "This application enables administrators to configure connections to external storage providers, such as FTP servers, S3 or SWIFT object stores, other Nextcloud servers, WebDAV servers, and more. Administration can choose which types of storage to enable and can mount these storage locations for an account, a group, or the entire system. Users will see a new folder appear in their root Nextcloud directory, which they can access and use like any other Nextcloud folder. External storage also allows people to share files stored in these external locations. In these cases, the credentials for the owner of the file are used when the recipient requests the file from external storage, thereby ensuring that the recipient can access the shared file.\n\nExternal storage can be configured using the GUI or at the command line. This second option provides the administration with more flexibility for configuring bulk external storage mounts and setting mount priorities. More information is available in the external storage GUI documentation and the external storage Configuration File documentation." : "Tato aplikace umožňuje správcům konfigurovat připojení k externím poskytovatelům úložišť, jako jsou servery FTP, úložiště objektů S3 nebo SWIFT, jiné servery Nextcloud, servery WebDAV a další. Správa může vybrat, které typy úložišť povolí, a může tato úložiště připojit pro účet, skupinu nebo celý systém. Uživatelům se v kořenovém adresáři služby Nextcloud objeví nová složka, ke které mohou přistupovat a používat ji jako jakoukoli jinou složku Nextcloudu. Externí úložiště také umožňuje lidem sdílet soubory uložené v těchto externích umístěních. V těchto případech se při žádosti příjemce o soubor z externího úložiště použijí přihlašovací údaje vlastníka souboru, čímž je zajištěno, že příjemce bude mít ke sdílenému souboru přístup.\n\nExterní úložiště lze konfigurovat pomocí grafického uživatelského rozhraní nebo příkazového řádku. Tato druhá možnost poskytuje správci větší flexibilitu při konfiguraci hromadného připojování externího úložiště a nastavení priorit připojení. Další informace jsou k dispozici v dokumentaci ke grafickému rozhraní externího úložiště a v dokumentaci ke konfiguračnímu souboru externího úložiště.", - "Enter missing credentials" : "Zadejte chybějící přihlašovací údaje", + "Submit" : "Odeslat", "Unable to update this external storage config. {statusMessage}" : "Nedaří se zaktualizovat nastavení pro externí úložiště. {statusMessage}", "New configuration successfully saved" : "Nové nastavení úspěšně uloženo", + "Enter missing credentials" : "Zadejte chybějící přihlašovací údaje", "There was an error with this external storage." : "U tohoto externího úložiště došlo k chybě.", "We were unable to check the external storage {basename}" : "Nepodařilo se zkontrolovat externí úložiště {basename}", "Examine this faulty external storage configuration" : "Prozkoumejte nastavení tohoto vadného externího úložiště", diff --git a/apps/files_external/l10n/cs.json b/apps/files_external/l10n/cs.json index 06c077ab241..fd41a4e8ea9 100644 --- a/apps/files_external/l10n/cs.json +++ b/apps/files_external/l10n/cs.json @@ -112,9 +112,10 @@ "External storage support" : "Podpora pro externí úložiště", "Adds basic external storage support" : "Přidá základní podporu externí úložiště", "This application enables administrators to configure connections to external storage providers, such as FTP servers, S3 or SWIFT object stores, other Nextcloud servers, WebDAV servers, and more. Administration can choose which types of storage to enable and can mount these storage locations for an account, a group, or the entire system. Users will see a new folder appear in their root Nextcloud directory, which they can access and use like any other Nextcloud folder. External storage also allows people to share files stored in these external locations. In these cases, the credentials for the owner of the file are used when the recipient requests the file from external storage, thereby ensuring that the recipient can access the shared file.\n\nExternal storage can be configured using the GUI or at the command line. This second option provides the administration with more flexibility for configuring bulk external storage mounts and setting mount priorities. More information is available in the external storage GUI documentation and the external storage Configuration File documentation." : "Tato aplikace umožňuje správcům konfigurovat připojení k externím poskytovatelům úložišť, jako jsou servery FTP, úložiště objektů S3 nebo SWIFT, jiné servery Nextcloud, servery WebDAV a další. Správa může vybrat, které typy úložišť povolí, a může tato úložiště připojit pro účet, skupinu nebo celý systém. Uživatelům se v kořenovém adresáři služby Nextcloud objeví nová složka, ke které mohou přistupovat a používat ji jako jakoukoli jinou složku Nextcloudu. Externí úložiště také umožňuje lidem sdílet soubory uložené v těchto externích umístěních. V těchto případech se při žádosti příjemce o soubor z externího úložiště použijí přihlašovací údaje vlastníka souboru, čímž je zajištěno, že příjemce bude mít ke sdílenému souboru přístup.\n\nExterní úložiště lze konfigurovat pomocí grafického uživatelského rozhraní nebo příkazového řádku. Tato druhá možnost poskytuje správci větší flexibilitu při konfiguraci hromadného připojování externího úložiště a nastavení priorit připojení. Další informace jsou k dispozici v dokumentaci ke grafickému rozhraní externího úložiště a v dokumentaci ke konfiguračnímu souboru externího úložiště.", - "Enter missing credentials" : "Zadejte chybějící přihlašovací údaje", + "Submit" : "Odeslat", "Unable to update this external storage config. {statusMessage}" : "Nedaří se zaktualizovat nastavení pro externí úložiště. {statusMessage}", "New configuration successfully saved" : "Nové nastavení úspěšně uloženo", + "Enter missing credentials" : "Zadejte chybějící přihlašovací údaje", "There was an error with this external storage." : "U tohoto externího úložiště došlo k chybě.", "We were unable to check the external storage {basename}" : "Nepodařilo se zkontrolovat externí úložiště {basename}", "Examine this faulty external storage configuration" : "Prozkoumejte nastavení tohoto vadného externího úložiště", diff --git a/apps/files_external/l10n/da.js b/apps/files_external/l10n/da.js index bcb713d19fc..3f52c13a7e6 100644 --- a/apps/files_external/l10n/da.js +++ b/apps/files_external/l10n/da.js @@ -114,9 +114,10 @@ OC.L10N.register( "External storage support" : "Eksternt lager undersøttelse", "Adds basic external storage support" : "Tilføjer grundlæggende ekstern lagerunderstøttelse", "This application enables administrators to configure connections to external storage providers, such as FTP servers, S3 or SWIFT object stores, other Nextcloud servers, WebDAV servers, and more. Administration can choose which types of storage to enable and can mount these storage locations for an account, a group, or the entire system. Users will see a new folder appear in their root Nextcloud directory, which they can access and use like any other Nextcloud folder. External storage also allows people to share files stored in these external locations. In these cases, the credentials for the owner of the file are used when the recipient requests the file from external storage, thereby ensuring that the recipient can access the shared file.\n\nExternal storage can be configured using the GUI or at the command line. This second option provides the administration with more flexibility for configuring bulk external storage mounts and setting mount priorities. More information is available in the external storage GUI documentation and the external storage Configuration File documentation." : "Denne applikation gør det muligt for administratorer at konfigurere forbindelser til eksterne lagerudbydere, såsom FTP-servere, S3- eller SWIFT-objektlagre, andre Nextcloud-servere, WebDAV-servere og mere. Administration kan vælge, hvilke typer lager der skal aktiveres og kan montere disse lagerplaceringer for en konto, en gruppe eller hele systemet. Brugere vil se en ny mappe vises i deres rod-Nextcloud-mappe, som de kan få adgang til og bruge som enhver anden Nextcloud-mappe. Ekstern lagring giver også folk mulighed for at dele filer gemt på disse eksterne steder. I disse tilfælde bruges legitimationsoplysningerne for ejeren af filen, når modtageren anmoder om filen fra eksternt lager, hvorved det sikres, at modtageren kan få adgang til den delte fil.\n\nEksternt lager kan konfigureres ved hjælp af GUI eller på kommandolinjen. Denne anden mulighed giver administrationen mere fleksibilitet til at konfigurere bulk eksterne lagermonteringer og indstilling af monteringsprioriteter. Flere oplysninger er tilgængelige i dokumentationen til eksternt lager GUI og dokumentationen til ekstern lagerkonfigurationsfil.", - "Enter missing credentials" : "Indtast manglende oplysninger", + "Submit" : "Tilføj", "Unable to update this external storage config. {statusMessage}" : "Er ikke i stand til at opdaterer konfigurationen af dette eksterne lager. {statusMessage}", "New configuration successfully saved" : "Den nye konfiguration er gemt", + "Enter missing credentials" : "Indtast manglende oplysninger", "There was an error with this external storage." : "Der er en fejl med dette eksterne lager.", "We were unable to check the external storage {basename}" : "Det var ikke muligt at kontrollerer det eksterne lager {basename}", "Examine this faulty external storage configuration" : "Gennemgå fejl konfiguration af eksternt lager ", diff --git a/apps/files_external/l10n/da.json b/apps/files_external/l10n/da.json index f41e2e01900..e94a2248f39 100644 --- a/apps/files_external/l10n/da.json +++ b/apps/files_external/l10n/da.json @@ -112,9 +112,10 @@ "External storage support" : "Eksternt lager undersøttelse", "Adds basic external storage support" : "Tilføjer grundlæggende ekstern lagerunderstøttelse", "This application enables administrators to configure connections to external storage providers, such as FTP servers, S3 or SWIFT object stores, other Nextcloud servers, WebDAV servers, and more. Administration can choose which types of storage to enable and can mount these storage locations for an account, a group, or the entire system. Users will see a new folder appear in their root Nextcloud directory, which they can access and use like any other Nextcloud folder. External storage also allows people to share files stored in these external locations. In these cases, the credentials for the owner of the file are used when the recipient requests the file from external storage, thereby ensuring that the recipient can access the shared file.\n\nExternal storage can be configured using the GUI or at the command line. This second option provides the administration with more flexibility for configuring bulk external storage mounts and setting mount priorities. More information is available in the external storage GUI documentation and the external storage Configuration File documentation." : "Denne applikation gør det muligt for administratorer at konfigurere forbindelser til eksterne lagerudbydere, såsom FTP-servere, S3- eller SWIFT-objektlagre, andre Nextcloud-servere, WebDAV-servere og mere. Administration kan vælge, hvilke typer lager der skal aktiveres og kan montere disse lagerplaceringer for en konto, en gruppe eller hele systemet. Brugere vil se en ny mappe vises i deres rod-Nextcloud-mappe, som de kan få adgang til og bruge som enhver anden Nextcloud-mappe. Ekstern lagring giver også folk mulighed for at dele filer gemt på disse eksterne steder. I disse tilfælde bruges legitimationsoplysningerne for ejeren af filen, når modtageren anmoder om filen fra eksternt lager, hvorved det sikres, at modtageren kan få adgang til den delte fil.\n\nEksternt lager kan konfigureres ved hjælp af GUI eller på kommandolinjen. Denne anden mulighed giver administrationen mere fleksibilitet til at konfigurere bulk eksterne lagermonteringer og indstilling af monteringsprioriteter. Flere oplysninger er tilgængelige i dokumentationen til eksternt lager GUI og dokumentationen til ekstern lagerkonfigurationsfil.", - "Enter missing credentials" : "Indtast manglende oplysninger", + "Submit" : "Tilføj", "Unable to update this external storage config. {statusMessage}" : "Er ikke i stand til at opdaterer konfigurationen af dette eksterne lager. {statusMessage}", "New configuration successfully saved" : "Den nye konfiguration er gemt", + "Enter missing credentials" : "Indtast manglende oplysninger", "There was an error with this external storage." : "Der er en fejl med dette eksterne lager.", "We were unable to check the external storage {basename}" : "Det var ikke muligt at kontrollerer det eksterne lager {basename}", "Examine this faulty external storage configuration" : "Gennemgå fejl konfiguration af eksternt lager ", diff --git a/apps/files_external/l10n/de.js b/apps/files_external/l10n/de.js index 7f1bf401f82..685130eeb41 100644 --- a/apps/files_external/l10n/de.js +++ b/apps/files_external/l10n/de.js @@ -18,6 +18,7 @@ OC.L10N.register( "Once every direct access" : "Einmal bei jedem Direktzugriff", "Read only" : "Schreibgeschützt", "Disconnect" : "Trennen", + "Unknown backend: {backendName}" : "Unbekanntes Backend: {backendName}", "Admin defined" : "Vom Administrator festgelegt", "Automatic status checking is disabled due to the large number of configured storages, click to check status" : "Die automatische Püfung des Status ist aufgrund der großen Anzahl konfigurierter Speicher deaktiviert, klicke hier, um den Status zu prüfen", "Are you sure you want to disconnect this external storage? It will make the storage unavailable in Nextcloud and will lead to a deletion of these files and folders on any sync client that is currently connected but will not delete any files and folders on the external storage itself." : "Möchtest du diesen externen Speicher wirklich trennen? Der Speicher ist danach in der Nextcloud nicht mehr verfügbar, was zu einer Löschung dieser Dateien und Ordner auf allen Sync-Clients, die verbunden sind, führt. Auf dem externen Speicher selbst werden keine Dateien und Ordner gelöscht.", @@ -114,9 +115,10 @@ OC.L10N.register( "External storage support" : "Unterstützung für externen Speicher", "Adds basic external storage support" : "Fügt grundlegende Unterstützung für externen Speicher hinzu", "This application enables administrators to configure connections to external storage providers, such as FTP servers, S3 or SWIFT object stores, other Nextcloud servers, WebDAV servers, and more. Administration can choose which types of storage to enable and can mount these storage locations for an account, a group, or the entire system. Users will see a new folder appear in their root Nextcloud directory, which they can access and use like any other Nextcloud folder. External storage also allows people to share files stored in these external locations. In these cases, the credentials for the owner of the file are used when the recipient requests the file from external storage, thereby ensuring that the recipient can access the shared file.\n\nExternal storage can be configured using the GUI or at the command line. This second option provides the administration with more flexibility for configuring bulk external storage mounts and setting mount priorities. More information is available in the external storage GUI documentation and the external storage Configuration File documentation." : "Diese Anwendung ermöglicht es der Administration, Verbindungen zu externen Speicheranbietern wie FTP-Servern, S3- oder SWIFT-Objektspeichern, anderen Nextcloud-Servern, WebDAV-Servern und weiteren zu konfigurieren. Die Administration kann auswählen, welche Arten von Speicherorten aktiviert werden sollen, und kann diese Speicherorte für ein Konto, eine Gruppe oder das gesamte System einbinden. Nutzende sehen einen neuen Ordner in ihrem Nextcloud-Root-Verzeichnis, auf den sie wie auf jeden anderen Nextcloud-Ordner zugreifen und ihn verwenden können. Externer Speicher ermöglicht es Personen auch, Dateien, die in diesen externen Speicherorten gespeichert sind, freizugeben. In diesen Fällen werden die Anmeldeinformationen des Dateibesitzers verwendet, wenn der Empfänger die Datei aus dem externen Speicher anfordert, um sicherzustellen, dass der Empfänger auf die freigegebene Datei zugreifen kann.\n\nExterner Speicher kann über die grafische Benutzeroberfläche oder über die Befehlszeile konfiguriert werden. Diese zweite Option bietet der Administration mehr Flexibilität bei der Konfiguration von Massenspeicher-Einhängepunkten und der Festlegung von Einhängeprioritäten. Weitere Informationen finden Sie in der Dokumentation zur externen Speicher-GUI und der Dokumentation zur externen Speicher-Konfigurationsdatei.", - "Enter missing credentials" : "Fehlende Anmeldeinformationen eingeben", + "Submit" : "Übermitteln", "Unable to update this external storage config. {statusMessage}" : "Diese externe Speicherkonfiguration konnte nicht aktualisiert werden. {statusMessage}", "New configuration successfully saved" : "Neue Konfiguration gespeichert", + "Enter missing credentials" : "Fehlende Anmeldeinformationen eingeben", "There was an error with this external storage." : "Mit diesem externen Speicher ist ein Fehler aufgetreten.", "We were unable to check the external storage {basename}" : "Der externe Speicher {basename} konnte nicht geprüft werden", "Examine this faulty external storage configuration" : "Prüfe diese fehlerhafte externe Speicherkonfiguration", diff --git a/apps/files_external/l10n/de.json b/apps/files_external/l10n/de.json index 2a13c1e6ea6..4752d6af570 100644 --- a/apps/files_external/l10n/de.json +++ b/apps/files_external/l10n/de.json @@ -16,6 +16,7 @@ "Once every direct access" : "Einmal bei jedem Direktzugriff", "Read only" : "Schreibgeschützt", "Disconnect" : "Trennen", + "Unknown backend: {backendName}" : "Unbekanntes Backend: {backendName}", "Admin defined" : "Vom Administrator festgelegt", "Automatic status checking is disabled due to the large number of configured storages, click to check status" : "Die automatische Püfung des Status ist aufgrund der großen Anzahl konfigurierter Speicher deaktiviert, klicke hier, um den Status zu prüfen", "Are you sure you want to disconnect this external storage? It will make the storage unavailable in Nextcloud and will lead to a deletion of these files and folders on any sync client that is currently connected but will not delete any files and folders on the external storage itself." : "Möchtest du diesen externen Speicher wirklich trennen? Der Speicher ist danach in der Nextcloud nicht mehr verfügbar, was zu einer Löschung dieser Dateien und Ordner auf allen Sync-Clients, die verbunden sind, führt. Auf dem externen Speicher selbst werden keine Dateien und Ordner gelöscht.", @@ -112,9 +113,10 @@ "External storage support" : "Unterstützung für externen Speicher", "Adds basic external storage support" : "Fügt grundlegende Unterstützung für externen Speicher hinzu", "This application enables administrators to configure connections to external storage providers, such as FTP servers, S3 or SWIFT object stores, other Nextcloud servers, WebDAV servers, and more. Administration can choose which types of storage to enable and can mount these storage locations for an account, a group, or the entire system. Users will see a new folder appear in their root Nextcloud directory, which they can access and use like any other Nextcloud folder. External storage also allows people to share files stored in these external locations. In these cases, the credentials for the owner of the file are used when the recipient requests the file from external storage, thereby ensuring that the recipient can access the shared file.\n\nExternal storage can be configured using the GUI or at the command line. This second option provides the administration with more flexibility for configuring bulk external storage mounts and setting mount priorities. More information is available in the external storage GUI documentation and the external storage Configuration File documentation." : "Diese Anwendung ermöglicht es der Administration, Verbindungen zu externen Speicheranbietern wie FTP-Servern, S3- oder SWIFT-Objektspeichern, anderen Nextcloud-Servern, WebDAV-Servern und weiteren zu konfigurieren. Die Administration kann auswählen, welche Arten von Speicherorten aktiviert werden sollen, und kann diese Speicherorte für ein Konto, eine Gruppe oder das gesamte System einbinden. Nutzende sehen einen neuen Ordner in ihrem Nextcloud-Root-Verzeichnis, auf den sie wie auf jeden anderen Nextcloud-Ordner zugreifen und ihn verwenden können. Externer Speicher ermöglicht es Personen auch, Dateien, die in diesen externen Speicherorten gespeichert sind, freizugeben. In diesen Fällen werden die Anmeldeinformationen des Dateibesitzers verwendet, wenn der Empfänger die Datei aus dem externen Speicher anfordert, um sicherzustellen, dass der Empfänger auf die freigegebene Datei zugreifen kann.\n\nExterner Speicher kann über die grafische Benutzeroberfläche oder über die Befehlszeile konfiguriert werden. Diese zweite Option bietet der Administration mehr Flexibilität bei der Konfiguration von Massenspeicher-Einhängepunkten und der Festlegung von Einhängeprioritäten. Weitere Informationen finden Sie in der Dokumentation zur externen Speicher-GUI und der Dokumentation zur externen Speicher-Konfigurationsdatei.", - "Enter missing credentials" : "Fehlende Anmeldeinformationen eingeben", + "Submit" : "Übermitteln", "Unable to update this external storage config. {statusMessage}" : "Diese externe Speicherkonfiguration konnte nicht aktualisiert werden. {statusMessage}", "New configuration successfully saved" : "Neue Konfiguration gespeichert", + "Enter missing credentials" : "Fehlende Anmeldeinformationen eingeben", "There was an error with this external storage." : "Mit diesem externen Speicher ist ein Fehler aufgetreten.", "We were unable to check the external storage {basename}" : "Der externe Speicher {basename} konnte nicht geprüft werden", "Examine this faulty external storage configuration" : "Prüfe diese fehlerhafte externe Speicherkonfiguration", diff --git a/apps/files_external/l10n/de_DE.js b/apps/files_external/l10n/de_DE.js index a4c696845b1..ddf3cfbba1e 100644 --- a/apps/files_external/l10n/de_DE.js +++ b/apps/files_external/l10n/de_DE.js @@ -115,9 +115,14 @@ OC.L10N.register( "External storage support" : "Unterstützung für externen Speicher", "Adds basic external storage support" : "Fügt grundlegende Unterstützung für externen Speicher hinzu", "This application enables administrators to configure connections to external storage providers, such as FTP servers, S3 or SWIFT object stores, other Nextcloud servers, WebDAV servers, and more. Administration can choose which types of storage to enable and can mount these storage locations for an account, a group, or the entire system. Users will see a new folder appear in their root Nextcloud directory, which they can access and use like any other Nextcloud folder. External storage also allows people to share files stored in these external locations. In these cases, the credentials for the owner of the file are used when the recipient requests the file from external storage, thereby ensuring that the recipient can access the shared file.\n\nExternal storage can be configured using the GUI or at the command line. This second option provides the administration with more flexibility for configuring bulk external storage mounts and setting mount priorities. More information is available in the external storage GUI documentation and the external storage Configuration File documentation." : "Diese Anwendung ermöglicht es Administratoren, Verbindungen zu externen Speicheranbietern wie FTP-Servern, S3- oder SWIFT-Objektspeichern, anderen Nextcloud-Servern, WebDAV-Servern und weiteren zu konfigurieren. Die Administration kann auswählen, welche Arten von Speicherorten aktiviert werden sollen, und kann diese Speicherorte für ein Konto, eine Gruppe oder das gesamte System einbinden. Benutzer sehen einen neuen Ordner in ihrem Nextcloud-Root-Verzeichnis, auf den sie wie auf jeden anderen Nextcloud-Ordner zugreifen und ihn verwenden können. Externer Speicher ermöglicht es Personen auch, Dateien, die in diesen externen Speicherorten gespeichert sind, freizugeben. In diesen Fällen werden die Anmeldeinformationen des Dateibesitzers verwendet, wenn der Empfänger die Datei aus dem externen Speicher anfordert, um sicherzustellen, dass der Empfänger auf die freigegebene Datei zugreifen kann.\n\nExterner Speicher kann über die grafische Benutzeroberfläche oder über die Befehlszeile konfiguriert werden. Diese zweite Option bietet der Administration mehr Flexibilität bei der Konfiguration von Massenspeicher-Einhängepunkten und der Festlegung von Einhängeprioritäten. Weitere Informationen finden Sie in der Dokumentation zur externen Speicher-GUI und der Dokumentation zur externen Speicher-Konfigurationsdatei.", - "Enter missing credentials" : "Fehlende Anmeldeinformationen eingeben", + "Storage credentials" : "Speicheranmeldeinformationen", + "To access the storage, you need to provide the authentification informations." : "Um auf den Speicher zuzugreifen, müssen Sie die Authentifizierungsinformationen eingeben.", + "Enter the storage login" : "Speicher-Login eingeben", + "Enter the storage password" : "Speicher-Passwort eingeben", + "Submit" : "Übermitteln", "Unable to update this external storage config. {statusMessage}" : "Diese externe Speicherkonfiguration konnte nicht aktualisiert werden. {statusMessage}", "New configuration successfully saved" : "Neue Konfiguration gespeichert", + "Enter missing credentials" : "Fehlende Anmeldeinformationen eingeben", "There was an error with this external storage." : "Mit diesem externen Speicher ist ein Fehler aufgetreten.", "We were unable to check the external storage {basename}" : "Der externe Speicher {basename} konnte nicht geprüft werden", "Examine this faulty external storage configuration" : "Prüfen Sie diese fehlerhafte externe Speicherkonfiguration", diff --git a/apps/files_external/l10n/de_DE.json b/apps/files_external/l10n/de_DE.json index 3241cf44a62..bc3b8ed657d 100644 --- a/apps/files_external/l10n/de_DE.json +++ b/apps/files_external/l10n/de_DE.json @@ -113,9 +113,14 @@ "External storage support" : "Unterstützung für externen Speicher", "Adds basic external storage support" : "Fügt grundlegende Unterstützung für externen Speicher hinzu", "This application enables administrators to configure connections to external storage providers, such as FTP servers, S3 or SWIFT object stores, other Nextcloud servers, WebDAV servers, and more. Administration can choose which types of storage to enable and can mount these storage locations for an account, a group, or the entire system. Users will see a new folder appear in their root Nextcloud directory, which they can access and use like any other Nextcloud folder. External storage also allows people to share files stored in these external locations. In these cases, the credentials for the owner of the file are used when the recipient requests the file from external storage, thereby ensuring that the recipient can access the shared file.\n\nExternal storage can be configured using the GUI or at the command line. This second option provides the administration with more flexibility for configuring bulk external storage mounts and setting mount priorities. More information is available in the external storage GUI documentation and the external storage Configuration File documentation." : "Diese Anwendung ermöglicht es Administratoren, Verbindungen zu externen Speicheranbietern wie FTP-Servern, S3- oder SWIFT-Objektspeichern, anderen Nextcloud-Servern, WebDAV-Servern und weiteren zu konfigurieren. Die Administration kann auswählen, welche Arten von Speicherorten aktiviert werden sollen, und kann diese Speicherorte für ein Konto, eine Gruppe oder das gesamte System einbinden. Benutzer sehen einen neuen Ordner in ihrem Nextcloud-Root-Verzeichnis, auf den sie wie auf jeden anderen Nextcloud-Ordner zugreifen und ihn verwenden können. Externer Speicher ermöglicht es Personen auch, Dateien, die in diesen externen Speicherorten gespeichert sind, freizugeben. In diesen Fällen werden die Anmeldeinformationen des Dateibesitzers verwendet, wenn der Empfänger die Datei aus dem externen Speicher anfordert, um sicherzustellen, dass der Empfänger auf die freigegebene Datei zugreifen kann.\n\nExterner Speicher kann über die grafische Benutzeroberfläche oder über die Befehlszeile konfiguriert werden. Diese zweite Option bietet der Administration mehr Flexibilität bei der Konfiguration von Massenspeicher-Einhängepunkten und der Festlegung von Einhängeprioritäten. Weitere Informationen finden Sie in der Dokumentation zur externen Speicher-GUI und der Dokumentation zur externen Speicher-Konfigurationsdatei.", - "Enter missing credentials" : "Fehlende Anmeldeinformationen eingeben", + "Storage credentials" : "Speicheranmeldeinformationen", + "To access the storage, you need to provide the authentification informations." : "Um auf den Speicher zuzugreifen, müssen Sie die Authentifizierungsinformationen eingeben.", + "Enter the storage login" : "Speicher-Login eingeben", + "Enter the storage password" : "Speicher-Passwort eingeben", + "Submit" : "Übermitteln", "Unable to update this external storage config. {statusMessage}" : "Diese externe Speicherkonfiguration konnte nicht aktualisiert werden. {statusMessage}", "New configuration successfully saved" : "Neue Konfiguration gespeichert", + "Enter missing credentials" : "Fehlende Anmeldeinformationen eingeben", "There was an error with this external storage." : "Mit diesem externen Speicher ist ein Fehler aufgetreten.", "We were unable to check the external storage {basename}" : "Der externe Speicher {basename} konnte nicht geprüft werden", "Examine this faulty external storage configuration" : "Prüfen Sie diese fehlerhafte externe Speicherkonfiguration", diff --git a/apps/files_external/l10n/el.js b/apps/files_external/l10n/el.js index 744741da991..eeb3af1347c 100644 --- a/apps/files_external/l10n/el.js +++ b/apps/files_external/l10n/el.js @@ -95,6 +95,7 @@ OC.L10N.register( "External storage" : "Εξωτερικός αποθηκευτικός χώρος", "External storage support" : "Υποστήριξη εξωτερικού αποθηκευτικού χώρου", "Adds basic external storage support" : "Προσθέτει βασική υποστήριξη εξωτερικού αποθηκευτικού χώρου", + "Submit" : "Υποβολή", "Open in Files" : "Άνοιγμα στα Αρχεία", "External mount error" : "Σφάλμα εξωτερικής προσάρτησης", "Storage type" : "Τύπος αποθηκευτικού χώρου", diff --git a/apps/files_external/l10n/el.json b/apps/files_external/l10n/el.json index b6cdd92a56c..f2b83674276 100644 --- a/apps/files_external/l10n/el.json +++ b/apps/files_external/l10n/el.json @@ -93,6 +93,7 @@ "External storage" : "Εξωτερικός αποθηκευτικός χώρος", "External storage support" : "Υποστήριξη εξωτερικού αποθηκευτικού χώρου", "Adds basic external storage support" : "Προσθέτει βασική υποστήριξη εξωτερικού αποθηκευτικού χώρου", + "Submit" : "Υποβολή", "Open in Files" : "Άνοιγμα στα Αρχεία", "External mount error" : "Σφάλμα εξωτερικής προσάρτησης", "Storage type" : "Τύπος αποθηκευτικού χώρου", diff --git a/apps/files_external/l10n/en_GB.js b/apps/files_external/l10n/en_GB.js index e4cab2fa7f2..d3f96e53be8 100644 --- a/apps/files_external/l10n/en_GB.js +++ b/apps/files_external/l10n/en_GB.js @@ -115,9 +115,10 @@ OC.L10N.register( "External storage support" : "External storage support", "Adds basic external storage support" : "Adds basic external storage support", "This application enables administrators to configure connections to external storage providers, such as FTP servers, S3 or SWIFT object stores, other Nextcloud servers, WebDAV servers, and more. Administration can choose which types of storage to enable and can mount these storage locations for an account, a group, or the entire system. Users will see a new folder appear in their root Nextcloud directory, which they can access and use like any other Nextcloud folder. External storage also allows people to share files stored in these external locations. In these cases, the credentials for the owner of the file are used when the recipient requests the file from external storage, thereby ensuring that the recipient can access the shared file.\n\nExternal storage can be configured using the GUI or at the command line. This second option provides the administration with more flexibility for configuring bulk external storage mounts and setting mount priorities. More information is available in the external storage GUI documentation and the external storage Configuration File documentation." : "This application enables administrators to configure connections to external storage providers, such as FTP servers, S3 or SWIFT object stores, other Nextcloud servers, WebDAV servers, and more. Administration can choose which types of storage to enable and can mount these storage locations for an account, a group, or the entire system. Users will see a new folder appear in their root Nextcloud directory, which they can access and use like any other Nextcloud folder. External storage also allows people to share files stored in these external locations. In these cases, the credentials for the owner of the file are used when the recipient requests the file from external storage, thereby ensuring that the recipient can access the shared file.\n\nExternal storage can be configured using the GUI or at the command line. This second option provides the administration with more flexibility for configuring bulk external storage mounts and setting mount priorities. More information is available in the external storage GUI documentation and the external storage Configuration File documentation.", - "Enter missing credentials" : "Enter missing credentials", + "Submit" : "Submit", "Unable to update this external storage config. {statusMessage}" : "Unable to update this external storage config. {statusMessage}", "New configuration successfully saved" : "New configuration successfully saved", + "Enter missing credentials" : "Enter missing credentials", "There was an error with this external storage." : "There was an error with this external storage.", "We were unable to check the external storage {basename}" : "We were unable to check the external storage {basename}", "Examine this faulty external storage configuration" : "Examine this faulty external storage configuration", diff --git a/apps/files_external/l10n/en_GB.json b/apps/files_external/l10n/en_GB.json index f4862ba8a47..257373d31ef 100644 --- a/apps/files_external/l10n/en_GB.json +++ b/apps/files_external/l10n/en_GB.json @@ -113,9 +113,10 @@ "External storage support" : "External storage support", "Adds basic external storage support" : "Adds basic external storage support", "This application enables administrators to configure connections to external storage providers, such as FTP servers, S3 or SWIFT object stores, other Nextcloud servers, WebDAV servers, and more. Administration can choose which types of storage to enable and can mount these storage locations for an account, a group, or the entire system. Users will see a new folder appear in their root Nextcloud directory, which they can access and use like any other Nextcloud folder. External storage also allows people to share files stored in these external locations. In these cases, the credentials for the owner of the file are used when the recipient requests the file from external storage, thereby ensuring that the recipient can access the shared file.\n\nExternal storage can be configured using the GUI or at the command line. This second option provides the administration with more flexibility for configuring bulk external storage mounts and setting mount priorities. More information is available in the external storage GUI documentation and the external storage Configuration File documentation." : "This application enables administrators to configure connections to external storage providers, such as FTP servers, S3 or SWIFT object stores, other Nextcloud servers, WebDAV servers, and more. Administration can choose which types of storage to enable and can mount these storage locations for an account, a group, or the entire system. Users will see a new folder appear in their root Nextcloud directory, which they can access and use like any other Nextcloud folder. External storage also allows people to share files stored in these external locations. In these cases, the credentials for the owner of the file are used when the recipient requests the file from external storage, thereby ensuring that the recipient can access the shared file.\n\nExternal storage can be configured using the GUI or at the command line. This second option provides the administration with more flexibility for configuring bulk external storage mounts and setting mount priorities. More information is available in the external storage GUI documentation and the external storage Configuration File documentation.", - "Enter missing credentials" : "Enter missing credentials", + "Submit" : "Submit", "Unable to update this external storage config. {statusMessage}" : "Unable to update this external storage config. {statusMessage}", "New configuration successfully saved" : "New configuration successfully saved", + "Enter missing credentials" : "Enter missing credentials", "There was an error with this external storage." : "There was an error with this external storage.", "We were unable to check the external storage {basename}" : "We were unable to check the external storage {basename}", "Examine this faulty external storage configuration" : "Examine this faulty external storage configuration", diff --git a/apps/files_external/l10n/eo.js b/apps/files_external/l10n/eo.js index d22f0170518..1c7487d051b 100644 --- a/apps/files_external/l10n/eo.js +++ b/apps/files_external/l10n/eo.js @@ -94,6 +94,7 @@ OC.L10N.register( "External storage" : "Ekstera konservejo", "External storage support" : "Subteno de ekstera konservejo", "Adds basic external storage support" : "Aldonas bazan subtenon por ekstera konservejo", + "Submit" : "Sendi", "External mount error" : "Eraro de surmetingo ekstera", "Storage type" : "Konserveja tipo", "Unknown" : "Nekonata", diff --git a/apps/files_external/l10n/eo.json b/apps/files_external/l10n/eo.json index b6418e6b817..4614cd85645 100644 --- a/apps/files_external/l10n/eo.json +++ b/apps/files_external/l10n/eo.json @@ -92,6 +92,7 @@ "External storage" : "Ekstera konservejo", "External storage support" : "Subteno de ekstera konservejo", "Adds basic external storage support" : "Aldonas bazan subtenon por ekstera konservejo", + "Submit" : "Sendi", "External mount error" : "Eraro de surmetingo ekstera", "Storage type" : "Konserveja tipo", "Unknown" : "Nekonata", diff --git a/apps/files_external/l10n/es.js b/apps/files_external/l10n/es.js index 18047c78f18..58ab68ca189 100644 --- a/apps/files_external/l10n/es.js +++ b/apps/files_external/l10n/es.js @@ -114,9 +114,10 @@ OC.L10N.register( "External storage support" : "Soporte de almacenamiento externo", "Adds basic external storage support" : "Añade soporte básico de almacenamiento externo", "This application enables administrators to configure connections to external storage providers, such as FTP servers, S3 or SWIFT object stores, other Nextcloud servers, WebDAV servers, and more. Administration can choose which types of storage to enable and can mount these storage locations for an account, a group, or the entire system. Users will see a new folder appear in their root Nextcloud directory, which they can access and use like any other Nextcloud folder. External storage also allows people to share files stored in these external locations. In these cases, the credentials for the owner of the file are used when the recipient requests the file from external storage, thereby ensuring that the recipient can access the shared file.\n\nExternal storage can be configured using the GUI or at the command line. This second option provides the administration with more flexibility for configuring bulk external storage mounts and setting mount priorities. More information is available in the external storage GUI documentation and the external storage Configuration File documentation." : "Esta aplicación permite aos administradores configurar conexións con provedores de almacenamento externos, como servidores FTP, almacéns de obxectos S3 ou SWIFT, outros servidores Nextcloud, servidores WebDAV e moito máis. A administración pode escoller que tipos de almacenamento activar e pode montar estas localizacións de almacenamento para unha conta, un grupo ou todo o sistema. Os usuarios verán aparecer un novo cartafol no seu directorio raíz de Nextcloud, ao que poden acceder e usar como calquera outro cartafol de Nextcloud. O almacenamento externo tamén permite que as persoas compartan ficheiros almacenados nestas localizacións externas. Nestes casos, as credenciais do propietario do ficheiro utilízanse cando o destinatario solicita o ficheiro desde o almacenamento externo, garantindo así que o destinatario poida acceder ao ficheiro compartido.\n\nO almacenamento externo pódese configurar mediante a GUI ou na liña de comandos. Esta segunda opción proporciona á administración máis flexibilidade para configurar montaxes de almacenamento externo masivo e establecer prioridades de montaxe. Hai máis información dispoñible na documentación da GUI de almacenamento externo e na documentación do ficheiro de configuración de almacenamento externo.", - "Enter missing credentials" : "Introduzca las credenciales requeridas", + "Submit" : "Enviar", "Unable to update this external storage config. {statusMessage}" : "No fue posible actualizar la configuración de este almacenamiento externo {statusMessage}", "New configuration successfully saved" : "La nueva configuración se guardó exitósamente", + "Enter missing credentials" : "Introduzca las credenciales requeridas", "There was an error with this external storage." : "Se presentó un problema con este almacenamiento externo.", "We were unable to check the external storage {basename}" : "No nos fue posible chequear el almacenamiento externo {basename}", "Examine this faulty external storage configuration" : "Examinar la configuración de este almacenamiento externo con fallas", diff --git a/apps/files_external/l10n/es.json b/apps/files_external/l10n/es.json index e21dafee3d9..16007c739a9 100644 --- a/apps/files_external/l10n/es.json +++ b/apps/files_external/l10n/es.json @@ -112,9 +112,10 @@ "External storage support" : "Soporte de almacenamiento externo", "Adds basic external storage support" : "Añade soporte básico de almacenamiento externo", "This application enables administrators to configure connections to external storage providers, such as FTP servers, S3 or SWIFT object stores, other Nextcloud servers, WebDAV servers, and more. Administration can choose which types of storage to enable and can mount these storage locations for an account, a group, or the entire system. Users will see a new folder appear in their root Nextcloud directory, which they can access and use like any other Nextcloud folder. External storage also allows people to share files stored in these external locations. In these cases, the credentials for the owner of the file are used when the recipient requests the file from external storage, thereby ensuring that the recipient can access the shared file.\n\nExternal storage can be configured using the GUI or at the command line. This second option provides the administration with more flexibility for configuring bulk external storage mounts and setting mount priorities. More information is available in the external storage GUI documentation and the external storage Configuration File documentation." : "Esta aplicación permite aos administradores configurar conexións con provedores de almacenamento externos, como servidores FTP, almacéns de obxectos S3 ou SWIFT, outros servidores Nextcloud, servidores WebDAV e moito máis. A administración pode escoller que tipos de almacenamento activar e pode montar estas localizacións de almacenamento para unha conta, un grupo ou todo o sistema. Os usuarios verán aparecer un novo cartafol no seu directorio raíz de Nextcloud, ao que poden acceder e usar como calquera outro cartafol de Nextcloud. O almacenamento externo tamén permite que as persoas compartan ficheiros almacenados nestas localizacións externas. Nestes casos, as credenciais do propietario do ficheiro utilízanse cando o destinatario solicita o ficheiro desde o almacenamento externo, garantindo así que o destinatario poida acceder ao ficheiro compartido.\n\nO almacenamento externo pódese configurar mediante a GUI ou na liña de comandos. Esta segunda opción proporciona á administración máis flexibilidade para configurar montaxes de almacenamento externo masivo e establecer prioridades de montaxe. Hai máis información dispoñible na documentación da GUI de almacenamento externo e na documentación do ficheiro de configuración de almacenamento externo.", - "Enter missing credentials" : "Introduzca las credenciales requeridas", + "Submit" : "Enviar", "Unable to update this external storage config. {statusMessage}" : "No fue posible actualizar la configuración de este almacenamiento externo {statusMessage}", "New configuration successfully saved" : "La nueva configuración se guardó exitósamente", + "Enter missing credentials" : "Introduzca las credenciales requeridas", "There was an error with this external storage." : "Se presentó un problema con este almacenamiento externo.", "We were unable to check the external storage {basename}" : "No nos fue posible chequear el almacenamiento externo {basename}", "Examine this faulty external storage configuration" : "Examinar la configuración de este almacenamiento externo con fallas", diff --git a/apps/files_external/l10n/es_419.js b/apps/files_external/l10n/es_419.js index f6370bc6b70..80ee7de0e0f 100644 --- a/apps/files_external/l10n/es_419.js +++ b/apps/files_external/l10n/es_419.js @@ -81,6 +81,7 @@ OC.L10N.register( "The cURL support in PHP is not enabled or installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "El soporte para cURL en PHP no se encuentra habilitado o instalado. El montaje de %s no es posible. Por favor solicita a tu administador su instalación. ", "The FTP support in PHP is not enabled or installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "El soporte para FTP en PHP no se encuentra habilitado o instalado. El montaje de %s no es posible. Por favor solicita a tu administador su instalación. ", "External storage" : "Almacenamiento externo", + "Submit" : "Enviar", "External mount error" : "Error de montaje externo", "Storage type" : "Tipo de almacenamiento", "Unknown" : "Desconocido", diff --git a/apps/files_external/l10n/es_419.json b/apps/files_external/l10n/es_419.json index 8fbac3ea070..cbebf58648c 100644 --- a/apps/files_external/l10n/es_419.json +++ b/apps/files_external/l10n/es_419.json @@ -79,6 +79,7 @@ "The cURL support in PHP is not enabled or installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "El soporte para cURL en PHP no se encuentra habilitado o instalado. El montaje de %s no es posible. Por favor solicita a tu administador su instalación. ", "The FTP support in PHP is not enabled or installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "El soporte para FTP en PHP no se encuentra habilitado o instalado. El montaje de %s no es posible. Por favor solicita a tu administador su instalación. ", "External storage" : "Almacenamiento externo", + "Submit" : "Enviar", "External mount error" : "Error de montaje externo", "Storage type" : "Tipo de almacenamiento", "Unknown" : "Desconocido", diff --git a/apps/files_external/l10n/es_AR.js b/apps/files_external/l10n/es_AR.js index 12560356a65..1d1848a6b74 100644 --- a/apps/files_external/l10n/es_AR.js +++ b/apps/files_external/l10n/es_AR.js @@ -81,6 +81,7 @@ OC.L10N.register( "The FTP support in PHP is not enabled or installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "El soporte para FTP en PHP no se encuentra habilitado o instalado. El montaje de %s no es posible. Favor de solicitar a su administador su instalación. ", "External storage" : "Almacenamiento externo", "External storage support" : "Soporte de almacenamiento externo", + "Submit" : "Enviar", "External mount error" : "Error de montaje externo", "Storage type" : "Tipo de almacenamiento", "Unknown" : "Desconocido", diff --git a/apps/files_external/l10n/es_AR.json b/apps/files_external/l10n/es_AR.json index 403f96c63eb..2d880c76191 100644 --- a/apps/files_external/l10n/es_AR.json +++ b/apps/files_external/l10n/es_AR.json @@ -79,6 +79,7 @@ "The FTP support in PHP is not enabled or installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "El soporte para FTP en PHP no se encuentra habilitado o instalado. El montaje de %s no es posible. Favor de solicitar a su administador su instalación. ", "External storage" : "Almacenamiento externo", "External storage support" : "Soporte de almacenamiento externo", + "Submit" : "Enviar", "External mount error" : "Error de montaje externo", "Storage type" : "Tipo de almacenamiento", "Unknown" : "Desconocido", diff --git a/apps/files_external/l10n/es_CL.js b/apps/files_external/l10n/es_CL.js index 7d092a61c0b..478cc693244 100644 --- a/apps/files_external/l10n/es_CL.js +++ b/apps/files_external/l10n/es_CL.js @@ -86,6 +86,7 @@ OC.L10N.register( "The FTP support in PHP is not enabled or installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "El soporte para FTP en PHP no se encuentra habilitado o instalado. El montaje de %s no es posible. Por favor solicita a tu administador su instalación. ", "External storage" : "Almacenamiento externo", "External storage support" : "Soporte de almacenamiento externo", + "Submit" : "Enviar", "External mount error" : "Error de montaje externo", "Storage type" : "Tipo de almacenamiento", "Unknown" : "Desconocido", diff --git a/apps/files_external/l10n/es_CL.json b/apps/files_external/l10n/es_CL.json index 28144f8359c..0e9b83b471a 100644 --- a/apps/files_external/l10n/es_CL.json +++ b/apps/files_external/l10n/es_CL.json @@ -84,6 +84,7 @@ "The FTP support in PHP is not enabled or installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "El soporte para FTP en PHP no se encuentra habilitado o instalado. El montaje de %s no es posible. Por favor solicita a tu administador su instalación. ", "External storage" : "Almacenamiento externo", "External storage support" : "Soporte de almacenamiento externo", + "Submit" : "Enviar", "External mount error" : "Error de montaje externo", "Storage type" : "Tipo de almacenamiento", "Unknown" : "Desconocido", diff --git a/apps/files_external/l10n/es_CO.js b/apps/files_external/l10n/es_CO.js index 7d092a61c0b..478cc693244 100644 --- a/apps/files_external/l10n/es_CO.js +++ b/apps/files_external/l10n/es_CO.js @@ -86,6 +86,7 @@ OC.L10N.register( "The FTP support in PHP is not enabled or installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "El soporte para FTP en PHP no se encuentra habilitado o instalado. El montaje de %s no es posible. Por favor solicita a tu administador su instalación. ", "External storage" : "Almacenamiento externo", "External storage support" : "Soporte de almacenamiento externo", + "Submit" : "Enviar", "External mount error" : "Error de montaje externo", "Storage type" : "Tipo de almacenamiento", "Unknown" : "Desconocido", diff --git a/apps/files_external/l10n/es_CO.json b/apps/files_external/l10n/es_CO.json index 28144f8359c..0e9b83b471a 100644 --- a/apps/files_external/l10n/es_CO.json +++ b/apps/files_external/l10n/es_CO.json @@ -84,6 +84,7 @@ "The FTP support in PHP is not enabled or installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "El soporte para FTP en PHP no se encuentra habilitado o instalado. El montaje de %s no es posible. Por favor solicita a tu administador su instalación. ", "External storage" : "Almacenamiento externo", "External storage support" : "Soporte de almacenamiento externo", + "Submit" : "Enviar", "External mount error" : "Error de montaje externo", "Storage type" : "Tipo de almacenamiento", "Unknown" : "Desconocido", diff --git a/apps/files_external/l10n/es_CR.js b/apps/files_external/l10n/es_CR.js index 7d092a61c0b..478cc693244 100644 --- a/apps/files_external/l10n/es_CR.js +++ b/apps/files_external/l10n/es_CR.js @@ -86,6 +86,7 @@ OC.L10N.register( "The FTP support in PHP is not enabled or installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "El soporte para FTP en PHP no se encuentra habilitado o instalado. El montaje de %s no es posible. Por favor solicita a tu administador su instalación. ", "External storage" : "Almacenamiento externo", "External storage support" : "Soporte de almacenamiento externo", + "Submit" : "Enviar", "External mount error" : "Error de montaje externo", "Storage type" : "Tipo de almacenamiento", "Unknown" : "Desconocido", diff --git a/apps/files_external/l10n/es_CR.json b/apps/files_external/l10n/es_CR.json index 28144f8359c..0e9b83b471a 100644 --- a/apps/files_external/l10n/es_CR.json +++ b/apps/files_external/l10n/es_CR.json @@ -84,6 +84,7 @@ "The FTP support in PHP is not enabled or installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "El soporte para FTP en PHP no se encuentra habilitado o instalado. El montaje de %s no es posible. Por favor solicita a tu administador su instalación. ", "External storage" : "Almacenamiento externo", "External storage support" : "Soporte de almacenamiento externo", + "Submit" : "Enviar", "External mount error" : "Error de montaje externo", "Storage type" : "Tipo de almacenamiento", "Unknown" : "Desconocido", diff --git a/apps/files_external/l10n/es_DO.js b/apps/files_external/l10n/es_DO.js index 7d092a61c0b..478cc693244 100644 --- a/apps/files_external/l10n/es_DO.js +++ b/apps/files_external/l10n/es_DO.js @@ -86,6 +86,7 @@ OC.L10N.register( "The FTP support in PHP is not enabled or installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "El soporte para FTP en PHP no se encuentra habilitado o instalado. El montaje de %s no es posible. Por favor solicita a tu administador su instalación. ", "External storage" : "Almacenamiento externo", "External storage support" : "Soporte de almacenamiento externo", + "Submit" : "Enviar", "External mount error" : "Error de montaje externo", "Storage type" : "Tipo de almacenamiento", "Unknown" : "Desconocido", diff --git a/apps/files_external/l10n/es_DO.json b/apps/files_external/l10n/es_DO.json index 28144f8359c..0e9b83b471a 100644 --- a/apps/files_external/l10n/es_DO.json +++ b/apps/files_external/l10n/es_DO.json @@ -84,6 +84,7 @@ "The FTP support in PHP is not enabled or installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "El soporte para FTP en PHP no se encuentra habilitado o instalado. El montaje de %s no es posible. Por favor solicita a tu administador su instalación. ", "External storage" : "Almacenamiento externo", "External storage support" : "Soporte de almacenamiento externo", + "Submit" : "Enviar", "External mount error" : "Error de montaje externo", "Storage type" : "Tipo de almacenamiento", "Unknown" : "Desconocido", diff --git a/apps/files_external/l10n/es_EC.js b/apps/files_external/l10n/es_EC.js index ec821524a3e..49dbc712942 100644 --- a/apps/files_external/l10n/es_EC.js +++ b/apps/files_external/l10n/es_EC.js @@ -103,6 +103,7 @@ OC.L10N.register( "External storage" : "Almacenamiento externo", "External storage support" : "Soporte de almacenamiento externo", "Adds basic external storage support" : "Añade soporte básico para almacenamiento externo.", + "Submit" : "Enviar", "External mount error" : "Error de montaje externo", "Storage type" : "Tipo de almacenamiento", "Unknown" : "Desconocido", diff --git a/apps/files_external/l10n/es_EC.json b/apps/files_external/l10n/es_EC.json index 3128f679c8e..ebdc02f8aa9 100644 --- a/apps/files_external/l10n/es_EC.json +++ b/apps/files_external/l10n/es_EC.json @@ -101,6 +101,7 @@ "External storage" : "Almacenamiento externo", "External storage support" : "Soporte de almacenamiento externo", "Adds basic external storage support" : "Añade soporte básico para almacenamiento externo.", + "Submit" : "Enviar", "External mount error" : "Error de montaje externo", "Storage type" : "Tipo de almacenamiento", "Unknown" : "Desconocido", diff --git a/apps/files_external/l10n/es_GT.js b/apps/files_external/l10n/es_GT.js index 7d092a61c0b..478cc693244 100644 --- a/apps/files_external/l10n/es_GT.js +++ b/apps/files_external/l10n/es_GT.js @@ -86,6 +86,7 @@ OC.L10N.register( "The FTP support in PHP is not enabled or installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "El soporte para FTP en PHP no se encuentra habilitado o instalado. El montaje de %s no es posible. Por favor solicita a tu administador su instalación. ", "External storage" : "Almacenamiento externo", "External storage support" : "Soporte de almacenamiento externo", + "Submit" : "Enviar", "External mount error" : "Error de montaje externo", "Storage type" : "Tipo de almacenamiento", "Unknown" : "Desconocido", diff --git a/apps/files_external/l10n/es_GT.json b/apps/files_external/l10n/es_GT.json index 28144f8359c..0e9b83b471a 100644 --- a/apps/files_external/l10n/es_GT.json +++ b/apps/files_external/l10n/es_GT.json @@ -84,6 +84,7 @@ "The FTP support in PHP is not enabled or installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "El soporte para FTP en PHP no se encuentra habilitado o instalado. El montaje de %s no es posible. Por favor solicita a tu administador su instalación. ", "External storage" : "Almacenamiento externo", "External storage support" : "Soporte de almacenamiento externo", + "Submit" : "Enviar", "External mount error" : "Error de montaje externo", "Storage type" : "Tipo de almacenamiento", "Unknown" : "Desconocido", diff --git a/apps/files_external/l10n/es_HN.js b/apps/files_external/l10n/es_HN.js index 60787eb1087..83ff905f8e1 100644 --- a/apps/files_external/l10n/es_HN.js +++ b/apps/files_external/l10n/es_HN.js @@ -81,6 +81,7 @@ OC.L10N.register( "The cURL support in PHP is not enabled or installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "El soporte para cURL en PHP no se encuentra habilitado o instalado. El montaje de %s no es posible. Por favor solicita a tu administador su instalación. ", "The FTP support in PHP is not enabled or installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "El soporte para FTP en PHP no se encuentra habilitado o instalado. El montaje de %s no es posible. Por favor solicita a tu administador su instalación. ", "External storage" : "Almacenamiento externo", + "Submit" : "Enviar", "External mount error" : "Error de montaje externo", "Storage type" : "Tipo de almacenamiento", "Unknown" : "Desconocido", diff --git a/apps/files_external/l10n/es_HN.json b/apps/files_external/l10n/es_HN.json index 40fe9acbfcc..ec27343d21b 100644 --- a/apps/files_external/l10n/es_HN.json +++ b/apps/files_external/l10n/es_HN.json @@ -79,6 +79,7 @@ "The cURL support in PHP is not enabled or installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "El soporte para cURL en PHP no se encuentra habilitado o instalado. El montaje de %s no es posible. Por favor solicita a tu administador su instalación. ", "The FTP support in PHP is not enabled or installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "El soporte para FTP en PHP no se encuentra habilitado o instalado. El montaje de %s no es posible. Por favor solicita a tu administador su instalación. ", "External storage" : "Almacenamiento externo", + "Submit" : "Enviar", "External mount error" : "Error de montaje externo", "Storage type" : "Tipo de almacenamiento", "Unknown" : "Desconocido", diff --git a/apps/files_external/l10n/es_MX.js b/apps/files_external/l10n/es_MX.js index faffe8c1208..7654eb295d2 100644 --- a/apps/files_external/l10n/es_MX.js +++ b/apps/files_external/l10n/es_MX.js @@ -114,9 +114,10 @@ OC.L10N.register( "External storage support" : "Soporte de almacenamiento externo", "Adds basic external storage support" : "Agrega soporte básico para almacenamiento externo", "This application enables administrators to configure connections to external storage providers, such as FTP servers, S3 or SWIFT object stores, other Nextcloud servers, WebDAV servers, and more. Administration can choose which types of storage to enable and can mount these storage locations for an account, a group, or the entire system. Users will see a new folder appear in their root Nextcloud directory, which they can access and use like any other Nextcloud folder. External storage also allows people to share files stored in these external locations. In these cases, the credentials for the owner of the file are used when the recipient requests the file from external storage, thereby ensuring that the recipient can access the shared file.\n\nExternal storage can be configured using the GUI or at the command line. This second option provides the administration with more flexibility for configuring bulk external storage mounts and setting mount priorities. More information is available in the external storage GUI documentation and the external storage Configuration File documentation." : "Esta aplicación le permite a los adminsitradores configurar las conexiónes a proveedores de almacenamiento externo, tales como servidores FTP, S3 o almacenamiento de objetos SWIFT, otros servidores de Nextcloud, servidores WebDAV y más. Los administradores pueden elegir qué tipos de almacenamiento habilitar y pueden montar estas ubicaciones de almacenamiento para un usuario, un grupo o para todo el sistema. Los usuarios verán aparecer una nueva carpeta en su directorio raíz de Nextcloud, la cual podrán acceder y usar como cualquier otra carpeta de Nextcloud. El almacenamiento externo también le permite a los usuarios compartir archivos almacenados en estas ubicaciones externas. En estos casos, las credenciales del dueño del archivo son usadas cuando el destinatario solicita el archivo de un almacenamiento externo, asegurando así que el destinatario pueda acceder el archivo compartido.\n\nEl almacenamiento externo se puede configurar usando el GUI o la línea de comandos. Esta segunda opción le brinda a los administradores más flexibilidad para configurar masivamente el montaje del almacenamiento externo y establecer la prioridad de montaje. Más información disponible en la documentación de almacenamiento externo GUI y la documentación del archivo de configuración del almacenamiento externo. ", - "Enter missing credentials" : "Ingrese las credenciales faltantes", + "Submit" : "Enviar", "Unable to update this external storage config. {statusMessage}" : "No se pudo actualizar la configuración de este almacenamiento externo. {statusMessage}", "New configuration successfully saved" : "La nueva configuración se guardó exitosamente", + "Enter missing credentials" : "Ingrese las credenciales faltantes", "There was an error with this external storage." : "Hay un error con este almacenamiento externo.", "We were unable to check the external storage {basename}" : "No pudimos revisar el almacenamiento externo {basename}", "Examine this faulty external storage configuration" : "Examinar la configuración fallida de este almacenamiento externo", diff --git a/apps/files_external/l10n/es_MX.json b/apps/files_external/l10n/es_MX.json index b07d1e0209e..b9a0cdd7c3e 100644 --- a/apps/files_external/l10n/es_MX.json +++ b/apps/files_external/l10n/es_MX.json @@ -112,9 +112,10 @@ "External storage support" : "Soporte de almacenamiento externo", "Adds basic external storage support" : "Agrega soporte básico para almacenamiento externo", "This application enables administrators to configure connections to external storage providers, such as FTP servers, S3 or SWIFT object stores, other Nextcloud servers, WebDAV servers, and more. Administration can choose which types of storage to enable and can mount these storage locations for an account, a group, or the entire system. Users will see a new folder appear in their root Nextcloud directory, which they can access and use like any other Nextcloud folder. External storage also allows people to share files stored in these external locations. In these cases, the credentials for the owner of the file are used when the recipient requests the file from external storage, thereby ensuring that the recipient can access the shared file.\n\nExternal storage can be configured using the GUI or at the command line. This second option provides the administration with more flexibility for configuring bulk external storage mounts and setting mount priorities. More information is available in the external storage GUI documentation and the external storage Configuration File documentation." : "Esta aplicación le permite a los adminsitradores configurar las conexiónes a proveedores de almacenamiento externo, tales como servidores FTP, S3 o almacenamiento de objetos SWIFT, otros servidores de Nextcloud, servidores WebDAV y más. Los administradores pueden elegir qué tipos de almacenamiento habilitar y pueden montar estas ubicaciones de almacenamiento para un usuario, un grupo o para todo el sistema. Los usuarios verán aparecer una nueva carpeta en su directorio raíz de Nextcloud, la cual podrán acceder y usar como cualquier otra carpeta de Nextcloud. El almacenamiento externo también le permite a los usuarios compartir archivos almacenados en estas ubicaciones externas. En estos casos, las credenciales del dueño del archivo son usadas cuando el destinatario solicita el archivo de un almacenamiento externo, asegurando así que el destinatario pueda acceder el archivo compartido.\n\nEl almacenamiento externo se puede configurar usando el GUI o la línea de comandos. Esta segunda opción le brinda a los administradores más flexibilidad para configurar masivamente el montaje del almacenamiento externo y establecer la prioridad de montaje. Más información disponible en la documentación de almacenamiento externo GUI y la documentación del archivo de configuración del almacenamiento externo. ", - "Enter missing credentials" : "Ingrese las credenciales faltantes", + "Submit" : "Enviar", "Unable to update this external storage config. {statusMessage}" : "No se pudo actualizar la configuración de este almacenamiento externo. {statusMessage}", "New configuration successfully saved" : "La nueva configuración se guardó exitosamente", + "Enter missing credentials" : "Ingrese las credenciales faltantes", "There was an error with this external storage." : "Hay un error con este almacenamiento externo.", "We were unable to check the external storage {basename}" : "No pudimos revisar el almacenamiento externo {basename}", "Examine this faulty external storage configuration" : "Examinar la configuración fallida de este almacenamiento externo", diff --git a/apps/files_external/l10n/es_NI.js b/apps/files_external/l10n/es_NI.js index 60787eb1087..83ff905f8e1 100644 --- a/apps/files_external/l10n/es_NI.js +++ b/apps/files_external/l10n/es_NI.js @@ -81,6 +81,7 @@ OC.L10N.register( "The cURL support in PHP is not enabled or installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "El soporte para cURL en PHP no se encuentra habilitado o instalado. El montaje de %s no es posible. Por favor solicita a tu administador su instalación. ", "The FTP support in PHP is not enabled or installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "El soporte para FTP en PHP no se encuentra habilitado o instalado. El montaje de %s no es posible. Por favor solicita a tu administador su instalación. ", "External storage" : "Almacenamiento externo", + "Submit" : "Enviar", "External mount error" : "Error de montaje externo", "Storage type" : "Tipo de almacenamiento", "Unknown" : "Desconocido", diff --git a/apps/files_external/l10n/es_NI.json b/apps/files_external/l10n/es_NI.json index 40fe9acbfcc..ec27343d21b 100644 --- a/apps/files_external/l10n/es_NI.json +++ b/apps/files_external/l10n/es_NI.json @@ -79,6 +79,7 @@ "The cURL support in PHP is not enabled or installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "El soporte para cURL en PHP no se encuentra habilitado o instalado. El montaje de %s no es posible. Por favor solicita a tu administador su instalación. ", "The FTP support in PHP is not enabled or installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "El soporte para FTP en PHP no se encuentra habilitado o instalado. El montaje de %s no es posible. Por favor solicita a tu administador su instalación. ", "External storage" : "Almacenamiento externo", + "Submit" : "Enviar", "External mount error" : "Error de montaje externo", "Storage type" : "Tipo de almacenamiento", "Unknown" : "Desconocido", diff --git a/apps/files_external/l10n/es_PA.js b/apps/files_external/l10n/es_PA.js index 60787eb1087..83ff905f8e1 100644 --- a/apps/files_external/l10n/es_PA.js +++ b/apps/files_external/l10n/es_PA.js @@ -81,6 +81,7 @@ OC.L10N.register( "The cURL support in PHP is not enabled or installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "El soporte para cURL en PHP no se encuentra habilitado o instalado. El montaje de %s no es posible. Por favor solicita a tu administador su instalación. ", "The FTP support in PHP is not enabled or installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "El soporte para FTP en PHP no se encuentra habilitado o instalado. El montaje de %s no es posible. Por favor solicita a tu administador su instalación. ", "External storage" : "Almacenamiento externo", + "Submit" : "Enviar", "External mount error" : "Error de montaje externo", "Storage type" : "Tipo de almacenamiento", "Unknown" : "Desconocido", diff --git a/apps/files_external/l10n/es_PA.json b/apps/files_external/l10n/es_PA.json index 40fe9acbfcc..ec27343d21b 100644 --- a/apps/files_external/l10n/es_PA.json +++ b/apps/files_external/l10n/es_PA.json @@ -79,6 +79,7 @@ "The cURL support in PHP is not enabled or installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "El soporte para cURL en PHP no se encuentra habilitado o instalado. El montaje de %s no es posible. Por favor solicita a tu administador su instalación. ", "The FTP support in PHP is not enabled or installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "El soporte para FTP en PHP no se encuentra habilitado o instalado. El montaje de %s no es posible. Por favor solicita a tu administador su instalación. ", "External storage" : "Almacenamiento externo", + "Submit" : "Enviar", "External mount error" : "Error de montaje externo", "Storage type" : "Tipo de almacenamiento", "Unknown" : "Desconocido", diff --git a/apps/files_external/l10n/es_PE.js b/apps/files_external/l10n/es_PE.js index 60787eb1087..83ff905f8e1 100644 --- a/apps/files_external/l10n/es_PE.js +++ b/apps/files_external/l10n/es_PE.js @@ -81,6 +81,7 @@ OC.L10N.register( "The cURL support in PHP is not enabled or installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "El soporte para cURL en PHP no se encuentra habilitado o instalado. El montaje de %s no es posible. Por favor solicita a tu administador su instalación. ", "The FTP support in PHP is not enabled or installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "El soporte para FTP en PHP no se encuentra habilitado o instalado. El montaje de %s no es posible. Por favor solicita a tu administador su instalación. ", "External storage" : "Almacenamiento externo", + "Submit" : "Enviar", "External mount error" : "Error de montaje externo", "Storage type" : "Tipo de almacenamiento", "Unknown" : "Desconocido", diff --git a/apps/files_external/l10n/es_PE.json b/apps/files_external/l10n/es_PE.json index 40fe9acbfcc..ec27343d21b 100644 --- a/apps/files_external/l10n/es_PE.json +++ b/apps/files_external/l10n/es_PE.json @@ -79,6 +79,7 @@ "The cURL support in PHP is not enabled or installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "El soporte para cURL en PHP no se encuentra habilitado o instalado. El montaje de %s no es posible. Por favor solicita a tu administador su instalación. ", "The FTP support in PHP is not enabled or installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "El soporte para FTP en PHP no se encuentra habilitado o instalado. El montaje de %s no es posible. Por favor solicita a tu administador su instalación. ", "External storage" : "Almacenamiento externo", + "Submit" : "Enviar", "External mount error" : "Error de montaje externo", "Storage type" : "Tipo de almacenamiento", "Unknown" : "Desconocido", diff --git a/apps/files_external/l10n/es_PR.js b/apps/files_external/l10n/es_PR.js index 60787eb1087..83ff905f8e1 100644 --- a/apps/files_external/l10n/es_PR.js +++ b/apps/files_external/l10n/es_PR.js @@ -81,6 +81,7 @@ OC.L10N.register( "The cURL support in PHP is not enabled or installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "El soporte para cURL en PHP no se encuentra habilitado o instalado. El montaje de %s no es posible. Por favor solicita a tu administador su instalación. ", "The FTP support in PHP is not enabled or installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "El soporte para FTP en PHP no se encuentra habilitado o instalado. El montaje de %s no es posible. Por favor solicita a tu administador su instalación. ", "External storage" : "Almacenamiento externo", + "Submit" : "Enviar", "External mount error" : "Error de montaje externo", "Storage type" : "Tipo de almacenamiento", "Unknown" : "Desconocido", diff --git a/apps/files_external/l10n/es_PR.json b/apps/files_external/l10n/es_PR.json index 40fe9acbfcc..ec27343d21b 100644 --- a/apps/files_external/l10n/es_PR.json +++ b/apps/files_external/l10n/es_PR.json @@ -79,6 +79,7 @@ "The cURL support in PHP is not enabled or installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "El soporte para cURL en PHP no se encuentra habilitado o instalado. El montaje de %s no es posible. Por favor solicita a tu administador su instalación. ", "The FTP support in PHP is not enabled or installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "El soporte para FTP en PHP no se encuentra habilitado o instalado. El montaje de %s no es posible. Por favor solicita a tu administador su instalación. ", "External storage" : "Almacenamiento externo", + "Submit" : "Enviar", "External mount error" : "Error de montaje externo", "Storage type" : "Tipo de almacenamiento", "Unknown" : "Desconocido", diff --git a/apps/files_external/l10n/es_PY.js b/apps/files_external/l10n/es_PY.js index 472ba3072f2..1bb932486f0 100644 --- a/apps/files_external/l10n/es_PY.js +++ b/apps/files_external/l10n/es_PY.js @@ -81,6 +81,7 @@ OC.L10N.register( "The cURL support in PHP is not enabled or installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "El soporte para cURL en PHP no se encuentra habilitado o instalado. El montaje de %s no es posible. Por favor solicita a tu administador su instalación. ", "The FTP support in PHP is not enabled or installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "El soporte para FTP en PHP no se encuentra habilitado o instalado. El montaje de %s no es posible. Por favor solicita a tu administador su instalación. ", "External storage" : "Almacenamiento externo", + "Submit" : "Enviar", "External mount error" : "Error de montaje externo", "Storage type" : "Tipo de almacenamiento", "Scope" : "Alcance", diff --git a/apps/files_external/l10n/es_PY.json b/apps/files_external/l10n/es_PY.json index aeef9c33f6e..def6e668d15 100644 --- a/apps/files_external/l10n/es_PY.json +++ b/apps/files_external/l10n/es_PY.json @@ -79,6 +79,7 @@ "The cURL support in PHP is not enabled or installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "El soporte para cURL en PHP no se encuentra habilitado o instalado. El montaje de %s no es posible. Por favor solicita a tu administador su instalación. ", "The FTP support in PHP is not enabled or installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "El soporte para FTP en PHP no se encuentra habilitado o instalado. El montaje de %s no es posible. Por favor solicita a tu administador su instalación. ", "External storage" : "Almacenamiento externo", + "Submit" : "Enviar", "External mount error" : "Error de montaje externo", "Storage type" : "Tipo de almacenamiento", "Scope" : "Alcance", diff --git a/apps/files_external/l10n/es_SV.js b/apps/files_external/l10n/es_SV.js index 7d092a61c0b..478cc693244 100644 --- a/apps/files_external/l10n/es_SV.js +++ b/apps/files_external/l10n/es_SV.js @@ -86,6 +86,7 @@ OC.L10N.register( "The FTP support in PHP is not enabled or installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "El soporte para FTP en PHP no se encuentra habilitado o instalado. El montaje de %s no es posible. Por favor solicita a tu administador su instalación. ", "External storage" : "Almacenamiento externo", "External storage support" : "Soporte de almacenamiento externo", + "Submit" : "Enviar", "External mount error" : "Error de montaje externo", "Storage type" : "Tipo de almacenamiento", "Unknown" : "Desconocido", diff --git a/apps/files_external/l10n/es_SV.json b/apps/files_external/l10n/es_SV.json index 28144f8359c..0e9b83b471a 100644 --- a/apps/files_external/l10n/es_SV.json +++ b/apps/files_external/l10n/es_SV.json @@ -84,6 +84,7 @@ "The FTP support in PHP is not enabled or installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "El soporte para FTP en PHP no se encuentra habilitado o instalado. El montaje de %s no es posible. Por favor solicita a tu administador su instalación. ", "External storage" : "Almacenamiento externo", "External storage support" : "Soporte de almacenamiento externo", + "Submit" : "Enviar", "External mount error" : "Error de montaje externo", "Storage type" : "Tipo de almacenamiento", "Unknown" : "Desconocido", diff --git a/apps/files_external/l10n/es_UY.js b/apps/files_external/l10n/es_UY.js index 60787eb1087..83ff905f8e1 100644 --- a/apps/files_external/l10n/es_UY.js +++ b/apps/files_external/l10n/es_UY.js @@ -81,6 +81,7 @@ OC.L10N.register( "The cURL support in PHP is not enabled or installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "El soporte para cURL en PHP no se encuentra habilitado o instalado. El montaje de %s no es posible. Por favor solicita a tu administador su instalación. ", "The FTP support in PHP is not enabled or installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "El soporte para FTP en PHP no se encuentra habilitado o instalado. El montaje de %s no es posible. Por favor solicita a tu administador su instalación. ", "External storage" : "Almacenamiento externo", + "Submit" : "Enviar", "External mount error" : "Error de montaje externo", "Storage type" : "Tipo de almacenamiento", "Unknown" : "Desconocido", diff --git a/apps/files_external/l10n/es_UY.json b/apps/files_external/l10n/es_UY.json index 40fe9acbfcc..ec27343d21b 100644 --- a/apps/files_external/l10n/es_UY.json +++ b/apps/files_external/l10n/es_UY.json @@ -79,6 +79,7 @@ "The cURL support in PHP is not enabled or installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "El soporte para cURL en PHP no se encuentra habilitado o instalado. El montaje de %s no es posible. Por favor solicita a tu administador su instalación. ", "The FTP support in PHP is not enabled or installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "El soporte para FTP en PHP no se encuentra habilitado o instalado. El montaje de %s no es posible. Por favor solicita a tu administador su instalación. ", "External storage" : "Almacenamiento externo", + "Submit" : "Enviar", "External mount error" : "Error de montaje externo", "Storage type" : "Tipo de almacenamiento", "Unknown" : "Desconocido", diff --git a/apps/files_external/l10n/eu.js b/apps/files_external/l10n/eu.js index e7f19e06c22..4d197c2409a 100644 --- a/apps/files_external/l10n/eu.js +++ b/apps/files_external/l10n/eu.js @@ -114,9 +114,10 @@ OC.L10N.register( "External storage support" : "Kanpoko biltegiratzearen euskarria", "Adds basic external storage support" : "Kanpoko biltegiratzearen oinarrizko euskarria gehitzen du", "This application enables administrators to configure connections to external storage providers, such as FTP servers, S3 or SWIFT object stores, other Nextcloud servers, WebDAV servers, and more. Administration can choose which types of storage to enable and can mount these storage locations for an account, a group, or the entire system. Users will see a new folder appear in their root Nextcloud directory, which they can access and use like any other Nextcloud folder. External storage also allows people to share files stored in these external locations. In these cases, the credentials for the owner of the file are used when the recipient requests the file from external storage, thereby ensuring that the recipient can access the shared file.\n\nExternal storage can be configured using the GUI or at the command line. This second option provides the administration with more flexibility for configuring bulk external storage mounts and setting mount priorities. More information is available in the external storage GUI documentation and the external storage Configuration File documentation." : "Aplikazio honek aukera ematen die administratzaileei kanpoko biltegiratze hornitzaileetara konexioak konfiguratzeko, hala nola, FTP zerbitzariak, S3 edo SWIFT objektuen biltegiak, beste Nextcloud zerbitzariak, WebDAV zerbitzariak eta gehiago. Administratzaileak aukeratu dezake ze biltegiratze mota gaitu nahi dituen eta biltegiratze kokaleku horiek kontu, talde edo sistema osorako munta ditzake. Erabiltzaileek beren erroko Nextcloud direktorioan karpeta berri bat agertu dela ikusiko dute; bertara sarbidea izango dute eta Nextcloudeko beste edozein karpeta bezala erabil dezakete. Kanpoko biltegiratzeak kanpoko kokaleku horietan gordetako fitxategiak partekatzeko aukera ere ematen die erabiltzaileei. Kasu horietan, hartzaileak kanpoko biltegiratzeko fitxategira sarbidea eskatzen duenean fitxategiaren jabearen kredentzialak erabiltzen dira, modu horretan hartzaileak partekatutako fitxategia atzitu dezakeela ziurtatuz.\n\nKanpoko biltegiratzea GUI edo komando lerro bidez konfigura daiteke. Bigarren aukerak malgutasun handiagoa eskaintzen dio administratzaileari, kanpoko biltegiratzeen muntatzea multzoka konfiguratzeko eta muntatze lehentasunak ezartzeko. Eskuragarri dago informazio gehiago kanpoko biltegiratzeen GUIaren eta kanpoko biltegiratzearen konfigurazio fitxategiaren dokumentazioetan.", - "Enter missing credentials" : "Sartu falta diren kredentzialak", + "Submit" : "Bidali", "Unable to update this external storage config. {statusMessage}" : "Ezin izan da kanpoko biltegiaren konfigurazioa aldatu. {statusMessage}", "New configuration successfully saved" : "Konfigurazio berria ondo gorde da", + "Enter missing credentials" : "Sartu falta diren kredentzialak", "There was an error with this external storage." : "Errore bat gertatu da kanpoko biltegi honekin.", "We were unable to check the external storage {basename}" : "Ezin izan da {basename} kanpoko biltegia egiaztatu ", "Examine this faulty external storage configuration" : "Berrikusi kanpoko biltegi konfigurazio akastun hau", diff --git a/apps/files_external/l10n/eu.json b/apps/files_external/l10n/eu.json index eecee4c701d..63d43a2da51 100644 --- a/apps/files_external/l10n/eu.json +++ b/apps/files_external/l10n/eu.json @@ -112,9 +112,10 @@ "External storage support" : "Kanpoko biltegiratzearen euskarria", "Adds basic external storage support" : "Kanpoko biltegiratzearen oinarrizko euskarria gehitzen du", "This application enables administrators to configure connections to external storage providers, such as FTP servers, S3 or SWIFT object stores, other Nextcloud servers, WebDAV servers, and more. Administration can choose which types of storage to enable and can mount these storage locations for an account, a group, or the entire system. Users will see a new folder appear in their root Nextcloud directory, which they can access and use like any other Nextcloud folder. External storage also allows people to share files stored in these external locations. In these cases, the credentials for the owner of the file are used when the recipient requests the file from external storage, thereby ensuring that the recipient can access the shared file.\n\nExternal storage can be configured using the GUI or at the command line. This second option provides the administration with more flexibility for configuring bulk external storage mounts and setting mount priorities. More information is available in the external storage GUI documentation and the external storage Configuration File documentation." : "Aplikazio honek aukera ematen die administratzaileei kanpoko biltegiratze hornitzaileetara konexioak konfiguratzeko, hala nola, FTP zerbitzariak, S3 edo SWIFT objektuen biltegiak, beste Nextcloud zerbitzariak, WebDAV zerbitzariak eta gehiago. Administratzaileak aukeratu dezake ze biltegiratze mota gaitu nahi dituen eta biltegiratze kokaleku horiek kontu, talde edo sistema osorako munta ditzake. Erabiltzaileek beren erroko Nextcloud direktorioan karpeta berri bat agertu dela ikusiko dute; bertara sarbidea izango dute eta Nextcloudeko beste edozein karpeta bezala erabil dezakete. Kanpoko biltegiratzeak kanpoko kokaleku horietan gordetako fitxategiak partekatzeko aukera ere ematen die erabiltzaileei. Kasu horietan, hartzaileak kanpoko biltegiratzeko fitxategira sarbidea eskatzen duenean fitxategiaren jabearen kredentzialak erabiltzen dira, modu horretan hartzaileak partekatutako fitxategia atzitu dezakeela ziurtatuz.\n\nKanpoko biltegiratzea GUI edo komando lerro bidez konfigura daiteke. Bigarren aukerak malgutasun handiagoa eskaintzen dio administratzaileari, kanpoko biltegiratzeen muntatzea multzoka konfiguratzeko eta muntatze lehentasunak ezartzeko. Eskuragarri dago informazio gehiago kanpoko biltegiratzeen GUIaren eta kanpoko biltegiratzearen konfigurazio fitxategiaren dokumentazioetan.", - "Enter missing credentials" : "Sartu falta diren kredentzialak", + "Submit" : "Bidali", "Unable to update this external storage config. {statusMessage}" : "Ezin izan da kanpoko biltegiaren konfigurazioa aldatu. {statusMessage}", "New configuration successfully saved" : "Konfigurazio berria ondo gorde da", + "Enter missing credentials" : "Sartu falta diren kredentzialak", "There was an error with this external storage." : "Errore bat gertatu da kanpoko biltegi honekin.", "We were unable to check the external storage {basename}" : "Ezin izan da {basename} kanpoko biltegia egiaztatu ", "Examine this faulty external storage configuration" : "Berrikusi kanpoko biltegi konfigurazio akastun hau", diff --git a/apps/files_external/l10n/fa.js b/apps/files_external/l10n/fa.js index 293f0085f5a..7608c407ec4 100644 --- a/apps/files_external/l10n/fa.js +++ b/apps/files_external/l10n/fa.js @@ -103,9 +103,10 @@ OC.L10N.register( "External storage" : "حافظه خارجی", "External storage support" : "پشتیبانی از ذخیره سازی خارجی", "Adds basic external storage support" : "پشتیبانی اصلی حافظه خارجی را اضافه می کند", - "Enter missing credentials" : "Enter missing credentials", + "Submit" : "ارسال", "Unable to update this external storage config. {statusMessage}" : "Unable to update this external storage config. {statusMessage}", "New configuration successfully saved" : "New configuration successfully saved", + "Enter missing credentials" : "Enter missing credentials", "There was an error with this external storage." : "There was an error with this external storage.", "We were unable to check the external storage {basename}" : "We were unable to check the external storage {basename}", "Examine this faulty external storage configuration" : "Examine this faulty external storage configuration", diff --git a/apps/files_external/l10n/fa.json b/apps/files_external/l10n/fa.json index e5e5296f8a0..f1a95c74fd3 100644 --- a/apps/files_external/l10n/fa.json +++ b/apps/files_external/l10n/fa.json @@ -101,9 +101,10 @@ "External storage" : "حافظه خارجی", "External storage support" : "پشتیبانی از ذخیره سازی خارجی", "Adds basic external storage support" : "پشتیبانی اصلی حافظه خارجی را اضافه می کند", - "Enter missing credentials" : "Enter missing credentials", + "Submit" : "ارسال", "Unable to update this external storage config. {statusMessage}" : "Unable to update this external storage config. {statusMessage}", "New configuration successfully saved" : "New configuration successfully saved", + "Enter missing credentials" : "Enter missing credentials", "There was an error with this external storage." : "There was an error with this external storage.", "We were unable to check the external storage {basename}" : "We were unable to check the external storage {basename}", "Examine this faulty external storage configuration" : "Examine this faulty external storage configuration", diff --git a/apps/files_external/l10n/fi.js b/apps/files_external/l10n/fi.js index da7dbe6de8b..e8b84b455ab 100644 --- a/apps/files_external/l10n/fi.js +++ b/apps/files_external/l10n/fi.js @@ -98,6 +98,7 @@ OC.L10N.register( "External storage" : "Erillinen tallennustila", "External storage support" : "Erillisen tallennustilan tuki", "Adds basic external storage support" : "Lisää perusmuotoisen tuen erillisille tallennustiloille", + "Submit" : "Lähetä", "Open in Files" : "Avaa tiedostosovelluksessa", "External mount error" : "Erillisen liitosvirhe", "Storage type" : "Tallennustilan tyyppi", diff --git a/apps/files_external/l10n/fi.json b/apps/files_external/l10n/fi.json index 5368e31b849..8042eb9dcc8 100644 --- a/apps/files_external/l10n/fi.json +++ b/apps/files_external/l10n/fi.json @@ -96,6 +96,7 @@ "External storage" : "Erillinen tallennustila", "External storage support" : "Erillisen tallennustilan tuki", "Adds basic external storage support" : "Lisää perusmuotoisen tuen erillisille tallennustiloille", + "Submit" : "Lähetä", "Open in Files" : "Avaa tiedostosovelluksessa", "External mount error" : "Erillisen liitosvirhe", "Storage type" : "Tallennustilan tyyppi", diff --git a/apps/files_external/l10n/fr.js b/apps/files_external/l10n/fr.js index 006c7837618..ece4b63e916 100644 --- a/apps/files_external/l10n/fr.js +++ b/apps/files_external/l10n/fr.js @@ -114,9 +114,10 @@ OC.L10N.register( "External storage support" : "Support de stockage externe", "Adds basic external storage support" : "Ajoute la prise en charge de base du stockage externe", "This application enables administrators to configure connections to external storage providers, such as FTP servers, S3 or SWIFT object stores, other Nextcloud servers, WebDAV servers, and more. Administration can choose which types of storage to enable and can mount these storage locations for an account, a group, or the entire system. Users will see a new folder appear in their root Nextcloud directory, which they can access and use like any other Nextcloud folder. External storage also allows people to share files stored in these external locations. In these cases, the credentials for the owner of the file are used when the recipient requests the file from external storage, thereby ensuring that the recipient can access the shared file.\n\nExternal storage can be configured using the GUI or at the command line. This second option provides the administration with more flexibility for configuring bulk external storage mounts and setting mount priorities. More information is available in the external storage GUI documentation and the external storage Configuration File documentation." : "Cette application permet aux administrateurs de configurer des connexions à des stockage externes, tels que des serveurs FTP, des magasins d'objets S3 ou SWIFT, d'autres serveurs Nextcloud, des serveurs WebDAV, etc. L'administration peut choisir les types de stockage à activer et peut monter ces emplacements de stockage pour un compte, un groupe ou l'ensemble du système. Les utilisateurs verront apparaître un nouveau dossier dans leur répertoire racine Nextcloud, auquel ils pourront accéder et utiliser comme n'importe quel autre dossier Nextcloud. Le stockage externe permet également aux personnes de partager des fichiers stockés dans ces emplacements externes. Dans ce cas, les informations d'identification du propriétaire du fichier sont utilisées lorsque le destinataire demande le fichier à partir du stockage externe, garantissant ainsi que le destinataire peut accéder au fichier partagé.\n\nLe stockage externe peut être configuré à l'aide de l'interface graphique ou via l'interface en ligne de commande. Cette deuxième option offre à l'administration une plus grande flexibilité pour configurer les montages de stockage externes en masse et définir les priorités de montage. D'autres informations sont disponibles dans la documentation de l'interface graphique de stockage externe et la documentation du fichier de configuration de stockage externe.", - "Enter missing credentials" : "Saisissez les identifiants de connexion manquants", + "Submit" : "Soumettre", "Unable to update this external storage config. {statusMessage}" : "Impossible de mettre à jour la configuration de ce stockage externe. {statusMessage}", "New configuration successfully saved" : "Nouvelle configuration entrée avec succès", + "Enter missing credentials" : "Saisissez les identifiants de connexion manquants", "There was an error with this external storage." : "Il y a eu une erreur avec ce stockage externe.", "We were unable to check the external storage {basename}" : "Nous n'avons pas pu vérifier le stockage externe {basename}", "Examine this faulty external storage configuration" : "Examiner la configuration de ce stockage externe défaillant", diff --git a/apps/files_external/l10n/fr.json b/apps/files_external/l10n/fr.json index e4582990794..bb13d0dd566 100644 --- a/apps/files_external/l10n/fr.json +++ b/apps/files_external/l10n/fr.json @@ -112,9 +112,10 @@ "External storage support" : "Support de stockage externe", "Adds basic external storage support" : "Ajoute la prise en charge de base du stockage externe", "This application enables administrators to configure connections to external storage providers, such as FTP servers, S3 or SWIFT object stores, other Nextcloud servers, WebDAV servers, and more. Administration can choose which types of storage to enable and can mount these storage locations for an account, a group, or the entire system. Users will see a new folder appear in their root Nextcloud directory, which they can access and use like any other Nextcloud folder. External storage also allows people to share files stored in these external locations. In these cases, the credentials for the owner of the file are used when the recipient requests the file from external storage, thereby ensuring that the recipient can access the shared file.\n\nExternal storage can be configured using the GUI or at the command line. This second option provides the administration with more flexibility for configuring bulk external storage mounts and setting mount priorities. More information is available in the external storage GUI documentation and the external storage Configuration File documentation." : "Cette application permet aux administrateurs de configurer des connexions à des stockage externes, tels que des serveurs FTP, des magasins d'objets S3 ou SWIFT, d'autres serveurs Nextcloud, des serveurs WebDAV, etc. L'administration peut choisir les types de stockage à activer et peut monter ces emplacements de stockage pour un compte, un groupe ou l'ensemble du système. Les utilisateurs verront apparaître un nouveau dossier dans leur répertoire racine Nextcloud, auquel ils pourront accéder et utiliser comme n'importe quel autre dossier Nextcloud. Le stockage externe permet également aux personnes de partager des fichiers stockés dans ces emplacements externes. Dans ce cas, les informations d'identification du propriétaire du fichier sont utilisées lorsque le destinataire demande le fichier à partir du stockage externe, garantissant ainsi que le destinataire peut accéder au fichier partagé.\n\nLe stockage externe peut être configuré à l'aide de l'interface graphique ou via l'interface en ligne de commande. Cette deuxième option offre à l'administration une plus grande flexibilité pour configurer les montages de stockage externes en masse et définir les priorités de montage. D'autres informations sont disponibles dans la documentation de l'interface graphique de stockage externe et la documentation du fichier de configuration de stockage externe.", - "Enter missing credentials" : "Saisissez les identifiants de connexion manquants", + "Submit" : "Soumettre", "Unable to update this external storage config. {statusMessage}" : "Impossible de mettre à jour la configuration de ce stockage externe. {statusMessage}", "New configuration successfully saved" : "Nouvelle configuration entrée avec succès", + "Enter missing credentials" : "Saisissez les identifiants de connexion manquants", "There was an error with this external storage." : "Il y a eu une erreur avec ce stockage externe.", "We were unable to check the external storage {basename}" : "Nous n'avons pas pu vérifier le stockage externe {basename}", "Examine this faulty external storage configuration" : "Examiner la configuration de ce stockage externe défaillant", diff --git a/apps/files_external/l10n/ga.js b/apps/files_external/l10n/ga.js index 4ce052fa643..2b2b34d4c04 100644 --- a/apps/files_external/l10n/ga.js +++ b/apps/files_external/l10n/ga.js @@ -115,9 +115,14 @@ OC.L10N.register( "External storage support" : "Tacaíocht stórála seachtrach", "Adds basic external storage support" : "Cuireann sé tacaíocht bhunúsach stórála seachtrach leis", "This application enables administrators to configure connections to external storage providers, such as FTP servers, S3 or SWIFT object stores, other Nextcloud servers, WebDAV servers, and more. Administration can choose which types of storage to enable and can mount these storage locations for an account, a group, or the entire system. Users will see a new folder appear in their root Nextcloud directory, which they can access and use like any other Nextcloud folder. External storage also allows people to share files stored in these external locations. In these cases, the credentials for the owner of the file are used when the recipient requests the file from external storage, thereby ensuring that the recipient can access the shared file.\n\nExternal storage can be configured using the GUI or at the command line. This second option provides the administration with more flexibility for configuring bulk external storage mounts and setting mount priorities. More information is available in the external storage GUI documentation and the external storage Configuration File documentation." : "Cuireann an feidhmchlár seo ar chumas riarthóirí naisc a chumrú le soláthraithe stórála seachtracha, mar fhreastalaithe FTP, stórais réad S3 nó SWIFT, freastalaithe Nextcloud eile, freastalaithe WebDAV, agus go leor eile. Is féidir le lucht riaracháin na cineálacha stórála a roghnú le cumasú agus is féidir leo na láithreacha stórála seo a shuiteáil do chuntas, do ghrúpa nó don chóras iomlán. Feicfidh úsáideoirí fillteán nua le feiceáil ina n-eolaire root Nextcloud, ar féidir leo rochtain a fháil air agus a úsáid mar aon fhillteán Nextcloud eile. Ligeann stóráil sheachtrach do dhaoine comhaid atá stóráilte sna láithreacha seachtracha seo a roinnt. Sna cásanna seo, úsáidtear dintiúir úinéir an chomhaid nuair a iarrann an faighteoir an comhad ó stóráil sheachtrach, rud a chinntíonn go bhféadfaidh an faighteoir rochtain a fháil ar an gcomhad roinnte.\n\nIs féidir stóráil sheachtrach a chumrú trí úsáid a bhaint as an GUI nó ag an líne ordaithe. Tugann an dara rogha seo níos mó solúbthachta don riarachán maidir le gléasanna stórála seachtracha mórchóir a chumrú agus chun tosaíochtaí gléasta a shocrú. Tá tuilleadh faisnéise ar fáil sna doiciméid GUI stórála seachtracha agus sa doiciméadú Comhad Cumraíochta stórála seachtraí.", - "Enter missing credentials" : "Cuir isteach dintiúir atá in easnamh", + "Storage credentials" : "Dintiúir stórála", + "To access the storage, you need to provide the authentification informations." : "Chun rochtain a fháil ar an stóras, ní mór duit an fhaisnéis fíordheimhnithe a sholáthar.", + "Enter the storage login" : "Cuir isteach an logáil isteach stórála", + "Enter the storage password" : "Cuir isteach an focal faire stórála", + "Submit" : "Cuir isteach", "Unable to update this external storage config. {statusMessage}" : "Ní féidir an cumraíocht stórála seachtrach seo a nuashonrú. {statusMessage}", "New configuration successfully saved" : "D'éirigh le cumraíocht nua a shábháil", + "Enter missing credentials" : "Cuir isteach dintiúir atá in easnamh", "There was an error with this external storage." : "Tharla earráid leis an stóras seachtrach seo.", "We were unable to check the external storage {basename}" : "Níorbh fhéidir linn an stóras seachtrach {basename} a sheiceáil", "Examine this faulty external storage configuration" : "Scrúdaigh an chumraíocht stórála seachtrach lochtach seo", diff --git a/apps/files_external/l10n/ga.json b/apps/files_external/l10n/ga.json index 20194a17fe9..c5d5bc5bb8f 100644 --- a/apps/files_external/l10n/ga.json +++ b/apps/files_external/l10n/ga.json @@ -113,9 +113,14 @@ "External storage support" : "Tacaíocht stórála seachtrach", "Adds basic external storage support" : "Cuireann sé tacaíocht bhunúsach stórála seachtrach leis", "This application enables administrators to configure connections to external storage providers, such as FTP servers, S3 or SWIFT object stores, other Nextcloud servers, WebDAV servers, and more. Administration can choose which types of storage to enable and can mount these storage locations for an account, a group, or the entire system. Users will see a new folder appear in their root Nextcloud directory, which they can access and use like any other Nextcloud folder. External storage also allows people to share files stored in these external locations. In these cases, the credentials for the owner of the file are used when the recipient requests the file from external storage, thereby ensuring that the recipient can access the shared file.\n\nExternal storage can be configured using the GUI or at the command line. This second option provides the administration with more flexibility for configuring bulk external storage mounts and setting mount priorities. More information is available in the external storage GUI documentation and the external storage Configuration File documentation." : "Cuireann an feidhmchlár seo ar chumas riarthóirí naisc a chumrú le soláthraithe stórála seachtracha, mar fhreastalaithe FTP, stórais réad S3 nó SWIFT, freastalaithe Nextcloud eile, freastalaithe WebDAV, agus go leor eile. Is féidir le lucht riaracháin na cineálacha stórála a roghnú le cumasú agus is féidir leo na láithreacha stórála seo a shuiteáil do chuntas, do ghrúpa nó don chóras iomlán. Feicfidh úsáideoirí fillteán nua le feiceáil ina n-eolaire root Nextcloud, ar féidir leo rochtain a fháil air agus a úsáid mar aon fhillteán Nextcloud eile. Ligeann stóráil sheachtrach do dhaoine comhaid atá stóráilte sna láithreacha seachtracha seo a roinnt. Sna cásanna seo, úsáidtear dintiúir úinéir an chomhaid nuair a iarrann an faighteoir an comhad ó stóráil sheachtrach, rud a chinntíonn go bhféadfaidh an faighteoir rochtain a fháil ar an gcomhad roinnte.\n\nIs féidir stóráil sheachtrach a chumrú trí úsáid a bhaint as an GUI nó ag an líne ordaithe. Tugann an dara rogha seo níos mó solúbthachta don riarachán maidir le gléasanna stórála seachtracha mórchóir a chumrú agus chun tosaíochtaí gléasta a shocrú. Tá tuilleadh faisnéise ar fáil sna doiciméid GUI stórála seachtracha agus sa doiciméadú Comhad Cumraíochta stórála seachtraí.", - "Enter missing credentials" : "Cuir isteach dintiúir atá in easnamh", + "Storage credentials" : "Dintiúir stórála", + "To access the storage, you need to provide the authentification informations." : "Chun rochtain a fháil ar an stóras, ní mór duit an fhaisnéis fíordheimhnithe a sholáthar.", + "Enter the storage login" : "Cuir isteach an logáil isteach stórála", + "Enter the storage password" : "Cuir isteach an focal faire stórála", + "Submit" : "Cuir isteach", "Unable to update this external storage config. {statusMessage}" : "Ní féidir an cumraíocht stórála seachtrach seo a nuashonrú. {statusMessage}", "New configuration successfully saved" : "D'éirigh le cumraíocht nua a shábháil", + "Enter missing credentials" : "Cuir isteach dintiúir atá in easnamh", "There was an error with this external storage." : "Tharla earráid leis an stóras seachtrach seo.", "We were unable to check the external storage {basename}" : "Níorbh fhéidir linn an stóras seachtrach {basename} a sheiceáil", "Examine this faulty external storage configuration" : "Scrúdaigh an chumraíocht stórála seachtrach lochtach seo", diff --git a/apps/files_external/l10n/gl.js b/apps/files_external/l10n/gl.js index be7d4981a9d..3127a51ae4b 100644 --- a/apps/files_external/l10n/gl.js +++ b/apps/files_external/l10n/gl.js @@ -115,9 +115,14 @@ OC.L10N.register( "External storage support" : "Compatibilidade de almacenamento externo", "Adds basic external storage support" : "Engade compatibilidade básica de almacenamento externo", "This application enables administrators to configure connections to external storage providers, such as FTP servers, S3 or SWIFT object stores, other Nextcloud servers, WebDAV servers, and more. Administration can choose which types of storage to enable and can mount these storage locations for an account, a group, or the entire system. Users will see a new folder appear in their root Nextcloud directory, which they can access and use like any other Nextcloud folder. External storage also allows people to share files stored in these external locations. In these cases, the credentials for the owner of the file are used when the recipient requests the file from external storage, thereby ensuring that the recipient can access the shared file.\n\nExternal storage can be configured using the GUI or at the command line. This second option provides the administration with more flexibility for configuring bulk external storage mounts and setting mount priorities. More information is available in the external storage GUI documentation and the external storage Configuration File documentation." : "Esta aplicación permítelle á administración da instancia configurar conexións a provedores externos de almacenamento, como servidores FTP, almacenamento de obxectos S3 ou SWIFT, outros servidores Nextcloud, servidores WebDAV e máis. A administración da instancia pode escoller que tipos de almacenamento activar e pode montar estas localizacións de almacenamento para unha conta, un grupo ou o todo o sistema. Os usuarios verán aparecer un novo cartafol no seu directorio raíz de Nextcloud, ao que poden acceder e que poden usar como calquera outro cartafol de Nextcloud. Almacenamento externo tamén lle permite á xente compartir os ficheiros almacenados nestas localizacións externas. Nestes casos, úsanse as credenciais para o propietario dos ficheiros cando o receptor solicita o ficheiro do almacenamento externo, asegurando así que o receptor poida acceder ao ficheiro compartido.\n\nAlmacenamento externo pódese configurar usando a GUI ou coa liña de ordes. A segunda opción fornece ao usuario avanzado máis flexibilidade para configurar montaxes de almacenamento externo en bloque e para configurar prioridades de montaxe. Ten dispoñíbel máis información na documentación da GUI do almacenamento externo e na documentación do ficheiro de configuración do almacenamento externo.", - "Enter missing credentials" : "Introduza as credenciais que faltan", + "Storage credentials" : "Credenciais de almacenamento", + "To access the storage, you need to provide the authentification informations." : "Para acceder ao almacenamento, cómpre fornecer a información de autenticación.", + "Enter the storage login" : "Introduza o acceso ao almacenamento", + "Enter the storage password" : "Introduza o contrasinal do almacenamento", + "Submit" : "Enviar", "Unable to update this external storage config. {statusMessage}" : "Non é posíbel actualizar esta configuración de almacenamento externo. {statusMessage}", "New configuration successfully saved" : "A nova configuración gardouse correctamente", + "Enter missing credentials" : "Introduza as credenciais que faltan", "There was an error with this external storage." : "Produciuse un erro con este almacenamento externo.", "We were unable to check the external storage {basename}" : "Non fomos quen de comprobar o almacenamento externo {basename}", "Examine this faulty external storage configuration" : "Examine esta configuración de almacenamento externo defectuosa", diff --git a/apps/files_external/l10n/gl.json b/apps/files_external/l10n/gl.json index 8114cc66833..361548dab1a 100644 --- a/apps/files_external/l10n/gl.json +++ b/apps/files_external/l10n/gl.json @@ -113,9 +113,14 @@ "External storage support" : "Compatibilidade de almacenamento externo", "Adds basic external storage support" : "Engade compatibilidade básica de almacenamento externo", "This application enables administrators to configure connections to external storage providers, such as FTP servers, S3 or SWIFT object stores, other Nextcloud servers, WebDAV servers, and more. Administration can choose which types of storage to enable and can mount these storage locations for an account, a group, or the entire system. Users will see a new folder appear in their root Nextcloud directory, which they can access and use like any other Nextcloud folder. External storage also allows people to share files stored in these external locations. In these cases, the credentials for the owner of the file are used when the recipient requests the file from external storage, thereby ensuring that the recipient can access the shared file.\n\nExternal storage can be configured using the GUI or at the command line. This second option provides the administration with more flexibility for configuring bulk external storage mounts and setting mount priorities. More information is available in the external storage GUI documentation and the external storage Configuration File documentation." : "Esta aplicación permítelle á administración da instancia configurar conexións a provedores externos de almacenamento, como servidores FTP, almacenamento de obxectos S3 ou SWIFT, outros servidores Nextcloud, servidores WebDAV e máis. A administración da instancia pode escoller que tipos de almacenamento activar e pode montar estas localizacións de almacenamento para unha conta, un grupo ou o todo o sistema. Os usuarios verán aparecer un novo cartafol no seu directorio raíz de Nextcloud, ao que poden acceder e que poden usar como calquera outro cartafol de Nextcloud. Almacenamento externo tamén lle permite á xente compartir os ficheiros almacenados nestas localizacións externas. Nestes casos, úsanse as credenciais para o propietario dos ficheiros cando o receptor solicita o ficheiro do almacenamento externo, asegurando así que o receptor poida acceder ao ficheiro compartido.\n\nAlmacenamento externo pódese configurar usando a GUI ou coa liña de ordes. A segunda opción fornece ao usuario avanzado máis flexibilidade para configurar montaxes de almacenamento externo en bloque e para configurar prioridades de montaxe. Ten dispoñíbel máis información na documentación da GUI do almacenamento externo e na documentación do ficheiro de configuración do almacenamento externo.", - "Enter missing credentials" : "Introduza as credenciais que faltan", + "Storage credentials" : "Credenciais de almacenamento", + "To access the storage, you need to provide the authentification informations." : "Para acceder ao almacenamento, cómpre fornecer a información de autenticación.", + "Enter the storage login" : "Introduza o acceso ao almacenamento", + "Enter the storage password" : "Introduza o contrasinal do almacenamento", + "Submit" : "Enviar", "Unable to update this external storage config. {statusMessage}" : "Non é posíbel actualizar esta configuración de almacenamento externo. {statusMessage}", "New configuration successfully saved" : "A nova configuración gardouse correctamente", + "Enter missing credentials" : "Introduza as credenciais que faltan", "There was an error with this external storage." : "Produciuse un erro con este almacenamento externo.", "We were unable to check the external storage {basename}" : "Non fomos quen de comprobar o almacenamento externo {basename}", "Examine this faulty external storage configuration" : "Examine esta configuración de almacenamento externo defectuosa", diff --git a/apps/files_external/l10n/he.js b/apps/files_external/l10n/he.js index 57b5d2bf674..9f3995653ae 100644 --- a/apps/files_external/l10n/he.js +++ b/apps/files_external/l10n/he.js @@ -95,6 +95,7 @@ OC.L10N.register( "External storage" : "אחסון חיצוני", "External storage support" : "תמיכה באחסון חיצוני", "Adds basic external storage support" : "מוסיף תמיכה באחסון חיצוני בסיסי", + "Submit" : "שליחה", "External mount error" : "שגיאת עגינה חיצונית", "Storage type" : "סוג אחסון", "Unknown" : "לא ידוע", diff --git a/apps/files_external/l10n/he.json b/apps/files_external/l10n/he.json index b227f21326e..84d94c31d3c 100644 --- a/apps/files_external/l10n/he.json +++ b/apps/files_external/l10n/he.json @@ -93,6 +93,7 @@ "External storage" : "אחסון חיצוני", "External storage support" : "תמיכה באחסון חיצוני", "Adds basic external storage support" : "מוסיף תמיכה באחסון חיצוני בסיסי", + "Submit" : "שליחה", "External mount error" : "שגיאת עגינה חיצונית", "Storage type" : "סוג אחסון", "Unknown" : "לא ידוע", diff --git a/apps/files_external/l10n/hr.js b/apps/files_external/l10n/hr.js index 386e6b3495c..a37171285d6 100644 --- a/apps/files_external/l10n/hr.js +++ b/apps/files_external/l10n/hr.js @@ -97,6 +97,7 @@ OC.L10N.register( "External storage" : "Vanjsko spremište za pohranu", "External storage support" : "Podrška za vanjsku pohranu", "Adds basic external storage support" : "Dodaje osnovnu podršku za vanjsku pohranu", + "Submit" : "Šalji", "External mount error" : "Pogreška vanjskog postavljanja", "Storage type" : "Vrsta pohrane", "Unknown" : "Nepoznata pogreška", diff --git a/apps/files_external/l10n/hr.json b/apps/files_external/l10n/hr.json index e333e0715c2..802a0f2d8f3 100644 --- a/apps/files_external/l10n/hr.json +++ b/apps/files_external/l10n/hr.json @@ -95,6 +95,7 @@ "External storage" : "Vanjsko spremište za pohranu", "External storage support" : "Podrška za vanjsku pohranu", "Adds basic external storage support" : "Dodaje osnovnu podršku za vanjsku pohranu", + "Submit" : "Šalji", "External mount error" : "Pogreška vanjskog postavljanja", "Storage type" : "Vrsta pohrane", "Unknown" : "Nepoznata pogreška", diff --git a/apps/files_external/l10n/hu.js b/apps/files_external/l10n/hu.js index 12997fe6f25..ee3426a8c4e 100644 --- a/apps/files_external/l10n/hu.js +++ b/apps/files_external/l10n/hu.js @@ -105,9 +105,10 @@ OC.L10N.register( "External storage" : "Külső tároló", "External storage support" : "Külső tároló támogatás", "Adds basic external storage support" : "Külső tároló támogatás hozzáadása", - "Enter missing credentials" : "Adja meg a hiányzó hitelesítési adatokat", + "Submit" : "Beküldés", "Unable to update this external storage config. {statusMessage}" : "A külső tároló beállításainak frissítése nem sikerült. {statusMessage}", "New configuration successfully saved" : "Az új konfiguráció sikeresen elmentve", + "Enter missing credentials" : "Adja meg a hiányzó hitelesítési adatokat", "There was an error with this external storage." : "Hiba történt ezzel a külső tárolóval.", "We were unable to check the external storage {basename}" : "Nem sikerült a(z) {basename} külső tároló ellenőrzése", "Examine this faulty external storage configuration" : "Vizsgálja meg a külső tároló hibás konfigurációját", diff --git a/apps/files_external/l10n/hu.json b/apps/files_external/l10n/hu.json index a90e9b392e3..e1e75806880 100644 --- a/apps/files_external/l10n/hu.json +++ b/apps/files_external/l10n/hu.json @@ -103,9 +103,10 @@ "External storage" : "Külső tároló", "External storage support" : "Külső tároló támogatás", "Adds basic external storage support" : "Külső tároló támogatás hozzáadása", - "Enter missing credentials" : "Adja meg a hiányzó hitelesítési adatokat", + "Submit" : "Beküldés", "Unable to update this external storage config. {statusMessage}" : "A külső tároló beállításainak frissítése nem sikerült. {statusMessage}", "New configuration successfully saved" : "Az új konfiguráció sikeresen elmentve", + "Enter missing credentials" : "Adja meg a hiányzó hitelesítési adatokat", "There was an error with this external storage." : "Hiba történt ezzel a külső tárolóval.", "We were unable to check the external storage {basename}" : "Nem sikerült a(z) {basename} külső tároló ellenőrzése", "Examine this faulty external storage configuration" : "Vizsgálja meg a külső tároló hibás konfigurációját", diff --git a/apps/files_external/l10n/is.js b/apps/files_external/l10n/is.js index 1615abbbaa3..eef651474fd 100644 --- a/apps/files_external/l10n/is.js +++ b/apps/files_external/l10n/is.js @@ -101,9 +101,10 @@ OC.L10N.register( "External storage" : "Ytri gagnageymsla", "External storage support" : "Stuðningur við utanaðkomandi gagnageymslur", "Adds basic external storage support" : "Bætir við grunnstuðningi fyrir utanaðkomandi gagnageymslur", - "Enter missing credentials" : "Settu inn auðkenni sem vantar", + "Submit" : "Senda inn", "Unable to update this external storage config. {statusMessage}" : "Tókst ekki að uppfæra uppsetningu þessarar ytri-gagnageymslu. {statusMessage}", "New configuration successfully saved" : "Það tókst að vista nýju uppsetninguna", + "Enter missing credentials" : "Settu inn auðkenni sem vantar", "There was an error with this external storage." : "Það kom upp villa með þessa ytri-gagnageymslu.", "We were unable to check the external storage {basename}" : "Okkur tókst ekki að athuga ytri-gagnageymsluna {basename}", "Examine this faulty external storage configuration" : "Skoða þessa ófullgerðu uppsetningu ytri-gagnageymslu", diff --git a/apps/files_external/l10n/is.json b/apps/files_external/l10n/is.json index 1a5154cb4c7..2df75138f02 100644 --- a/apps/files_external/l10n/is.json +++ b/apps/files_external/l10n/is.json @@ -99,9 +99,10 @@ "External storage" : "Ytri gagnageymsla", "External storage support" : "Stuðningur við utanaðkomandi gagnageymslur", "Adds basic external storage support" : "Bætir við grunnstuðningi fyrir utanaðkomandi gagnageymslur", - "Enter missing credentials" : "Settu inn auðkenni sem vantar", + "Submit" : "Senda inn", "Unable to update this external storage config. {statusMessage}" : "Tókst ekki að uppfæra uppsetningu þessarar ytri-gagnageymslu. {statusMessage}", "New configuration successfully saved" : "Það tókst að vista nýju uppsetninguna", + "Enter missing credentials" : "Settu inn auðkenni sem vantar", "There was an error with this external storage." : "Það kom upp villa með þessa ytri-gagnageymslu.", "We were unable to check the external storage {basename}" : "Okkur tókst ekki að athuga ytri-gagnageymsluna {basename}", "Examine this faulty external storage configuration" : "Skoða þessa ófullgerðu uppsetningu ytri-gagnageymslu", diff --git a/apps/files_external/l10n/it.js b/apps/files_external/l10n/it.js index 60a260f6ebb..91d4aaf7fb5 100644 --- a/apps/files_external/l10n/it.js +++ b/apps/files_external/l10n/it.js @@ -113,9 +113,10 @@ OC.L10N.register( "External storage" : "Archiviazione esterna", "External storage support" : "Supporto archiviazioni esterne", "Adds basic external storage support" : "Aggiunge un supporto di base per archiviazioni esterne", - "Enter missing credentials" : "Digita le credenziali mancanti", + "Submit" : "Invia", "Unable to update this external storage config. {statusMessage}" : "Impossibile aggiornare questa configurazione di archiviazione esterna. {statusMessage}", "New configuration successfully saved" : "Nuova configurazione salvata correttamente", + "Enter missing credentials" : "Digita le credenziali mancanti", "There was an error with this external storage." : "Si è verificato un errore con questa archiviazione esterna.", "We were unable to check the external storage {basename}" : "Non è stato possibile controllare l'archiviazione esterna {basename}", "Examine this faulty external storage configuration" : "Esamina questa configurazione errata di archiviazione esterna", diff --git a/apps/files_external/l10n/it.json b/apps/files_external/l10n/it.json index ff260e49be2..8502dca9262 100644 --- a/apps/files_external/l10n/it.json +++ b/apps/files_external/l10n/it.json @@ -111,9 +111,10 @@ "External storage" : "Archiviazione esterna", "External storage support" : "Supporto archiviazioni esterne", "Adds basic external storage support" : "Aggiunge un supporto di base per archiviazioni esterne", - "Enter missing credentials" : "Digita le credenziali mancanti", + "Submit" : "Invia", "Unable to update this external storage config. {statusMessage}" : "Impossibile aggiornare questa configurazione di archiviazione esterna. {statusMessage}", "New configuration successfully saved" : "Nuova configurazione salvata correttamente", + "Enter missing credentials" : "Digita le credenziali mancanti", "There was an error with this external storage." : "Si è verificato un errore con questa archiviazione esterna.", "We were unable to check the external storage {basename}" : "Non è stato possibile controllare l'archiviazione esterna {basename}", "Examine this faulty external storage configuration" : "Esamina questa configurazione errata di archiviazione esterna", diff --git a/apps/files_external/l10n/ja.js b/apps/files_external/l10n/ja.js index 8579f8a4d79..e98ea4cc104 100644 --- a/apps/files_external/l10n/ja.js +++ b/apps/files_external/l10n/ja.js @@ -115,9 +115,10 @@ OC.L10N.register( "External storage support" : "外部ストレージに対応", "Adds basic external storage support" : "基本的な外部ストレージの対応を追加", "This application enables administrators to configure connections to external storage providers, such as FTP servers, S3 or SWIFT object stores, other Nextcloud servers, WebDAV servers, and more. Administration can choose which types of storage to enable and can mount these storage locations for an account, a group, or the entire system. Users will see a new folder appear in their root Nextcloud directory, which they can access and use like any other Nextcloud folder. External storage also allows people to share files stored in these external locations. In these cases, the credentials for the owner of the file are used when the recipient requests the file from external storage, thereby ensuring that the recipient can access the shared file.\n\nExternal storage can be configured using the GUI or at the command line. This second option provides the administration with more flexibility for configuring bulk external storage mounts and setting mount priorities. More information is available in the external storage GUI documentation and the external storage Configuration File documentation." : "このアプリケーションは、管理者がFTPサーバー、S3またはSWIFTオブジェクトストア、他のNextcloudサーバー、WebDAVサーバーなどの外部ストレージプロバイダーへの接続を設定できるようにします。管理者は、有効にするストレージの種類を選択し、これらのストレージの場所をアカウント、グループ、またはシステム全体にマウントできます。ユーザーは、ルートNextcloudディレクトリに新しいフォルダが表示され、他のNextcloudフォルダと同様にアクセスして使用できます。外部ストレージを使用すると、これらの外部位置に保存されているファイルを共有することもできます。これらの場合、受信者が外部ストレージからファイルをリクエストするときに、ファイルの所有者の資格情報が使用され、受信者が共有されたファイルにアクセスできることが保証されます。\n\n外部ストレージはGUIまたはコマンドラインを使用して設定できます。この第二のオプションでは、管理者は大量の外部ストレージのマウントやマウントの優先順位の設定を柔軟に行うことができます。外部ストレージのGUIドキュメントと外部ストレージの構成ファイルのドキュメントには、詳細な情報が記載されています。", - "Enter missing credentials" : "不足している資格情報を入力", + "Submit" : "提出する", "Unable to update this external storage config. {statusMessage}" : "この外部ストレージ設定を更新できません。 {statusMessage}", "New configuration successfully saved" : "新しい設定が正常に保存されました", + "Enter missing credentials" : "不足している資格情報を入力", "There was an error with this external storage." : "この外部ストレージでエラーが発生しました。", "We were unable to check the external storage {basename}" : "外部ストレージ {basename} をチェックできませんでした。", "Examine this faulty external storage configuration" : "この問題のある外部ストレージの設定を調べる", diff --git a/apps/files_external/l10n/ja.json b/apps/files_external/l10n/ja.json index 631abc8ce1f..6fd4460b9eb 100644 --- a/apps/files_external/l10n/ja.json +++ b/apps/files_external/l10n/ja.json @@ -113,9 +113,10 @@ "External storage support" : "外部ストレージに対応", "Adds basic external storage support" : "基本的な外部ストレージの対応を追加", "This application enables administrators to configure connections to external storage providers, such as FTP servers, S3 or SWIFT object stores, other Nextcloud servers, WebDAV servers, and more. Administration can choose which types of storage to enable and can mount these storage locations for an account, a group, or the entire system. Users will see a new folder appear in their root Nextcloud directory, which they can access and use like any other Nextcloud folder. External storage also allows people to share files stored in these external locations. In these cases, the credentials for the owner of the file are used when the recipient requests the file from external storage, thereby ensuring that the recipient can access the shared file.\n\nExternal storage can be configured using the GUI or at the command line. This second option provides the administration with more flexibility for configuring bulk external storage mounts and setting mount priorities. More information is available in the external storage GUI documentation and the external storage Configuration File documentation." : "このアプリケーションは、管理者がFTPサーバー、S3またはSWIFTオブジェクトストア、他のNextcloudサーバー、WebDAVサーバーなどの外部ストレージプロバイダーへの接続を設定できるようにします。管理者は、有効にするストレージの種類を選択し、これらのストレージの場所をアカウント、グループ、またはシステム全体にマウントできます。ユーザーは、ルートNextcloudディレクトリに新しいフォルダが表示され、他のNextcloudフォルダと同様にアクセスして使用できます。外部ストレージを使用すると、これらの外部位置に保存されているファイルを共有することもできます。これらの場合、受信者が外部ストレージからファイルをリクエストするときに、ファイルの所有者の資格情報が使用され、受信者が共有されたファイルにアクセスできることが保証されます。\n\n外部ストレージはGUIまたはコマンドラインを使用して設定できます。この第二のオプションでは、管理者は大量の外部ストレージのマウントやマウントの優先順位の設定を柔軟に行うことができます。外部ストレージのGUIドキュメントと外部ストレージの構成ファイルのドキュメントには、詳細な情報が記載されています。", - "Enter missing credentials" : "不足している資格情報を入力", + "Submit" : "提出する", "Unable to update this external storage config. {statusMessage}" : "この外部ストレージ設定を更新できません。 {statusMessage}", "New configuration successfully saved" : "新しい設定が正常に保存されました", + "Enter missing credentials" : "不足している資格情報を入力", "There was an error with this external storage." : "この外部ストレージでエラーが発生しました。", "We were unable to check the external storage {basename}" : "外部ストレージ {basename} をチェックできませんでした。", "Examine this faulty external storage configuration" : "この問題のある外部ストレージの設定を調べる", diff --git a/apps/files_external/l10n/ka.js b/apps/files_external/l10n/ka.js index fcfd8993881..aa2039d608e 100644 --- a/apps/files_external/l10n/ka.js +++ b/apps/files_external/l10n/ka.js @@ -105,9 +105,10 @@ OC.L10N.register( "External storage" : "External storage", "External storage support" : "External storage support", "Adds basic external storage support" : "Adds basic external storage support", - "Enter missing credentials" : "Enter missing credentials", + "Submit" : "Submit", "Unable to update this external storage config. {statusMessage}" : "Unable to update this external storage config. {statusMessage}", "New configuration successfully saved" : "New configuration successfully saved", + "Enter missing credentials" : "Enter missing credentials", "There was an error with this external storage." : "There was an error with this external storage.", "We were unable to check the external storage {basename}" : "We were unable to check the external storage {basename}", "Examine this faulty external storage configuration" : "Examine this faulty external storage configuration", diff --git a/apps/files_external/l10n/ka.json b/apps/files_external/l10n/ka.json index 9b932785584..7a9fb3e72d6 100644 --- a/apps/files_external/l10n/ka.json +++ b/apps/files_external/l10n/ka.json @@ -103,9 +103,10 @@ "External storage" : "External storage", "External storage support" : "External storage support", "Adds basic external storage support" : "Adds basic external storage support", - "Enter missing credentials" : "Enter missing credentials", + "Submit" : "Submit", "Unable to update this external storage config. {statusMessage}" : "Unable to update this external storage config. {statusMessage}", "New configuration successfully saved" : "New configuration successfully saved", + "Enter missing credentials" : "Enter missing credentials", "There was an error with this external storage." : "There was an error with this external storage.", "We were unable to check the external storage {basename}" : "We were unable to check the external storage {basename}", "Examine this faulty external storage configuration" : "Examine this faulty external storage configuration", diff --git a/apps/files_external/l10n/ka_GE.js b/apps/files_external/l10n/ka_GE.js index 69f7d9778c8..5adc842f50a 100644 --- a/apps/files_external/l10n/ka_GE.js +++ b/apps/files_external/l10n/ka_GE.js @@ -87,6 +87,7 @@ OC.L10N.register( "The FTP support in PHP is not enabled or installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "FTP-ს მხარდაჭერა PHP-ში არაა მოქმედი ან დაყენებული. %s-ის მონტაჟი ვერ ხერხდება. გთხოვთ სთხოვოთ თქვენი სისტემის ადმინისტრატორს მისი დაყენება.", "External storage" : "ექსტერნალური საცავი", "External storage support" : "გარე საცავის მხარდაჭერა", + "Submit" : "გაგზავნა", "External mount error" : "გარე მონტაჟის შეცდომა", "Storage type" : "საცავის სახეობა", "Unknown" : "უცნობია", diff --git a/apps/files_external/l10n/ka_GE.json b/apps/files_external/l10n/ka_GE.json index 7b9b343625b..1f7a8548468 100644 --- a/apps/files_external/l10n/ka_GE.json +++ b/apps/files_external/l10n/ka_GE.json @@ -85,6 +85,7 @@ "The FTP support in PHP is not enabled or installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "FTP-ს მხარდაჭერა PHP-ში არაა მოქმედი ან დაყენებული. %s-ის მონტაჟი ვერ ხერხდება. გთხოვთ სთხოვოთ თქვენი სისტემის ადმინისტრატორს მისი დაყენება.", "External storage" : "ექსტერნალური საცავი", "External storage support" : "გარე საცავის მხარდაჭერა", + "Submit" : "გაგზავნა", "External mount error" : "გარე მონტაჟის შეცდომა", "Storage type" : "საცავის სახეობა", "Unknown" : "უცნობია", diff --git a/apps/files_external/l10n/ko.js b/apps/files_external/l10n/ko.js index 8b0d32bd7dc..613ed5a8b43 100644 --- a/apps/files_external/l10n/ko.js +++ b/apps/files_external/l10n/ko.js @@ -105,9 +105,10 @@ OC.L10N.register( "External storage" : "외부 저장소", "External storage support" : "외부 저장소 지원", "Adds basic external storage support" : "기본적인 외부 저장소 지원 추가", - "Enter missing credentials" : "유실된 인증 정보 입력", + "Submit" : "제출", "Unable to update this external storage config. {statusMessage}" : "이 외부 저장소의 설정을 갱신할 수 없음. {status Message}", "New configuration successfully saved" : "새로운 설정이 성공적으로 저장됨", + "Enter missing credentials" : "유실된 인증 정보 입력", "There was an error with this external storage." : "이 외부 저장소에서 오류가 발생했습니다", "We were unable to check the external storage {basename}" : "외부 저장소 {basename}을(를) 확인할 수 없습니다", "Examine this faulty external storage configuration" : "잘못된 외부 저장소 설정을 검사합니다", diff --git a/apps/files_external/l10n/ko.json b/apps/files_external/l10n/ko.json index 41b099aac4f..3118abdfa3a 100644 --- a/apps/files_external/l10n/ko.json +++ b/apps/files_external/l10n/ko.json @@ -103,9 +103,10 @@ "External storage" : "외부 저장소", "External storage support" : "외부 저장소 지원", "Adds basic external storage support" : "기본적인 외부 저장소 지원 추가", - "Enter missing credentials" : "유실된 인증 정보 입력", + "Submit" : "제출", "Unable to update this external storage config. {statusMessage}" : "이 외부 저장소의 설정을 갱신할 수 없음. {status Message}", "New configuration successfully saved" : "새로운 설정이 성공적으로 저장됨", + "Enter missing credentials" : "유실된 인증 정보 입력", "There was an error with this external storage." : "이 외부 저장소에서 오류가 발생했습니다", "We were unable to check the external storage {basename}" : "외부 저장소 {basename}을(를) 확인할 수 없습니다", "Examine this faulty external storage configuration" : "잘못된 외부 저장소 설정을 검사합니다", diff --git a/apps/files_external/l10n/lt_LT.js b/apps/files_external/l10n/lt_LT.js index 64f6e61c114..1392ed9dd2a 100644 --- a/apps/files_external/l10n/lt_LT.js +++ b/apps/files_external/l10n/lt_LT.js @@ -89,6 +89,7 @@ OC.L10N.register( "\"%1$s\" is not installed. Mounting of %2$s is not possible. Please ask your system administrator to install it." : "\"%1$s\" nėra įdiegtas. %2$s prijungimas yra neįmanomas. Paprašykite savo sistemos administratoriaus, kad jį įdiegtų.", "External storage" : "Išorinė saugykla", "External storage support" : "Išorinės saugyklos priežiūra", + "Submit" : "Pateikti", "External mount error" : "Išorinio prijungimo klaida", "Storage type" : "Saugyklos tipas", "Unknown" : "Nežinoma", diff --git a/apps/files_external/l10n/lt_LT.json b/apps/files_external/l10n/lt_LT.json index cc24817ef80..e34ed0503d9 100644 --- a/apps/files_external/l10n/lt_LT.json +++ b/apps/files_external/l10n/lt_LT.json @@ -87,6 +87,7 @@ "\"%1$s\" is not installed. Mounting of %2$s is not possible. Please ask your system administrator to install it." : "\"%1$s\" nėra įdiegtas. %2$s prijungimas yra neįmanomas. Paprašykite savo sistemos administratoriaus, kad jį įdiegtų.", "External storage" : "Išorinė saugykla", "External storage support" : "Išorinės saugyklos priežiūra", + "Submit" : "Pateikti", "External mount error" : "Išorinio prijungimo klaida", "Storage type" : "Saugyklos tipas", "Unknown" : "Nežinoma", diff --git a/apps/files_external/l10n/mk.js b/apps/files_external/l10n/mk.js index 837b3b688ab..fef4d9d0c26 100644 --- a/apps/files_external/l10n/mk.js +++ b/apps/files_external/l10n/mk.js @@ -78,6 +78,7 @@ OC.L10N.register( "\"%1$s\" is not installed. Mounting of %2$s is not possible. Please ask your system administrator to install it." : "\"%1$s\" не е инсалиран. Монтирањето на %2$s не е возможно. Контактирајте го администраторот.", "External storage" : "Надворешно складиште", "External storage support" : "Поддршка за надворешно складиште", + "Submit" : "Испрати", "Open in Files" : "Отвори во датотеките", "External mount error" : "Грешка при надворешно монтирање", "Storage type" : "Вид на складиште", diff --git a/apps/files_external/l10n/mk.json b/apps/files_external/l10n/mk.json index e4c53780c66..2ef0105b0a4 100644 --- a/apps/files_external/l10n/mk.json +++ b/apps/files_external/l10n/mk.json @@ -76,6 +76,7 @@ "\"%1$s\" is not installed. Mounting of %2$s is not possible. Please ask your system administrator to install it." : "\"%1$s\" не е инсалиран. Монтирањето на %2$s не е возможно. Контактирајте го администраторот.", "External storage" : "Надворешно складиште", "External storage support" : "Поддршка за надворешно складиште", + "Submit" : "Испрати", "Open in Files" : "Отвори во датотеките", "External mount error" : "Грешка при надворешно монтирање", "Storage type" : "Вид на складиште", diff --git a/apps/files_external/l10n/nb.js b/apps/files_external/l10n/nb.js index 05190d81691..174ee77852a 100644 --- a/apps/files_external/l10n/nb.js +++ b/apps/files_external/l10n/nb.js @@ -114,9 +114,10 @@ OC.L10N.register( "External storage support" : "Støtte for ekstern lagring", "Adds basic external storage support" : "Legger til enkel ekstern lagringsstøtte", "This application enables administrators to configure connections to external storage providers, such as FTP servers, S3 or SWIFT object stores, other Nextcloud servers, WebDAV servers, and more. Administration can choose which types of storage to enable and can mount these storage locations for an account, a group, or the entire system. Users will see a new folder appear in their root Nextcloud directory, which they can access and use like any other Nextcloud folder. External storage also allows people to share files stored in these external locations. In these cases, the credentials for the owner of the file are used when the recipient requests the file from external storage, thereby ensuring that the recipient can access the shared file.\n\nExternal storage can be configured using the GUI or at the command line. This second option provides the administration with more flexibility for configuring bulk external storage mounts and setting mount priorities. More information is available in the external storage GUI documentation and the external storage Configuration File documentation." : "Dette programmet gjør det mulig for administratorer å konfigurere tilkoblinger til eksterne lagringsleverandører, for eksempel FTP-servere, S3- eller SWIFT-objektlagre, andre Nextcloud-servere, WebDAV-servere og mer. Administrasjon kan velge hvilke typer lagring som skal aktiveres, og kan montere disse lagringsstedene for en konto, en gruppe eller hele systemet. Brukere vil se en ny mappe dukke opp i roten Nextcloud-katalogen, som de kan få tilgang til og bruke som alle andre Nextcloud-mapper. Ekstern lagring gjør det også mulig for folk å dele filer som er lagret på disse eksterne plasseringene. I disse tilfellene brukes legitimasjonen til eieren av filen når mottakeren ber om filen fra ekstern lagring, og sikrer dermed at mottakeren har tilgang til den delte filen.\n\nEkstern lagring kan konfigureres ved hjelp av grafisk grensesnitt (GUI) eller på kommandolinjen. Dette andre alternativet gir administrasjonen mer fleksibilitet for massekonfigurering av eksterne lagringsmonteringer og innstilling av monteringsprioriteter. Du finner mer informasjon i GUI-dokumentasjonen for ekstern lagring og dokumentasjonen for konfigurasjonsfilen for ekstern lagring.", - "Enter missing credentials" : "Skriv inn manglende påloggingsinformasjon", + "Submit" : "Send inn", "Unable to update this external storage config. {statusMessage}" : "Kan ikke oppdatere denne konfigurasjonen for ekstern lagring. {statusMessage}.", "New configuration successfully saved" : "Ny konfigurasjon lagret", + "Enter missing credentials" : "Skriv inn manglende påloggingsinformasjon", "There was an error with this external storage." : "Det oppstod en feil med denne eksterne lagringen.", "We were unable to check the external storage {basename}" : "Vi kunne ikke sjekke den eksterne lagringen {basename}", "Examine this faulty external storage configuration" : "Undersøk denne defekte eksterne lagringskonfigurasjonen", diff --git a/apps/files_external/l10n/nb.json b/apps/files_external/l10n/nb.json index 185242b1753..0de3c829247 100644 --- a/apps/files_external/l10n/nb.json +++ b/apps/files_external/l10n/nb.json @@ -112,9 +112,10 @@ "External storage support" : "Støtte for ekstern lagring", "Adds basic external storage support" : "Legger til enkel ekstern lagringsstøtte", "This application enables administrators to configure connections to external storage providers, such as FTP servers, S3 or SWIFT object stores, other Nextcloud servers, WebDAV servers, and more. Administration can choose which types of storage to enable and can mount these storage locations for an account, a group, or the entire system. Users will see a new folder appear in their root Nextcloud directory, which they can access and use like any other Nextcloud folder. External storage also allows people to share files stored in these external locations. In these cases, the credentials for the owner of the file are used when the recipient requests the file from external storage, thereby ensuring that the recipient can access the shared file.\n\nExternal storage can be configured using the GUI or at the command line. This second option provides the administration with more flexibility for configuring bulk external storage mounts and setting mount priorities. More information is available in the external storage GUI documentation and the external storage Configuration File documentation." : "Dette programmet gjør det mulig for administratorer å konfigurere tilkoblinger til eksterne lagringsleverandører, for eksempel FTP-servere, S3- eller SWIFT-objektlagre, andre Nextcloud-servere, WebDAV-servere og mer. Administrasjon kan velge hvilke typer lagring som skal aktiveres, og kan montere disse lagringsstedene for en konto, en gruppe eller hele systemet. Brukere vil se en ny mappe dukke opp i roten Nextcloud-katalogen, som de kan få tilgang til og bruke som alle andre Nextcloud-mapper. Ekstern lagring gjør det også mulig for folk å dele filer som er lagret på disse eksterne plasseringene. I disse tilfellene brukes legitimasjonen til eieren av filen når mottakeren ber om filen fra ekstern lagring, og sikrer dermed at mottakeren har tilgang til den delte filen.\n\nEkstern lagring kan konfigureres ved hjelp av grafisk grensesnitt (GUI) eller på kommandolinjen. Dette andre alternativet gir administrasjonen mer fleksibilitet for massekonfigurering av eksterne lagringsmonteringer og innstilling av monteringsprioriteter. Du finner mer informasjon i GUI-dokumentasjonen for ekstern lagring og dokumentasjonen for konfigurasjonsfilen for ekstern lagring.", - "Enter missing credentials" : "Skriv inn manglende påloggingsinformasjon", + "Submit" : "Send inn", "Unable to update this external storage config. {statusMessage}" : "Kan ikke oppdatere denne konfigurasjonen for ekstern lagring. {statusMessage}.", "New configuration successfully saved" : "Ny konfigurasjon lagret", + "Enter missing credentials" : "Skriv inn manglende påloggingsinformasjon", "There was an error with this external storage." : "Det oppstod en feil med denne eksterne lagringen.", "We were unable to check the external storage {basename}" : "Vi kunne ikke sjekke den eksterne lagringen {basename}", "Examine this faulty external storage configuration" : "Undersøk denne defekte eksterne lagringskonfigurasjonen", diff --git a/apps/files_external/l10n/nl.js b/apps/files_external/l10n/nl.js index 2f03006a696..1fc6df840c0 100644 --- a/apps/files_external/l10n/nl.js +++ b/apps/files_external/l10n/nl.js @@ -100,6 +100,7 @@ OC.L10N.register( "External storage" : "Externe opslag", "External storage support" : "Externe opslag ondersteuning", "Adds basic external storage support" : "Toevoegen basale ondersteuning voor externe opslag", + "Submit" : "Verwerken", "External mount error" : "Extern koppelpunt fout", "Storage type" : "Opslagtype", "Unknown" : "Onbekend", diff --git a/apps/files_external/l10n/nl.json b/apps/files_external/l10n/nl.json index 659c70fb73a..fc8db2390f8 100644 --- a/apps/files_external/l10n/nl.json +++ b/apps/files_external/l10n/nl.json @@ -98,6 +98,7 @@ "External storage" : "Externe opslag", "External storage support" : "Externe opslag ondersteuning", "Adds basic external storage support" : "Toevoegen basale ondersteuning voor externe opslag", + "Submit" : "Verwerken", "External mount error" : "Extern koppelpunt fout", "Storage type" : "Opslagtype", "Unknown" : "Onbekend", diff --git a/apps/files_external/l10n/pl.js b/apps/files_external/l10n/pl.js index c92d4857b1d..779b941b144 100644 --- a/apps/files_external/l10n/pl.js +++ b/apps/files_external/l10n/pl.js @@ -104,9 +104,10 @@ OC.L10N.register( "External storage" : "Magazyn zewnętrzny", "External storage support" : "Wsparcie zewnętrznego magazynu", "Adds basic external storage support" : "Dodaje podstawową obsługę magazynów zewnętrznych", - "Enter missing credentials" : "Wprowadź brakujące dane uwierzytelniające", + "Submit" : "Wyślij", "Unable to update this external storage config. {statusMessage}" : "Nie można zaktualizować konfiguracji tej pamięci zewnętrznej. {statusMessage}", "New configuration successfully saved" : "Nowa konfiguracja została pomyślnie zapisana", + "Enter missing credentials" : "Wprowadź brakujące dane uwierzytelniające", "There was an error with this external storage." : "Wystąpił błąd związany z pamięcią zewnętrzną.", "We were unable to check the external storage {basename}" : "Nie można sprawdzić pamięci zewnętrznej {basename}", "Examine this faulty external storage configuration" : "Sprawdź wadliwą konfigurację pamięci zewnętrznej", diff --git a/apps/files_external/l10n/pl.json b/apps/files_external/l10n/pl.json index 276a2f08494..114cfb1a69f 100644 --- a/apps/files_external/l10n/pl.json +++ b/apps/files_external/l10n/pl.json @@ -102,9 +102,10 @@ "External storage" : "Magazyn zewnętrzny", "External storage support" : "Wsparcie zewnętrznego magazynu", "Adds basic external storage support" : "Dodaje podstawową obsługę magazynów zewnętrznych", - "Enter missing credentials" : "Wprowadź brakujące dane uwierzytelniające", + "Submit" : "Wyślij", "Unable to update this external storage config. {statusMessage}" : "Nie można zaktualizować konfiguracji tej pamięci zewnętrznej. {statusMessage}", "New configuration successfully saved" : "Nowa konfiguracja została pomyślnie zapisana", + "Enter missing credentials" : "Wprowadź brakujące dane uwierzytelniające", "There was an error with this external storage." : "Wystąpił błąd związany z pamięcią zewnętrzną.", "We were unable to check the external storage {basename}" : "Nie można sprawdzić pamięci zewnętrznej {basename}", "Examine this faulty external storage configuration" : "Sprawdź wadliwą konfigurację pamięci zewnętrznej", diff --git a/apps/files_external/l10n/pt_BR.js b/apps/files_external/l10n/pt_BR.js index 10e1450e7eb..7a2dd264462 100644 --- a/apps/files_external/l10n/pt_BR.js +++ b/apps/files_external/l10n/pt_BR.js @@ -18,6 +18,7 @@ OC.L10N.register( "Once every direct access" : "Uma vez a cada acesso direto", "Read only" : "Somente leitura", "Disconnect" : "Desconectar", + "Unknown backend: {backendName}" : "Backend desconhecido: {backendName}", "Admin defined" : "Definido pelo administrador", "Automatic status checking is disabled due to the large number of configured storages, click to check status" : "A verificação automática de status está desabilitada devido ao grande número de armazenamentos configurados, clique para verificar o status", "Are you sure you want to disconnect this external storage? It will make the storage unavailable in Nextcloud and will lead to a deletion of these files and folders on any sync client that is currently connected but will not delete any files and folders on the external storage itself." : "Tem certeza de que deseja desconectar este armazenamento externo? Isso tornará o armazenamento indisponível no Nextcloud e levará à exclusão desses arquivos e pastas em qualquer cliente de sincronização que esteja conectado no momento, mas não excluirá nenhum arquivo e pasta no próprio armazenamento externo.", @@ -114,9 +115,14 @@ OC.L10N.register( "External storage support" : "Suporte a armazenamento externo", "Adds basic external storage support" : "Adiciona suporte básico para armazenamento externo", "This application enables administrators to configure connections to external storage providers, such as FTP servers, S3 or SWIFT object stores, other Nextcloud servers, WebDAV servers, and more. Administration can choose which types of storage to enable and can mount these storage locations for an account, a group, or the entire system. Users will see a new folder appear in their root Nextcloud directory, which they can access and use like any other Nextcloud folder. External storage also allows people to share files stored in these external locations. In these cases, the credentials for the owner of the file are used when the recipient requests the file from external storage, thereby ensuring that the recipient can access the shared file.\n\nExternal storage can be configured using the GUI or at the command line. This second option provides the administration with more flexibility for configuring bulk external storage mounts and setting mount priorities. More information is available in the external storage GUI documentation and the external storage Configuration File documentation." : "Este aplicativo permite que os administradores configurem conexões com provedores de armazenamento externos, como servidores FTP, armazenamentos de objetos S3 ou SWIFT, outros servidores Nextcloud, servidores WebDAV e muito mais. A administração pode escolher quais tipos de armazenamento ativar e pode montar esses locais de armazenamento para uma conta, um grupo ou todo o sistema. Os usuários verão uma nova pasta aparecer em seu diretório raiz Nextcloud, que eles podem acessar e usar como qualquer outra pasta Nextcloud. O armazenamento externo também permite que as pessoas compartilhem arquivos armazenados nesses locais externos. Nesses casos, as credenciais do proprietário do arquivo são usadas quando o destinatário solicita o arquivo do armazenamento externo, garantindo assim que o destinatário possa acessar o arquivo compartilhado. \n\nO armazenamento externo pode ser configurado usando a GUI ou na linha de comando. Esta segunda opção fornece à administração mais flexibilidade para configurar montagens de armazenamento externo em massa e definir prioridades de montagem. Mais informações estão disponíveis na documentação da GUI de armazenamento externo e na documentação do arquivo de configuração de armazenamento externo.", - "Enter missing credentials" : "Digite as credenciais ausentes", + "Storage credentials" : "Credenciais de armazenamento", + "To access the storage, you need to provide the authentification informations." : "Para acessar o armazenamento, você precisa fornecer as informações de autenticação.", + "Enter the storage login" : "Digite o login de armazenamento", + "Enter the storage password" : "Digite a senha de armazenamento", + "Submit" : "Enviar", "Unable to update this external storage config. {statusMessage}" : "Não é possível atualizar esta configuração de armazenamento externo. {statusMessage}", "New configuration successfully saved" : "Nova configuração salva com sucesso", + "Enter missing credentials" : "Digite as credenciais ausentes", "There was an error with this external storage." : "Ocorreu um erro com este armazenamento externo.", "We were unable to check the external storage {basename}" : "Não foi possível verificar o armazenamento externo {basename}", "Examine this faulty external storage configuration" : "Examine esta configuração de armazenamento externo com falha", diff --git a/apps/files_external/l10n/pt_BR.json b/apps/files_external/l10n/pt_BR.json index 2854dc524a8..b8e266e3ffd 100644 --- a/apps/files_external/l10n/pt_BR.json +++ b/apps/files_external/l10n/pt_BR.json @@ -16,6 +16,7 @@ "Once every direct access" : "Uma vez a cada acesso direto", "Read only" : "Somente leitura", "Disconnect" : "Desconectar", + "Unknown backend: {backendName}" : "Backend desconhecido: {backendName}", "Admin defined" : "Definido pelo administrador", "Automatic status checking is disabled due to the large number of configured storages, click to check status" : "A verificação automática de status está desabilitada devido ao grande número de armazenamentos configurados, clique para verificar o status", "Are you sure you want to disconnect this external storage? It will make the storage unavailable in Nextcloud and will lead to a deletion of these files and folders on any sync client that is currently connected but will not delete any files and folders on the external storage itself." : "Tem certeza de que deseja desconectar este armazenamento externo? Isso tornará o armazenamento indisponível no Nextcloud e levará à exclusão desses arquivos e pastas em qualquer cliente de sincronização que esteja conectado no momento, mas não excluirá nenhum arquivo e pasta no próprio armazenamento externo.", @@ -112,9 +113,14 @@ "External storage support" : "Suporte a armazenamento externo", "Adds basic external storage support" : "Adiciona suporte básico para armazenamento externo", "This application enables administrators to configure connections to external storage providers, such as FTP servers, S3 or SWIFT object stores, other Nextcloud servers, WebDAV servers, and more. Administration can choose which types of storage to enable and can mount these storage locations for an account, a group, or the entire system. Users will see a new folder appear in their root Nextcloud directory, which they can access and use like any other Nextcloud folder. External storage also allows people to share files stored in these external locations. In these cases, the credentials for the owner of the file are used when the recipient requests the file from external storage, thereby ensuring that the recipient can access the shared file.\n\nExternal storage can be configured using the GUI or at the command line. This second option provides the administration with more flexibility for configuring bulk external storage mounts and setting mount priorities. More information is available in the external storage GUI documentation and the external storage Configuration File documentation." : "Este aplicativo permite que os administradores configurem conexões com provedores de armazenamento externos, como servidores FTP, armazenamentos de objetos S3 ou SWIFT, outros servidores Nextcloud, servidores WebDAV e muito mais. A administração pode escolher quais tipos de armazenamento ativar e pode montar esses locais de armazenamento para uma conta, um grupo ou todo o sistema. Os usuários verão uma nova pasta aparecer em seu diretório raiz Nextcloud, que eles podem acessar e usar como qualquer outra pasta Nextcloud. O armazenamento externo também permite que as pessoas compartilhem arquivos armazenados nesses locais externos. Nesses casos, as credenciais do proprietário do arquivo são usadas quando o destinatário solicita o arquivo do armazenamento externo, garantindo assim que o destinatário possa acessar o arquivo compartilhado. \n\nO armazenamento externo pode ser configurado usando a GUI ou na linha de comando. Esta segunda opção fornece à administração mais flexibilidade para configurar montagens de armazenamento externo em massa e definir prioridades de montagem. Mais informações estão disponíveis na documentação da GUI de armazenamento externo e na documentação do arquivo de configuração de armazenamento externo.", - "Enter missing credentials" : "Digite as credenciais ausentes", + "Storage credentials" : "Credenciais de armazenamento", + "To access the storage, you need to provide the authentification informations." : "Para acessar o armazenamento, você precisa fornecer as informações de autenticação.", + "Enter the storage login" : "Digite o login de armazenamento", + "Enter the storage password" : "Digite a senha de armazenamento", + "Submit" : "Enviar", "Unable to update this external storage config. {statusMessage}" : "Não é possível atualizar esta configuração de armazenamento externo. {statusMessage}", "New configuration successfully saved" : "Nova configuração salva com sucesso", + "Enter missing credentials" : "Digite as credenciais ausentes", "There was an error with this external storage." : "Ocorreu um erro com este armazenamento externo.", "We were unable to check the external storage {basename}" : "Não foi possível verificar o armazenamento externo {basename}", "Examine this faulty external storage configuration" : "Examine esta configuração de armazenamento externo com falha", diff --git a/apps/files_external/l10n/pt_PT.js b/apps/files_external/l10n/pt_PT.js index c52a1b73d8f..75347f96efa 100644 --- a/apps/files_external/l10n/pt_PT.js +++ b/apps/files_external/l10n/pt_PT.js @@ -85,6 +85,7 @@ OC.L10N.register( "The FTP support in PHP is not enabled or installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "O suporteF TP em PHP não está activo ou instalado. Não é possível montar %s. Por favor peça ao seu administrador de sistema que o instale.", "External storage" : "Armazenamento Externo", "External storage support" : "Suporte para armazenamento externo", + "Submit" : "Submeter", "External mount error" : "Erro de montagem externa", "Storage type" : "Tipo de Armazenamento", "Unknown" : "Desconhecido", diff --git a/apps/files_external/l10n/pt_PT.json b/apps/files_external/l10n/pt_PT.json index e4889a59d93..b06bc2ae813 100644 --- a/apps/files_external/l10n/pt_PT.json +++ b/apps/files_external/l10n/pt_PT.json @@ -83,6 +83,7 @@ "The FTP support in PHP is not enabled or installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "O suporteF TP em PHP não está activo ou instalado. Não é possível montar %s. Por favor peça ao seu administrador de sistema que o instale.", "External storage" : "Armazenamento Externo", "External storage support" : "Suporte para armazenamento externo", + "Submit" : "Submeter", "External mount error" : "Erro de montagem externa", "Storage type" : "Tipo de Armazenamento", "Unknown" : "Desconhecido", diff --git a/apps/files_external/l10n/ru.js b/apps/files_external/l10n/ru.js index 57e173bc144..46fa77b579d 100644 --- a/apps/files_external/l10n/ru.js +++ b/apps/files_external/l10n/ru.js @@ -115,9 +115,10 @@ OC.L10N.register( "External storage support" : "Поддержка внешних хранилищ", "Adds basic external storage support" : "Базовая поддержка внешних хранилищ", "This application enables administrators to configure connections to external storage providers, such as FTP servers, S3 or SWIFT object stores, other Nextcloud servers, WebDAV servers, and more. Administration can choose which types of storage to enable and can mount these storage locations for an account, a group, or the entire system. Users will see a new folder appear in their root Nextcloud directory, which they can access and use like any other Nextcloud folder. External storage also allows people to share files stored in these external locations. In these cases, the credentials for the owner of the file are used when the recipient requests the file from external storage, thereby ensuring that the recipient can access the shared file.\n\nExternal storage can be configured using the GUI or at the command line. This second option provides the administration with more flexibility for configuring bulk external storage mounts and setting mount priorities. More information is available in the external storage GUI documentation and the external storage Configuration File documentation." : "Это приложение позволяет администраторам настраивать подключения к внешним поставщикам хранилища, таким как FTP-серверы, хранилища объектов S3 или SWIFT, другие серверы Nextcloud, WebDAV-серверы и многое другое. Администрация может выбрать, какие типы хранилищ включить, и подключить эти хранилища для учетной записи, группы или всей системы. Пользователи увидят, что в их корневом каталоге Nextcloud появится новая папка, доступ к которой они смогут получить и использовать, как и любую другую папку Nextcloud. Внешнее хранилище также позволяет пользователям предоставлять общий доступ к файлам, хранящимся в этих внешних хранилищах. В этих случаях учетные данные владельца файла используются, когда получатель запрашивает файл из внешнего хранилища, тем самым гарантируя, что получатель сможет получить доступ к общему файлу.\n \n Внешнее хранилище можно настроить с помощью графического интерфейса пользователя или в командной строке. Этот второй вариант предоставляет администрации больше гибкости при настройке массового подключения внешнего хранилища и установлении приоритетов подключения. Дополнительная информация доступна в документации по графическому интерфейсу внешнего хранилища и документации по файлу конфигурации внешнего хранилища.", - "Enter missing credentials" : "Ввод пропущенных учётных данных", + "Submit" : "Отправить ответ", "Unable to update this external storage config. {statusMessage}" : "Не удалось обновить эту конфигурацию внешних хранилищ. {statusMessage}", "New configuration successfully saved" : "Новая конфигурация успешно сохранена", + "Enter missing credentials" : "Ввод пропущенных учётных данных", "There was an error with this external storage." : "Произошла ошибка с этим внешним хранилищем.", "We were unable to check the external storage {basename}" : "Нам не удалось проверить внешнее хранилище {basename}", "Examine this faulty external storage configuration" : "Проверьте эту конфигурацию внешнего хранилища, она содержит ошибки", @@ -141,7 +142,7 @@ OC.L10N.register( "Configuration" : "Конфигурация", "Available for" : "Доступно для", "Add storage" : "Добавить хранилище", - "All people" : "Все пользователи", + "All people" : "Все люди", "Advanced settings" : "Расширенные настройки", "Allow people to mount external storage" : "Разрешить пользователям подключать внешнее хранилище", "Global credentials can be used to authenticate with multiple external storages that have the same credentials." : "Глобальные учетные данные могут использоваться для аутентификации с несколькими внешними хранилищами, которые имеют одинаковые учетные данные.", diff --git a/apps/files_external/l10n/ru.json b/apps/files_external/l10n/ru.json index 9f763053704..006adc76117 100644 --- a/apps/files_external/l10n/ru.json +++ b/apps/files_external/l10n/ru.json @@ -113,9 +113,10 @@ "External storage support" : "Поддержка внешних хранилищ", "Adds basic external storage support" : "Базовая поддержка внешних хранилищ", "This application enables administrators to configure connections to external storage providers, such as FTP servers, S3 or SWIFT object stores, other Nextcloud servers, WebDAV servers, and more. Administration can choose which types of storage to enable and can mount these storage locations for an account, a group, or the entire system. Users will see a new folder appear in their root Nextcloud directory, which they can access and use like any other Nextcloud folder. External storage also allows people to share files stored in these external locations. In these cases, the credentials for the owner of the file are used when the recipient requests the file from external storage, thereby ensuring that the recipient can access the shared file.\n\nExternal storage can be configured using the GUI or at the command line. This second option provides the administration with more flexibility for configuring bulk external storage mounts and setting mount priorities. More information is available in the external storage GUI documentation and the external storage Configuration File documentation." : "Это приложение позволяет администраторам настраивать подключения к внешним поставщикам хранилища, таким как FTP-серверы, хранилища объектов S3 или SWIFT, другие серверы Nextcloud, WebDAV-серверы и многое другое. Администрация может выбрать, какие типы хранилищ включить, и подключить эти хранилища для учетной записи, группы или всей системы. Пользователи увидят, что в их корневом каталоге Nextcloud появится новая папка, доступ к которой они смогут получить и использовать, как и любую другую папку Nextcloud. Внешнее хранилище также позволяет пользователям предоставлять общий доступ к файлам, хранящимся в этих внешних хранилищах. В этих случаях учетные данные владельца файла используются, когда получатель запрашивает файл из внешнего хранилища, тем самым гарантируя, что получатель сможет получить доступ к общему файлу.\n \n Внешнее хранилище можно настроить с помощью графического интерфейса пользователя или в командной строке. Этот второй вариант предоставляет администрации больше гибкости при настройке массового подключения внешнего хранилища и установлении приоритетов подключения. Дополнительная информация доступна в документации по графическому интерфейсу внешнего хранилища и документации по файлу конфигурации внешнего хранилища.", - "Enter missing credentials" : "Ввод пропущенных учётных данных", + "Submit" : "Отправить ответ", "Unable to update this external storage config. {statusMessage}" : "Не удалось обновить эту конфигурацию внешних хранилищ. {statusMessage}", "New configuration successfully saved" : "Новая конфигурация успешно сохранена", + "Enter missing credentials" : "Ввод пропущенных учётных данных", "There was an error with this external storage." : "Произошла ошибка с этим внешним хранилищем.", "We were unable to check the external storage {basename}" : "Нам не удалось проверить внешнее хранилище {basename}", "Examine this faulty external storage configuration" : "Проверьте эту конфигурацию внешнего хранилища, она содержит ошибки", @@ -139,7 +140,7 @@ "Configuration" : "Конфигурация", "Available for" : "Доступно для", "Add storage" : "Добавить хранилище", - "All people" : "Все пользователи", + "All people" : "Все люди", "Advanced settings" : "Расширенные настройки", "Allow people to mount external storage" : "Разрешить пользователям подключать внешнее хранилище", "Global credentials can be used to authenticate with multiple external storages that have the same credentials." : "Глобальные учетные данные могут использоваться для аутентификации с несколькими внешними хранилищами, которые имеют одинаковые учетные данные.", diff --git a/apps/files_external/l10n/sc.js b/apps/files_external/l10n/sc.js index 552e3b64dc8..e6bb0e3040e 100644 --- a/apps/files_external/l10n/sc.js +++ b/apps/files_external/l10n/sc.js @@ -96,6 +96,7 @@ OC.L10N.register( "External storage" : "Archiviatzione de foras", "External storage support" : "Suportu archiviatzione de foras", "Adds basic external storage support" : "Agiunghet suportu de base pro archiviatziones de foras", + "Submit" : "Imbia", "Open in Files" : "Aberi in Archìvios", "External mount error" : "Errore de montàgiu esternu", "Storage type" : "Genia de archiviatzione", diff --git a/apps/files_external/l10n/sc.json b/apps/files_external/l10n/sc.json index 3aff8984fda..c9e60bb36bd 100644 --- a/apps/files_external/l10n/sc.json +++ b/apps/files_external/l10n/sc.json @@ -94,6 +94,7 @@ "External storage" : "Archiviatzione de foras", "External storage support" : "Suportu archiviatzione de foras", "Adds basic external storage support" : "Agiunghet suportu de base pro archiviatziones de foras", + "Submit" : "Imbia", "Open in Files" : "Aberi in Archìvios", "External mount error" : "Errore de montàgiu esternu", "Storage type" : "Genia de archiviatzione", diff --git a/apps/files_external/l10n/sk.js b/apps/files_external/l10n/sk.js index 7f05f1efcd1..02b731ddb01 100644 --- a/apps/files_external/l10n/sk.js +++ b/apps/files_external/l10n/sk.js @@ -114,9 +114,10 @@ OC.L10N.register( "External storage support" : "Podpora externého úložiska", "Adds basic external storage support" : "Pridáva základnú podporu externého úložiska", "This application enables administrators to configure connections to external storage providers, such as FTP servers, S3 or SWIFT object stores, other Nextcloud servers, WebDAV servers, and more. Administration can choose which types of storage to enable and can mount these storage locations for an account, a group, or the entire system. Users will see a new folder appear in their root Nextcloud directory, which they can access and use like any other Nextcloud folder. External storage also allows people to share files stored in these external locations. In these cases, the credentials for the owner of the file are used when the recipient requests the file from external storage, thereby ensuring that the recipient can access the shared file.\n\nExternal storage can be configured using the GUI or at the command line. This second option provides the administration with more flexibility for configuring bulk external storage mounts and setting mount priorities. More information is available in the external storage GUI documentation and the external storage Configuration File documentation." : "Táto aplikácia umožňuje správcom nastaviť prepojenia na poskytovateľov externých úložísk, ako napríklad servery FTP, S3 alebo SWIFT objektové úložiská, iné Nextcloudu servery, WebDAV servery a pod. Správci môžu zvoliť, ktoré typy úložísk zapnúť a prípadne ich pripojiť pre účet, skupinu alebo celý systém. Užívatelia uvidia nový priečinok v ich koreňovom Nextcloud priečinku, do ktorého môžu pristupovať a používať ako akýkoľvek iný priečinok v Nextcloude. Externé úložisko tiež umožňuje ľuďom sprístupňovať v ňom uložené súbory. V takých prípadoch sa použijú prihlasovacie údaje vlastníka súboru keď si príjemca vyžiada súbor z externého úložiska, čím je zaistené, že príjemca môže pristupovať k sprístupnenému súboru.\n\nExterné úložisko je možné nastaviť pomocou web rozhrania alebo z príkazového riadku. Druhá možnosť poskytuje správcom väčšie možnosti prispôsobenia pre nastavenie viac typov pripojení externých úložísk a nastavenia priorít pre pripájanie. Viac informácií je k dispozícii v dokumentácii k externým úložiskám vo web rozhraní a dokumentácii k súboru s nastaveniami pre externé úložiská.", - "Enter missing credentials" : "Zadajte chýbajúce prihlasovacie údaje", + "Submit" : "Odoslať", "Unable to update this external storage config. {statusMessage}" : "Nepodarilo sa aktualizovať konfiguráciu externého úložiska. {statusMessage}", "New configuration successfully saved" : "Nová konfigurácia úspešne uložená", + "Enter missing credentials" : "Zadajte chýbajúce prihlasovacie údaje", "There was an error with this external storage." : "Vyskytla sa chyba s externým úložiskom.", "We were unable to check the external storage {basename}" : "Nepodarilo sa nám skontrolovať externé úložisko {basename}", "Examine this faulty external storage configuration" : "Skúste preskúmať chybnú konfiguráciu externého úložiska", diff --git a/apps/files_external/l10n/sk.json b/apps/files_external/l10n/sk.json index 554661ffe99..8ecf4e5177d 100644 --- a/apps/files_external/l10n/sk.json +++ b/apps/files_external/l10n/sk.json @@ -112,9 +112,10 @@ "External storage support" : "Podpora externého úložiska", "Adds basic external storage support" : "Pridáva základnú podporu externého úložiska", "This application enables administrators to configure connections to external storage providers, such as FTP servers, S3 or SWIFT object stores, other Nextcloud servers, WebDAV servers, and more. Administration can choose which types of storage to enable and can mount these storage locations for an account, a group, or the entire system. Users will see a new folder appear in their root Nextcloud directory, which they can access and use like any other Nextcloud folder. External storage also allows people to share files stored in these external locations. In these cases, the credentials for the owner of the file are used when the recipient requests the file from external storage, thereby ensuring that the recipient can access the shared file.\n\nExternal storage can be configured using the GUI or at the command line. This second option provides the administration with more flexibility for configuring bulk external storage mounts and setting mount priorities. More information is available in the external storage GUI documentation and the external storage Configuration File documentation." : "Táto aplikácia umožňuje správcom nastaviť prepojenia na poskytovateľov externých úložísk, ako napríklad servery FTP, S3 alebo SWIFT objektové úložiská, iné Nextcloudu servery, WebDAV servery a pod. Správci môžu zvoliť, ktoré typy úložísk zapnúť a prípadne ich pripojiť pre účet, skupinu alebo celý systém. Užívatelia uvidia nový priečinok v ich koreňovom Nextcloud priečinku, do ktorého môžu pristupovať a používať ako akýkoľvek iný priečinok v Nextcloude. Externé úložisko tiež umožňuje ľuďom sprístupňovať v ňom uložené súbory. V takých prípadoch sa použijú prihlasovacie údaje vlastníka súboru keď si príjemca vyžiada súbor z externého úložiska, čím je zaistené, že príjemca môže pristupovať k sprístupnenému súboru.\n\nExterné úložisko je možné nastaviť pomocou web rozhrania alebo z príkazového riadku. Druhá možnosť poskytuje správcom väčšie možnosti prispôsobenia pre nastavenie viac typov pripojení externých úložísk a nastavenia priorít pre pripájanie. Viac informácií je k dispozícii v dokumentácii k externým úložiskám vo web rozhraní a dokumentácii k súboru s nastaveniami pre externé úložiská.", - "Enter missing credentials" : "Zadajte chýbajúce prihlasovacie údaje", + "Submit" : "Odoslať", "Unable to update this external storage config. {statusMessage}" : "Nepodarilo sa aktualizovať konfiguráciu externého úložiska. {statusMessage}", "New configuration successfully saved" : "Nová konfigurácia úspešne uložená", + "Enter missing credentials" : "Zadajte chýbajúce prihlasovacie údaje", "There was an error with this external storage." : "Vyskytla sa chyba s externým úložiskom.", "We were unable to check the external storage {basename}" : "Nepodarilo sa nám skontrolovať externé úložisko {basename}", "Examine this faulty external storage configuration" : "Skúste preskúmať chybnú konfiguráciu externého úložiska", diff --git a/apps/files_external/l10n/sl.js b/apps/files_external/l10n/sl.js index 885608eb53e..f6cf415eb33 100644 --- a/apps/files_external/l10n/sl.js +++ b/apps/files_external/l10n/sl.js @@ -103,8 +103,9 @@ OC.L10N.register( "External storage" : "Zunanja shramba", "External storage support" : "Podpora zunanji dhrambi", "Adds basic external storage support" : "Doda osnovno zunanjo podporo shrambe", - "Enter missing credentials" : "Vpiši manjkajoča poverila", + "Submit" : "Pošlji", "New configuration successfully saved" : "Nove nastavitve so uspešno shranjene", + "Enter missing credentials" : "Vpiši manjkajoča poverila", "There was an error with this external storage." : "Prišlo je do napake zunanje shrambe.", "Open in Files" : "Odpri v mapi", "External mount error" : "Notranja napaka priklopa", diff --git a/apps/files_external/l10n/sl.json b/apps/files_external/l10n/sl.json index 3807f76f170..c47b8bec8cc 100644 --- a/apps/files_external/l10n/sl.json +++ b/apps/files_external/l10n/sl.json @@ -101,8 +101,9 @@ "External storage" : "Zunanja shramba", "External storage support" : "Podpora zunanji dhrambi", "Adds basic external storage support" : "Doda osnovno zunanjo podporo shrambe", - "Enter missing credentials" : "Vpiši manjkajoča poverila", + "Submit" : "Pošlji", "New configuration successfully saved" : "Nove nastavitve so uspešno shranjene", + "Enter missing credentials" : "Vpiši manjkajoča poverila", "There was an error with this external storage." : "Prišlo je do napake zunanje shrambe.", "Open in Files" : "Odpri v mapi", "External mount error" : "Notranja napaka priklopa", diff --git a/apps/files_external/l10n/sq.js b/apps/files_external/l10n/sq.js index eb1bb7fce3b..90c054b8e46 100644 --- a/apps/files_external/l10n/sq.js +++ b/apps/files_external/l10n/sq.js @@ -81,6 +81,7 @@ OC.L10N.register( "The FTP support in PHP is not enabled or installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "Mbështetja e FTP në PHP nuk është e aktivizuar ose instaluar.Lidhja e %s nuk është e mundur.Ju lutem kërkojini administratorit të sistemit tuaj që ta instalojë.", "External storage" : "Depozitë e jashtme", "External storage support" : "Suport i kujtesë së jashtme", + "Submit" : "Dërgo", "External mount error" : "Gabim i jashtëm montimi", "Storage type" : "Lloj depozite", "Unknown" : "I panjohur", diff --git a/apps/files_external/l10n/sq.json b/apps/files_external/l10n/sq.json index 18e60b1312a..6483c455ef1 100644 --- a/apps/files_external/l10n/sq.json +++ b/apps/files_external/l10n/sq.json @@ -79,6 +79,7 @@ "The FTP support in PHP is not enabled or installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "Mbështetja e FTP në PHP nuk është e aktivizuar ose instaluar.Lidhja e %s nuk është e mundur.Ju lutem kërkojini administratorit të sistemit tuaj që ta instalojë.", "External storage" : "Depozitë e jashtme", "External storage support" : "Suport i kujtesë së jashtme", + "Submit" : "Dërgo", "External mount error" : "Gabim i jashtëm montimi", "Storage type" : "Lloj depozite", "Unknown" : "I panjohur", diff --git a/apps/files_external/l10n/sr.js b/apps/files_external/l10n/sr.js index 0f87607d4bd..c95fb3d50b7 100644 --- a/apps/files_external/l10n/sr.js +++ b/apps/files_external/l10n/sr.js @@ -114,9 +114,10 @@ OC.L10N.register( "External storage support" : "Подршка за спољашње складиште", "Adds basic external storage support" : "Додаје основу подршку за спољна складишта", "This application enables administrators to configure connections to external storage providers, such as FTP servers, S3 or SWIFT object stores, other Nextcloud servers, WebDAV servers, and more. Administration can choose which types of storage to enable and can mount these storage locations for an account, a group, or the entire system. Users will see a new folder appear in their root Nextcloud directory, which they can access and use like any other Nextcloud folder. External storage also allows people to share files stored in these external locations. In these cases, the credentials for the owner of the file are used when the recipient requests the file from external storage, thereby ensuring that the recipient can access the shared file.\n\nExternal storage can be configured using the GUI or at the command line. This second option provides the administration with more flexibility for configuring bulk external storage mounts and setting mount priorities. More information is available in the external storage GUI documentation and the external storage Configuration File documentation." : "Ова апликација омогућава администраторима да подесе конекције на спољашња складишта, као што су FTP сервери, S3 или SWIFT објектна складишта, други Nextcloud сервери, WebDAV сервери и још много других. Администрација може да одабере које типове складишта жели да се омогући и може да монтира локације ових складишта посебно за налог, за групу или за цео систем. Корисници ће видети нову фасциклу која ће се појавити у кореном директоријуму, којој могу да приступају и да је користе као и било коју другу Nextcloud фасциклу. Спољашња складишта такође омогућавају особама и да деле фајлове смештене на овим спољашњим локацијама. У овим случајевима, када неко затражи приступ фајлу из спољашњег складишта користе се акредитиви власника фајла, омогућавајући тако да прималац може да приступи дељеном фајлу.\n\nСпољашње складиште се може конфигурисати графичким интерфејсом или командном линијом. Друга опција администрацији пружа више флексибилности када треба монтирати велики број складишта и подесити велики број приоритета монтирања. Више информација је доступно у ГКИ документацији спољашњег складишта и у документацији Конфигурационог Фајла спољашњег складишта.", - "Enter missing credentials" : "Унесите корисничке акредитиве који недостају", + "Submit" : "Пошаљи", "Unable to update this external storage config. {statusMessage}" : "Не може да се ажурира конфигурација овог спољног складишта. {statusMessage}", "New configuration successfully saved" : "Нова конфигурација је успешно сачувана", + "Enter missing credentials" : "Унесите корисничке акредитиве који недостају", "There was an error with this external storage." : "Дошло је до грешке у вези са овим спољним складиштем.", "We were unable to check the external storage {basename}" : "Нисмо успели да проверимо спољно складиште {basename}", "Examine this faulty external storage configuration" : "Испитајте ову неисправну конфигурацију спољног складишта", diff --git a/apps/files_external/l10n/sr.json b/apps/files_external/l10n/sr.json index 35a5560f0ec..dce03efa58b 100644 --- a/apps/files_external/l10n/sr.json +++ b/apps/files_external/l10n/sr.json @@ -112,9 +112,10 @@ "External storage support" : "Подршка за спољашње складиште", "Adds basic external storage support" : "Додаје основу подршку за спољна складишта", "This application enables administrators to configure connections to external storage providers, such as FTP servers, S3 or SWIFT object stores, other Nextcloud servers, WebDAV servers, and more. Administration can choose which types of storage to enable and can mount these storage locations for an account, a group, or the entire system. Users will see a new folder appear in their root Nextcloud directory, which they can access and use like any other Nextcloud folder. External storage also allows people to share files stored in these external locations. In these cases, the credentials for the owner of the file are used when the recipient requests the file from external storage, thereby ensuring that the recipient can access the shared file.\n\nExternal storage can be configured using the GUI or at the command line. This second option provides the administration with more flexibility for configuring bulk external storage mounts and setting mount priorities. More information is available in the external storage GUI documentation and the external storage Configuration File documentation." : "Ова апликација омогућава администраторима да подесе конекције на спољашња складишта, као што су FTP сервери, S3 или SWIFT објектна складишта, други Nextcloud сервери, WebDAV сервери и још много других. Администрација може да одабере које типове складишта жели да се омогући и може да монтира локације ових складишта посебно за налог, за групу или за цео систем. Корисници ће видети нову фасциклу која ће се појавити у кореном директоријуму, којој могу да приступају и да је користе као и било коју другу Nextcloud фасциклу. Спољашња складишта такође омогућавају особама и да деле фајлове смештене на овим спољашњим локацијама. У овим случајевима, када неко затражи приступ фајлу из спољашњег складишта користе се акредитиви власника фајла, омогућавајући тако да прималац може да приступи дељеном фајлу.\n\nСпољашње складиште се може конфигурисати графичким интерфејсом или командном линијом. Друга опција администрацији пружа више флексибилности када треба монтирати велики број складишта и подесити велики број приоритета монтирања. Више информација је доступно у ГКИ документацији спољашњег складишта и у документацији Конфигурационог Фајла спољашњег складишта.", - "Enter missing credentials" : "Унесите корисничке акредитиве који недостају", + "Submit" : "Пошаљи", "Unable to update this external storage config. {statusMessage}" : "Не може да се ажурира конфигурација овог спољног складишта. {statusMessage}", "New configuration successfully saved" : "Нова конфигурација је успешно сачувана", + "Enter missing credentials" : "Унесите корисничке акредитиве који недостају", "There was an error with this external storage." : "Дошло је до грешке у вези са овим спољним складиштем.", "We were unable to check the external storage {basename}" : "Нисмо успели да проверимо спољно складиште {basename}", "Examine this faulty external storage configuration" : "Испитајте ову неисправну конфигурацију спољног складишта", diff --git a/apps/files_external/l10n/sv.js b/apps/files_external/l10n/sv.js index 1968bb0b640..aceaa76c8e0 100644 --- a/apps/files_external/l10n/sv.js +++ b/apps/files_external/l10n/sv.js @@ -115,9 +115,10 @@ OC.L10N.register( "External storage support" : "Stöd för extern lagring", "Adds basic external storage support" : "Lägger till grundläggande stöd för extern lagring", "This application enables administrators to configure connections to external storage providers, such as FTP servers, S3 or SWIFT object stores, other Nextcloud servers, WebDAV servers, and more. Administration can choose which types of storage to enable and can mount these storage locations for an account, a group, or the entire system. Users will see a new folder appear in their root Nextcloud directory, which they can access and use like any other Nextcloud folder. External storage also allows people to share files stored in these external locations. In these cases, the credentials for the owner of the file are used when the recipient requests the file from external storage, thereby ensuring that the recipient can access the shared file.\n\nExternal storage can be configured using the GUI or at the command line. This second option provides the administration with more flexibility for configuring bulk external storage mounts and setting mount priorities. More information is available in the external storage GUI documentation and the external storage Configuration File documentation." : "Denna applikation tillåter serveradministratörer konfigurera anslutningar till externa lagringsleverantörer, så som FTP-servrar, S3 eller SWIFT -servrar, andra Nextcloud-servrar, WebDAV-servrar, med flera. Administrationen kan välja vilka typer av lagring som är aktiverade och kan montera dessa lagringsplatser för ett konto, en grupp eller för hela servern. Användare kommer se en ny mapp dyka upp i deras dokument-rot, vilken de kan använda som en vanlig mapp. Extern lagring tillåter också delning av filer lagrade i dessa externa platser. I de fallen används fil-ägarens uppgifter när mottagaren begär filen från den externa lagringen, vilket på så vis garanterar att mottagaren får tillgång till den delade filen.\n\nExtern lagring kan konfigureras genom det grafiska gränssnittet eller kommandoraden. Det sistnämnda alternativet erbjuder administrationen mer flexibilitet vid konfigurering av flertalet lagringsplatser samt monteringsprioriteter. Mer information finns tillgänglig i dokumentationen för användargränssnittet samt för konfigurationsfilen.", - "Enter missing credentials" : "Ange saknade inloggningsuppgifter", + "Submit" : "Skicka", "Unable to update this external storage config. {statusMessage}" : "Det gick inte att uppdatera denna externa lagringskonfiguration. {statusMessage}", "New configuration successfully saved" : "Ny konfiguration har sparats", + "Enter missing credentials" : "Ange saknade inloggningsuppgifter", "There was an error with this external storage." : "Det uppstod ett fel med denna externa lagring.", "We were unable to check the external storage {basename}" : "Vi kunde inte kontrollera den externa lagringen {basename}", "Examine this faulty external storage configuration" : "Undersök denna felaktiga externa lagringskonfiguration", diff --git a/apps/files_external/l10n/sv.json b/apps/files_external/l10n/sv.json index ce6dfae11b4..8770c22d81f 100644 --- a/apps/files_external/l10n/sv.json +++ b/apps/files_external/l10n/sv.json @@ -113,9 +113,10 @@ "External storage support" : "Stöd för extern lagring", "Adds basic external storage support" : "Lägger till grundläggande stöd för extern lagring", "This application enables administrators to configure connections to external storage providers, such as FTP servers, S3 or SWIFT object stores, other Nextcloud servers, WebDAV servers, and more. Administration can choose which types of storage to enable and can mount these storage locations for an account, a group, or the entire system. Users will see a new folder appear in their root Nextcloud directory, which they can access and use like any other Nextcloud folder. External storage also allows people to share files stored in these external locations. In these cases, the credentials for the owner of the file are used when the recipient requests the file from external storage, thereby ensuring that the recipient can access the shared file.\n\nExternal storage can be configured using the GUI or at the command line. This second option provides the administration with more flexibility for configuring bulk external storage mounts and setting mount priorities. More information is available in the external storage GUI documentation and the external storage Configuration File documentation." : "Denna applikation tillåter serveradministratörer konfigurera anslutningar till externa lagringsleverantörer, så som FTP-servrar, S3 eller SWIFT -servrar, andra Nextcloud-servrar, WebDAV-servrar, med flera. Administrationen kan välja vilka typer av lagring som är aktiverade och kan montera dessa lagringsplatser för ett konto, en grupp eller för hela servern. Användare kommer se en ny mapp dyka upp i deras dokument-rot, vilken de kan använda som en vanlig mapp. Extern lagring tillåter också delning av filer lagrade i dessa externa platser. I de fallen används fil-ägarens uppgifter när mottagaren begär filen från den externa lagringen, vilket på så vis garanterar att mottagaren får tillgång till den delade filen.\n\nExtern lagring kan konfigureras genom det grafiska gränssnittet eller kommandoraden. Det sistnämnda alternativet erbjuder administrationen mer flexibilitet vid konfigurering av flertalet lagringsplatser samt monteringsprioriteter. Mer information finns tillgänglig i dokumentationen för användargränssnittet samt för konfigurationsfilen.", - "Enter missing credentials" : "Ange saknade inloggningsuppgifter", + "Submit" : "Skicka", "Unable to update this external storage config. {statusMessage}" : "Det gick inte att uppdatera denna externa lagringskonfiguration. {statusMessage}", "New configuration successfully saved" : "Ny konfiguration har sparats", + "Enter missing credentials" : "Ange saknade inloggningsuppgifter", "There was an error with this external storage." : "Det uppstod ett fel med denna externa lagring.", "We were unable to check the external storage {basename}" : "Vi kunde inte kontrollera den externa lagringen {basename}", "Examine this faulty external storage configuration" : "Undersök denna felaktiga externa lagringskonfiguration", diff --git a/apps/files_external/l10n/th.js b/apps/files_external/l10n/th.js index 78ee2776d56..0de4a669a6f 100644 --- a/apps/files_external/l10n/th.js +++ b/apps/files_external/l10n/th.js @@ -73,6 +73,7 @@ OC.L10N.register( "Service name" : "ชื่อบริการ", "Request timeout (seconds)" : "หมดเวลาคำขอ (วินาที)", "External storage" : "พื้นที่จัดเก็บข้อมูลภายนอก", + "Submit" : "ส่ง", "External mount error" : "ข้อผิดพลาดจุดเชื่อมต่อภายนอก", "Storage type" : "ชนิดการจัดเก็บข้อมูล", "Unknown" : "ไม่ทราบ", diff --git a/apps/files_external/l10n/th.json b/apps/files_external/l10n/th.json index 5620e908a7d..b8b9a5d2ec9 100644 --- a/apps/files_external/l10n/th.json +++ b/apps/files_external/l10n/th.json @@ -71,6 +71,7 @@ "Service name" : "ชื่อบริการ", "Request timeout (seconds)" : "หมดเวลาคำขอ (วินาที)", "External storage" : "พื้นที่จัดเก็บข้อมูลภายนอก", + "Submit" : "ส่ง", "External mount error" : "ข้อผิดพลาดจุดเชื่อมต่อภายนอก", "Storage type" : "ชนิดการจัดเก็บข้อมูล", "Unknown" : "ไม่ทราบ", diff --git a/apps/files_external/l10n/tr.js b/apps/files_external/l10n/tr.js index 57c22c593fb..b566570aa0c 100644 --- a/apps/files_external/l10n/tr.js +++ b/apps/files_external/l10n/tr.js @@ -115,9 +115,14 @@ OC.L10N.register( "External storage support" : "Dış depolama desteği", "Adds basic external storage support" : "Temel dış depolama desteği ekler", "This application enables administrators to configure connections to external storage providers, such as FTP servers, S3 or SWIFT object stores, other Nextcloud servers, WebDAV servers, and more. Administration can choose which types of storage to enable and can mount these storage locations for an account, a group, or the entire system. Users will see a new folder appear in their root Nextcloud directory, which they can access and use like any other Nextcloud folder. External storage also allows people to share files stored in these external locations. In these cases, the credentials for the owner of the file are used when the recipient requests the file from external storage, thereby ensuring that the recipient can access the shared file.\n\nExternal storage can be configured using the GUI or at the command line. This second option provides the administration with more flexibility for configuring bulk external storage mounts and setting mount priorities. More information is available in the external storage GUI documentation and the external storage Configuration File documentation." : "Bu uygulama yöneticilerin FTP sunucular, S3 ya da SWIFT nesne mağazaları, diğer Nextcloud sunucuları ve WebDAV sunucuları gibi çeşitli dış depolama hizmeti sağlayıcıları ile bağlantı kurmasını sağlar. Yöneticiler, etkinleştirmek istedikleri depolama türünü seçebilir ve bu depolama konumlarını belirli bir hesap, bir grup ya da tüm sistem için ekleyebilir. Kullanıcılar bağlanan depolamayı kök Nextcloud klasörü altında yeni bir klasör olarak görebilir ve diğer Nextcloud klasörleri gibi erişebilir. Dış depolama, bu konumlarda depolanan dosyaların kişiler tarafından paylaşılmasına da izin verir. Bu durumda alıcıların dış dosyaya erişebileceğinden emin olmak için yapılan dosya erişimi isteklerinde, dosya sahibinin kimlik doğrulama bilgileri kullanılır.\n\nDış depolama yapılandırması grafik arayüzden ya da komut satırından yapılabilir. Komut satırı seçeneğinde, yöneticiler için toplu dış depolama bağlama ve bağlama noktası öncelikleri gibi esnek yapılandırma seçenekleri bulunur. Ayrıntılı bilgi almak için dış depolama grafik arayüzü belgeleri ile dış depolama yapılandırma dosyası belgelerine bakabilirsiniz.", - "Enter missing credentials" : "Eksik kimlik doğrulama bilgilerini yazın", + "Storage credentials" : "Depolama alanı kimlik doğrulama bilgileri", + "To access the storage, you need to provide the authentification informations." : "Depolama alanına erişebilmek için kimlik doğrulama bilgilerini vermeniz gerekir.", + "Enter the storage login" : "Depolama alanı kullanıcı adını yazın", + "Enter the storage password" : "Depolama alanı parolasını yazın", + "Submit" : "Gönder", "Unable to update this external storage config. {statusMessage}" : "Bu dış depolama birimi yapılandırması güncellenemedi. {statusMessage}", "New configuration successfully saved" : "Yeni yapılandırma kaydedildi", + "Enter missing credentials" : "Eksik kimlik doğrulama bilgilerini yazın", "There was an error with this external storage." : " Bu dış depolama birimi ile ilgili bir sorun çıktı.", "We were unable to check the external storage {basename}" : "{basename} dış depolama birimi denetlenemedi", "Examine this faulty external storage configuration" : "Bu sorunlu dış depolama birimi yapılandırmasını gözden geçirin", diff --git a/apps/files_external/l10n/tr.json b/apps/files_external/l10n/tr.json index e0f71a8360d..1541a4d0526 100644 --- a/apps/files_external/l10n/tr.json +++ b/apps/files_external/l10n/tr.json @@ -113,9 +113,14 @@ "External storage support" : "Dış depolama desteği", "Adds basic external storage support" : "Temel dış depolama desteği ekler", "This application enables administrators to configure connections to external storage providers, such as FTP servers, S3 or SWIFT object stores, other Nextcloud servers, WebDAV servers, and more. Administration can choose which types of storage to enable and can mount these storage locations for an account, a group, or the entire system. Users will see a new folder appear in their root Nextcloud directory, which they can access and use like any other Nextcloud folder. External storage also allows people to share files stored in these external locations. In these cases, the credentials for the owner of the file are used when the recipient requests the file from external storage, thereby ensuring that the recipient can access the shared file.\n\nExternal storage can be configured using the GUI or at the command line. This second option provides the administration with more flexibility for configuring bulk external storage mounts and setting mount priorities. More information is available in the external storage GUI documentation and the external storage Configuration File documentation." : "Bu uygulama yöneticilerin FTP sunucular, S3 ya da SWIFT nesne mağazaları, diğer Nextcloud sunucuları ve WebDAV sunucuları gibi çeşitli dış depolama hizmeti sağlayıcıları ile bağlantı kurmasını sağlar. Yöneticiler, etkinleştirmek istedikleri depolama türünü seçebilir ve bu depolama konumlarını belirli bir hesap, bir grup ya da tüm sistem için ekleyebilir. Kullanıcılar bağlanan depolamayı kök Nextcloud klasörü altında yeni bir klasör olarak görebilir ve diğer Nextcloud klasörleri gibi erişebilir. Dış depolama, bu konumlarda depolanan dosyaların kişiler tarafından paylaşılmasına da izin verir. Bu durumda alıcıların dış dosyaya erişebileceğinden emin olmak için yapılan dosya erişimi isteklerinde, dosya sahibinin kimlik doğrulama bilgileri kullanılır.\n\nDış depolama yapılandırması grafik arayüzden ya da komut satırından yapılabilir. Komut satırı seçeneğinde, yöneticiler için toplu dış depolama bağlama ve bağlama noktası öncelikleri gibi esnek yapılandırma seçenekleri bulunur. Ayrıntılı bilgi almak için dış depolama grafik arayüzü belgeleri ile dış depolama yapılandırma dosyası belgelerine bakabilirsiniz.", - "Enter missing credentials" : "Eksik kimlik doğrulama bilgilerini yazın", + "Storage credentials" : "Depolama alanı kimlik doğrulama bilgileri", + "To access the storage, you need to provide the authentification informations." : "Depolama alanına erişebilmek için kimlik doğrulama bilgilerini vermeniz gerekir.", + "Enter the storage login" : "Depolama alanı kullanıcı adını yazın", + "Enter the storage password" : "Depolama alanı parolasını yazın", + "Submit" : "Gönder", "Unable to update this external storage config. {statusMessage}" : "Bu dış depolama birimi yapılandırması güncellenemedi. {statusMessage}", "New configuration successfully saved" : "Yeni yapılandırma kaydedildi", + "Enter missing credentials" : "Eksik kimlik doğrulama bilgilerini yazın", "There was an error with this external storage." : " Bu dış depolama birimi ile ilgili bir sorun çıktı.", "We were unable to check the external storage {basename}" : "{basename} dış depolama birimi denetlenemedi", "Examine this faulty external storage configuration" : "Bu sorunlu dış depolama birimi yapılandırmasını gözden geçirin", diff --git a/apps/files_external/l10n/uk.js b/apps/files_external/l10n/uk.js index 038611871e6..3b2925684d7 100644 --- a/apps/files_external/l10n/uk.js +++ b/apps/files_external/l10n/uk.js @@ -112,9 +112,10 @@ OC.L10N.register( "External storage" : "Зовнішнє сховище", "External storage support" : "Підтримка зовнішнього сховища", "Adds basic external storage support" : "Додає базову підтримку зовнішньої пам’яті", - "Enter missing credentials" : "Зазначте відсутні дані авторизації", + "Submit" : "Відправити", "Unable to update this external storage config. {statusMessage}" : "Не вдалося оновити конфігурацію цього зовнішнього сховища. {statusMessage}", "New configuration successfully saved" : "Нову конфігурацію успішно збережено", + "Enter missing credentials" : "Зазначте відсутні дані авторизації", "There was an error with this external storage." : "З цим зовнішнім сховищем виникла помилка.", "We were unable to check the external storage {basename}" : "Нам не вдалося перевірити зовнішнє сховище {basename}", "Examine this faulty external storage configuration" : "Перевірте цю несправну конфігурацію зовнішнього сховища", diff --git a/apps/files_external/l10n/uk.json b/apps/files_external/l10n/uk.json index be4d587836e..028787c5ba5 100644 --- a/apps/files_external/l10n/uk.json +++ b/apps/files_external/l10n/uk.json @@ -110,9 +110,10 @@ "External storage" : "Зовнішнє сховище", "External storage support" : "Підтримка зовнішнього сховища", "Adds basic external storage support" : "Додає базову підтримку зовнішньої пам’яті", - "Enter missing credentials" : "Зазначте відсутні дані авторизації", + "Submit" : "Відправити", "Unable to update this external storage config. {statusMessage}" : "Не вдалося оновити конфігурацію цього зовнішнього сховища. {statusMessage}", "New configuration successfully saved" : "Нову конфігурацію успішно збережено", + "Enter missing credentials" : "Зазначте відсутні дані авторизації", "There was an error with this external storage." : "З цим зовнішнім сховищем виникла помилка.", "We were unable to check the external storage {basename}" : "Нам не вдалося перевірити зовнішнє сховище {basename}", "Examine this faulty external storage configuration" : "Перевірте цю несправну конфігурацію зовнішнього сховища", diff --git a/apps/files_external/l10n/zh_CN.js b/apps/files_external/l10n/zh_CN.js index afd17d8b437..a24999d910f 100644 --- a/apps/files_external/l10n/zh_CN.js +++ b/apps/files_external/l10n/zh_CN.js @@ -105,9 +105,10 @@ OC.L10N.register( "External storage" : "外部存储", "External storage support" : "外部存储支持", "Adds basic external storage support" : "添加基本的外部存储支持", - "Enter missing credentials" : "输入缺失的认证信息", + "Submit" : "提交", "Unable to update this external storage config. {statusMessage}" : "无法更新此外部存储配置。{statusMessage}", "New configuration successfully saved" : "新配置已成功保存", + "Enter missing credentials" : "输入缺失的认证信息", "There was an error with this external storage." : "此外部存储出现问题", "We were unable to check the external storage {basename}" : "我们无法检查外部存储 {basename}", "Examine this faulty external storage configuration" : "检查此出错的外部存储配置", diff --git a/apps/files_external/l10n/zh_CN.json b/apps/files_external/l10n/zh_CN.json index 874bc5d2fa7..c3ad6ec24f2 100644 --- a/apps/files_external/l10n/zh_CN.json +++ b/apps/files_external/l10n/zh_CN.json @@ -103,9 +103,10 @@ "External storage" : "外部存储", "External storage support" : "外部存储支持", "Adds basic external storage support" : "添加基本的外部存储支持", - "Enter missing credentials" : "输入缺失的认证信息", + "Submit" : "提交", "Unable to update this external storage config. {statusMessage}" : "无法更新此外部存储配置。{statusMessage}", "New configuration successfully saved" : "新配置已成功保存", + "Enter missing credentials" : "输入缺失的认证信息", "There was an error with this external storage." : "此外部存储出现问题", "We were unable to check the external storage {basename}" : "我们无法检查外部存储 {basename}", "Examine this faulty external storage configuration" : "检查此出错的外部存储配置", diff --git a/apps/files_external/l10n/zh_HK.js b/apps/files_external/l10n/zh_HK.js index 9fa4eb682d1..6619ec72a44 100644 --- a/apps/files_external/l10n/zh_HK.js +++ b/apps/files_external/l10n/zh_HK.js @@ -115,9 +115,14 @@ OC.L10N.register( "External storage support" : "外部儲存支援", "Adds basic external storage support" : "增加了基本的外部存儲支援", "This application enables administrators to configure connections to external storage providers, such as FTP servers, S3 or SWIFT object stores, other Nextcloud servers, WebDAV servers, and more. Administration can choose which types of storage to enable and can mount these storage locations for an account, a group, or the entire system. Users will see a new folder appear in their root Nextcloud directory, which they can access and use like any other Nextcloud folder. External storage also allows people to share files stored in these external locations. In these cases, the credentials for the owner of the file are used when the recipient requests the file from external storage, thereby ensuring that the recipient can access the shared file.\n\nExternal storage can be configured using the GUI or at the command line. This second option provides the administration with more flexibility for configuring bulk external storage mounts and setting mount priorities. More information is available in the external storage GUI documentation and the external storage Configuration File documentation." : "此應用程式讓管理員可以設定到外部儲存空間提供者的連線,如 FTP 伺服器、S3 或 SWIFT 物件儲存、其他 Nextcloud 伺服器、WebDAV 伺服器與更多。管理員可以選擇要啟用的儲存空間類型,並可以為使用者、群組或整個系統掛載這些儲存位置。使用者將會在他們的 Nextcloud 根目錄看到一個新的資料夾,他們可以像其他 Nextcloud 資料夾那樣存取並使用該資料夾。外部儲存空間也允許使用者分享儲存在這些外部空間的檔案。在這種情況下,當收件者從外部儲存空間請求檔案時,將使用檔案擁有者的憑證來確保收件者可以存取被分享的檔案。\n\n可以使用圖形使用者介面或命令列設定外部儲存空間。後者提供了管理員更大的彈性,可用於設定大容量儲存空間的掛載並設定掛載屬性。更多資訊可在外部儲存空間圖形化使用者介面的文件與外部儲存空間設定檔文件中檢視。", - "Enter missing credentials" : "輸入缺少的身份驗證", + "Storage credentials" : "儲存身份驗證", + "To access the storage, you need to provide the authentification informations." : "要存取存儲,您需要提供身份驗證資訊。", + "Enter the storage login" : "輸入儲存登入帳號", + "Enter the storage password" : "輸入儲存密碼", + "Submit" : "遞交", "Unable to update this external storage config. {statusMessage}" : "無法更新此外部儲存空間設定。{statusMessage}", "New configuration successfully saved" : "新配置已成功保存", + "Enter missing credentials" : "輸入缺少的身份驗證", "There was an error with this external storage." : "此外部儲存空間發生錯誤。", "We were unable to check the external storage {basename}" : "我們無法檢查外部儲存空間 {basename}", "Examine this faulty external storage configuration" : "檢查此錯誤的外部儲存空間設定", diff --git a/apps/files_external/l10n/zh_HK.json b/apps/files_external/l10n/zh_HK.json index a8c8c7b892e..07589d70337 100644 --- a/apps/files_external/l10n/zh_HK.json +++ b/apps/files_external/l10n/zh_HK.json @@ -113,9 +113,14 @@ "External storage support" : "外部儲存支援", "Adds basic external storage support" : "增加了基本的外部存儲支援", "This application enables administrators to configure connections to external storage providers, such as FTP servers, S3 or SWIFT object stores, other Nextcloud servers, WebDAV servers, and more. Administration can choose which types of storage to enable and can mount these storage locations for an account, a group, or the entire system. Users will see a new folder appear in their root Nextcloud directory, which they can access and use like any other Nextcloud folder. External storage also allows people to share files stored in these external locations. In these cases, the credentials for the owner of the file are used when the recipient requests the file from external storage, thereby ensuring that the recipient can access the shared file.\n\nExternal storage can be configured using the GUI or at the command line. This second option provides the administration with more flexibility for configuring bulk external storage mounts and setting mount priorities. More information is available in the external storage GUI documentation and the external storage Configuration File documentation." : "此應用程式讓管理員可以設定到外部儲存空間提供者的連線,如 FTP 伺服器、S3 或 SWIFT 物件儲存、其他 Nextcloud 伺服器、WebDAV 伺服器與更多。管理員可以選擇要啟用的儲存空間類型,並可以為使用者、群組或整個系統掛載這些儲存位置。使用者將會在他們的 Nextcloud 根目錄看到一個新的資料夾,他們可以像其他 Nextcloud 資料夾那樣存取並使用該資料夾。外部儲存空間也允許使用者分享儲存在這些外部空間的檔案。在這種情況下,當收件者從外部儲存空間請求檔案時,將使用檔案擁有者的憑證來確保收件者可以存取被分享的檔案。\n\n可以使用圖形使用者介面或命令列設定外部儲存空間。後者提供了管理員更大的彈性,可用於設定大容量儲存空間的掛載並設定掛載屬性。更多資訊可在外部儲存空間圖形化使用者介面的文件與外部儲存空間設定檔文件中檢視。", - "Enter missing credentials" : "輸入缺少的身份驗證", + "Storage credentials" : "儲存身份驗證", + "To access the storage, you need to provide the authentification informations." : "要存取存儲,您需要提供身份驗證資訊。", + "Enter the storage login" : "輸入儲存登入帳號", + "Enter the storage password" : "輸入儲存密碼", + "Submit" : "遞交", "Unable to update this external storage config. {statusMessage}" : "無法更新此外部儲存空間設定。{statusMessage}", "New configuration successfully saved" : "新配置已成功保存", + "Enter missing credentials" : "輸入缺少的身份驗證", "There was an error with this external storage." : "此外部儲存空間發生錯誤。", "We were unable to check the external storage {basename}" : "我們無法檢查外部儲存空間 {basename}", "Examine this faulty external storage configuration" : "檢查此錯誤的外部儲存空間設定", diff --git a/apps/files_external/l10n/zh_TW.js b/apps/files_external/l10n/zh_TW.js index 4ad8ba3463d..ece8888155a 100644 --- a/apps/files_external/l10n/zh_TW.js +++ b/apps/files_external/l10n/zh_TW.js @@ -115,9 +115,10 @@ OC.L10N.register( "External storage support" : "外部儲存空間支援", "Adds basic external storage support" : "新增基本的外部儲存空間支援", "This application enables administrators to configure connections to external storage providers, such as FTP servers, S3 or SWIFT object stores, other Nextcloud servers, WebDAV servers, and more. Administration can choose which types of storage to enable and can mount these storage locations for an account, a group, or the entire system. Users will see a new folder appear in their root Nextcloud directory, which they can access and use like any other Nextcloud folder. External storage also allows people to share files stored in these external locations. In these cases, the credentials for the owner of the file are used when the recipient requests the file from external storage, thereby ensuring that the recipient can access the shared file.\n\nExternal storage can be configured using the GUI or at the command line. This second option provides the administration with more flexibility for configuring bulk external storage mounts and setting mount priorities. More information is available in the external storage GUI documentation and the external storage Configuration File documentation." : "此應用程式讓管理員可以設定到外部儲存空間提供者的連線,如 FTP 伺服器、S3 或 SWIFT 物件儲存、其他 Nextcloud 伺服器、WebDAV 伺服器與更多。管理員可以選擇要啟用的儲存空間類型,並可以為使用者、群組或整個系統掛載這些儲存位置。使用者將會在他們的 Nextcloud 根目錄看到一個新的資料夾,他們可以像其他 Nextcloud 資料夾那樣存取並使用該資料夾。外部儲存空間也允許使用者分享儲存在這些外部空間的檔案。在這種情況下,當收件者從外部儲存空間請求檔案時,將使用檔案擁有者的憑證來確保收件者可以存取被分享的檔案。\n\n可以使用圖形使用者介面或命令列設定外部儲存空間。後者提供了管理員更大的彈性,可用於設定大容量儲存空間的掛載並設定掛載屬性。更多資訊可在外部儲存空間圖形化使用者介面的文件與外部儲存空間設定檔文件中檢視。", - "Enter missing credentials" : "輸入缺少的憑證", + "Submit" : "遞交", "Unable to update this external storage config. {statusMessage}" : "無法更新此外部儲存空間設定。{statusMessage}", "New configuration successfully saved" : "已成功儲存新設定", + "Enter missing credentials" : "輸入缺少的憑證", "There was an error with this external storage." : "此外部儲存空間發生錯誤。", "We were unable to check the external storage {basename}" : "我們無法檢查外部儲存空間 {basename}", "Examine this faulty external storage configuration" : "檢查此錯誤的外部儲存空間設定", diff --git a/apps/files_external/l10n/zh_TW.json b/apps/files_external/l10n/zh_TW.json index 8b92fcb9832..98b4ddf8e28 100644 --- a/apps/files_external/l10n/zh_TW.json +++ b/apps/files_external/l10n/zh_TW.json @@ -113,9 +113,10 @@ "External storage support" : "外部儲存空間支援", "Adds basic external storage support" : "新增基本的外部儲存空間支援", "This application enables administrators to configure connections to external storage providers, such as FTP servers, S3 or SWIFT object stores, other Nextcloud servers, WebDAV servers, and more. Administration can choose which types of storage to enable and can mount these storage locations for an account, a group, or the entire system. Users will see a new folder appear in their root Nextcloud directory, which they can access and use like any other Nextcloud folder. External storage also allows people to share files stored in these external locations. In these cases, the credentials for the owner of the file are used when the recipient requests the file from external storage, thereby ensuring that the recipient can access the shared file.\n\nExternal storage can be configured using the GUI or at the command line. This second option provides the administration with more flexibility for configuring bulk external storage mounts and setting mount priorities. More information is available in the external storage GUI documentation and the external storage Configuration File documentation." : "此應用程式讓管理員可以設定到外部儲存空間提供者的連線,如 FTP 伺服器、S3 或 SWIFT 物件儲存、其他 Nextcloud 伺服器、WebDAV 伺服器與更多。管理員可以選擇要啟用的儲存空間類型,並可以為使用者、群組或整個系統掛載這些儲存位置。使用者將會在他們的 Nextcloud 根目錄看到一個新的資料夾,他們可以像其他 Nextcloud 資料夾那樣存取並使用該資料夾。外部儲存空間也允許使用者分享儲存在這些外部空間的檔案。在這種情況下,當收件者從外部儲存空間請求檔案時,將使用檔案擁有者的憑證來確保收件者可以存取被分享的檔案。\n\n可以使用圖形使用者介面或命令列設定外部儲存空間。後者提供了管理員更大的彈性,可用於設定大容量儲存空間的掛載並設定掛載屬性。更多資訊可在外部儲存空間圖形化使用者介面的文件與外部儲存空間設定檔文件中檢視。", - "Enter missing credentials" : "輸入缺少的憑證", + "Submit" : "遞交", "Unable to update this external storage config. {statusMessage}" : "無法更新此外部儲存空間設定。{statusMessage}", "New configuration successfully saved" : "已成功儲存新設定", + "Enter missing credentials" : "輸入缺少的憑證", "There was an error with this external storage." : "此外部儲存空間發生錯誤。", "We were unable to check the external storage {basename}" : "我們無法檢查外部儲存空間 {basename}", "Examine this faulty external storage configuration" : "檢查此錯誤的外部儲存空間設定", diff --git a/apps/files_external/lib/Controller/ApiController.php b/apps/files_external/lib/Controller/ApiController.php index 56242938593..10fd120c3d9 100644 --- a/apps/files_external/lib/Controller/ApiController.php +++ b/apps/files_external/lib/Controller/ApiController.php @@ -15,7 +15,6 @@ use OCA\Files_External\Service\UserGlobalStoragesService; use OCA\Files_External\Service\UserStoragesService; use OCP\AppFramework\Http; use OCP\AppFramework\Http\Attribute\NoAdminRequired; -use OCP\AppFramework\Http\Attribute\OpenAPI; use OCP\AppFramework\Http\DataResponse; use OCP\AppFramework\OCSController; use OCP\IRequest; @@ -103,31 +102,4 @@ class ApiController extends OCSController { return new DataResponse($entries); } - - /** - * Ask for credentials using a browser's native basic auth prompt - * Then returns it if provided - */ - #[NoAdminRequired] - #[OpenAPI(scope: OpenAPI::SCOPE_IGNORE)] - public function askNativeAuth(): DataResponse { - if (!isset($_SERVER['PHP_AUTH_USER']) || !isset($_SERVER['PHP_AUTH_PW'])) { - $response = new DataResponse([], Http::STATUS_UNAUTHORIZED); - $response->addHeader('WWW-Authenticate', 'Basic realm="Storage authentification needed"'); - return $response; - } - - $user = $_SERVER['PHP_AUTH_USER']; - $password = $_SERVER['PHP_AUTH_PW']; - - // Reset auth - unset($_SERVER['PHP_AUTH_USER']); - unset($_SERVER['PHP_AUTH_PW']); - - // Using 401 again to ensure we clear any cached Authorization - return new DataResponse([ - 'user' => $user, - 'password' => $password, - ], Http::STATUS_UNAUTHORIZED); - } } diff --git a/apps/files_external/lib/Controller/StoragesController.php b/apps/files_external/lib/Controller/StoragesController.php index fd004b49b37..ab580987b0e 100644 --- a/apps/files_external/lib/Controller/StoragesController.php +++ b/apps/files_external/lib/Controller/StoragesController.php @@ -228,7 +228,7 @@ abstract class StoragesController extends Controller { ) ); } catch (InsufficientDataForMeaningfulAnswerException $e) { - $status = $e->getCode() ? $e->getCode() : StorageNotAvailableException::STATUS_INDETERMINATE; + $status = $e->getCode() ?: StorageNotAvailableException::STATUS_INDETERMINATE; $storage->setStatus( (int)$status, $this->l10n->t('Insufficient data: %s', [$e->getMessage()]) diff --git a/apps/files_external/lib/Lib/Backend/FTP.php b/apps/files_external/lib/Lib/Backend/FTP.php index 2093531789f..cdf7d187b4d 100644 --- a/apps/files_external/lib/Lib/Backend/FTP.php +++ b/apps/files_external/lib/Lib/Backend/FTP.php @@ -23,6 +23,8 @@ class FTP extends Backend { ->setText($l->t('FTP')) ->addParameters([ new DefinitionParameter('host', $l->t('Host')), + (new DefinitionParameter('port', $l->t('Port'))) + ->setFlag(DefinitionParameter::FLAG_OPTIONAL), (new DefinitionParameter('root', $l->t('Remote subfolder'))) ->setFlag(DefinitionParameter::FLAG_OPTIONAL), (new DefinitionParameter('secure', $l->t('Secure ftps://'))) diff --git a/apps/files_external/lib/Lib/Backend/SFTP.php b/apps/files_external/lib/Lib/Backend/SFTP.php index c3625f97087..93a5d87a5ff 100644 --- a/apps/files_external/lib/Lib/Backend/SFTP.php +++ b/apps/files_external/lib/Lib/Backend/SFTP.php @@ -20,6 +20,8 @@ class SFTP extends Backend { ->setText($l->t('SFTP')) ->addParameters([ new DefinitionParameter('host', $l->t('Host')), + (new DefinitionParameter('port', $l->t('Port'))) + ->setFlag(DefinitionParameter::FLAG_OPTIONAL), (new DefinitionParameter('root', $l->t('Root'))) ->setFlag(DefinitionParameter::FLAG_OPTIONAL), ]) diff --git a/apps/files_external/lib/Lib/Storage/SFTP.php b/apps/files_external/lib/Lib/Storage/SFTP.php index 1fb6dec671d..acc531341d9 100644 --- a/apps/files_external/lib/Lib/Storage/SFTP.php +++ b/apps/files_external/lib/Lib/Storage/SFTP.php @@ -441,10 +441,14 @@ class SFTP extends Common { try { $stat = $this->getConnection()->stat($this->absPath($path)); - $mtime = $stat ? (int)$stat['mtime'] : -1; - $size = $stat ? (int)$stat['size'] : 0; - - return ['mtime' => $mtime, 'size' => $size, 'ctime' => -1]; + $mtime = isset($stat['mtime']) ? (int)$stat['mtime'] : -1; + $size = isset($stat['size']) ? (int)$stat['size'] : 0; + + return [ + 'mtime' => $mtime, + 'size' => $size, + 'ctime' => -1 + ]; } catch (\Exception $e) { return false; } diff --git a/apps/files_external/src/actions/enterCredentialsAction.ts b/apps/files_external/src/actions/enterCredentialsAction.ts index 78377dc557c..29d660315b4 100644 --- a/apps/files_external/src/actions/enterCredentialsAction.ts +++ b/apps/files_external/src/actions/enterCredentialsAction.ts @@ -7,29 +7,39 @@ import type { AxiosResponse } from '@nextcloud/axios' import type { Node } from '@nextcloud/files' import type { StorageConfig } from '../services/externalStorage' -import { generateOcsUrl, generateUrl } from '@nextcloud/router' -import { showError, showSuccess } from '@nextcloud/dialogs' +import { generateUrl } from '@nextcloud/router' +import { showError, showSuccess, spawnDialog } from '@nextcloud/dialogs' import { translate as t } from '@nextcloud/l10n' import axios from '@nextcloud/axios' import LoginSvg from '@mdi/svg/svg/login.svg?raw' -import Vue from 'vue' +import Vue, { defineAsyncComponent } from 'vue' import { FileAction, DefaultType } from '@nextcloud/files' import { STORAGE_STATUS, isMissingAuthConfig } from '../utils/credentialsUtils' import { isNodeExternalStorage } from '../utils/externalStorageUtils' -type OCSAuthResponse = { - ocs: { - meta: { - status: string - statuscode: number - message: string - }, - data: { - user?: string, - password?: string, - } +type CredentialResponse = { + login?: string, + password?: string, +} + +async function setCredentials(node: Node, login: string, password: string): Promise<null|true> { + const configResponse = await axios.put(generateUrl('apps/files_external/userglobalstorages/{id}', node.attributes), { + backendOptions: { user: login, password }, + }) as AxiosResponse<StorageConfig> + + const config = configResponse.data + if (config.status !== STORAGE_STATUS.SUCCESS) { + showError(t('files_external', 'Unable to update this external storage config. {statusMessage}', { + statusMessage: config?.statusMessage || '', + })) + return null } + + // Success update config attribute + showSuccess(t('files_external', 'New configuration successfully saved')) + Vue.set(node.attributes, 'config', config) + return true } export const action = new FileAction({ @@ -57,30 +67,16 @@ export const action = new FileAction({ }, async exec(node: Node) { - // always resolve auth request, we'll process the data afterwards - // Using fetch as axios have integrated auth handling and X-Requested-With header - const response = await fetch(generateOcsUrl('/apps/files_external/api/v1/auth'), { - headers: new Headers({ Accept: 'application/json' }), - credentials: 'include', - }) - - const data = (await response?.json() || {}) as OCSAuthResponse - if (data.ocs.data.user && data.ocs.data.password) { - const configResponse = await axios.put(generateUrl('apps/files_external/userglobalstorages/{id}', node.attributes), { - backendOptions: data.ocs.data, - }) as AxiosResponse<StorageConfig> - - const config = configResponse.data - if (config.status !== STORAGE_STATUS.SUCCESS) { - showError(t('files_external', 'Unable to update this external storage config. {statusMessage}', { - statusMessage: config?.statusMessage || '', - })) - return null - } + const { login, password } = await new Promise<CredentialResponse>(resolve => spawnDialog( + defineAsyncComponent(() => import('../views/CredentialsDialog.vue')), + {}, + (args) => { + resolve(args as CredentialResponse) + }, + )) - // Success update config attribute - showSuccess(t('files_external', 'New configuration successfully saved')) - Vue.set(node.attributes, 'config', config) + if (login && password) { + return await setCredentials(node, login, password) } return null diff --git a/apps/files_external/src/views/CredentialsDialog.vue b/apps/files_external/src/views/CredentialsDialog.vue new file mode 100644 index 00000000000..56c8093db56 --- /dev/null +++ b/apps/files_external/src/views/CredentialsDialog.vue @@ -0,0 +1,86 @@ +<!-- + - SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors + - SPDX-License-Identifier: AGPL-3.0-or-later +--> + +<template> + <NcDialog :buttons="dialogButtons" + class="external-storage-auth" + close-on-click-outside + data-cy-external-storage-auth + is-form + :name="t('files_external', 'Storage credentials')" + out-transition + @submit="$emit('close', {login, password})" + @update:open="$emit('close')"> + <!-- Header --> + <NcNoteCard class="external-storage-auth__header" + :text="t('files_external', 'To access the storage, you need to provide the authentication credentials.')" + type="info" /> + + <!-- Login --> + <NcTextField ref="login" + class="external-storage-auth__login" + data-cy-external-storage-auth-dialog-login + :label="t('files_external', 'Login')" + :placeholder="t('files_external', 'Enter the storage login')" + minlength="2" + name="login" + required + :value.sync="login" /> + + <!-- Password --> + <NcPasswordField ref="password" + class="external-storage-auth__password" + data-cy-external-storage-auth-dialog-password + :label="t('files_external', 'Password')" + :placeholder="t('files_external', 'Enter the storage password')" + name="password" + required + :value.sync="password" /> + </NcDialog> +</template> + +<script lang="ts"> +import { defineComponent } from 'vue' +import { t } from '@nextcloud/l10n' + +import NcDialog from '@nextcloud/vue/dist/Components/NcDialog.js' +import NcNoteCard from '@nextcloud/vue/dist/Components/NcNoteCard.js' +import NcPasswordField from '@nextcloud/vue/dist/Components/NcPasswordField.js' +import NcTextField from '@nextcloud/vue/dist/Components/NcTextField.js' + +export default defineComponent({ + name: 'CredentialsDialog', + + components: { + NcDialog, + NcNoteCard, + NcTextField, + NcPasswordField, + }, + + setup() { + return { + t, + } + }, + + data() { + return { + login: '', + password: '', + } + }, + + computed: { + dialogButtons() { + return [{ + label: t('files_external', 'Submit'), + type: 'primary', + nativeType: 'submit', + }] + }, + }, +}) +</script> diff --git a/apps/files_external/tests/Auth/AuthMechanismTest.php b/apps/files_external/tests/Auth/AuthMechanismTest.php index 3297d93fe94..682d2e1326f 100644 --- a/apps/files_external/tests/Auth/AuthMechanismTest.php +++ b/apps/files_external/tests/Auth/AuthMechanismTest.php @@ -11,7 +11,7 @@ use OCA\Files_External\Lib\Backend\Backend; use OCA\Files_External\Lib\StorageConfig; class AuthMechanismTest extends \Test\TestCase { - public function testJsonSerialization() { + public function testJsonSerialization(): void { $mechanism = $this->getMockBuilder(AuthMechanism::class) ->setMethods(['jsonSerializeDefinition']) ->getMock(); @@ -38,7 +38,7 @@ class AuthMechanismTest extends \Test\TestCase { /** * @dataProvider validateStorageProvider */ - public function testValidateStorage($expectedSuccess, $scheme, $definitionSuccess) { + public function testValidateStorage($expectedSuccess, $scheme, $definitionSuccess): void { $mechanism = $this->getMockBuilder(AuthMechanism::class) ->setMethods(['validateStorageDefinition']) ->getMock(); diff --git a/apps/files_external/tests/Auth/Password/GlobalAuth.php b/apps/files_external/tests/Auth/Password/GlobalAuth.php index 85a2c1fb27c..9f7aa0ef03a 100644 --- a/apps/files_external/tests/Auth/Password/GlobalAuth.php +++ b/apps/files_external/tests/Auth/Password/GlobalAuth.php @@ -60,7 +60,7 @@ class GlobalAuthTest extends TestCase { return $storageConfig; } - public function testNoCredentials() { + public function testNoCredentials(): void { $this->credentialsManager->expects($this->once()) ->method('retrieve') ->willReturn(null); @@ -71,7 +71,7 @@ class GlobalAuthTest extends TestCase { $this->assertEquals([], $storage->getBackendOptions()); } - public function testSavedCredentials() { + public function testSavedCredentials(): void { $this->credentialsManager->expects($this->once()) ->method('retrieve') ->willReturn([ @@ -89,7 +89,7 @@ class GlobalAuthTest extends TestCase { } - public function testNoCredentialsPersonal() { + public function testNoCredentialsPersonal(): void { $this->expectException(\OCA\Files_External\Lib\InsufficientDataForMeaningfulAnswerException::class); $this->credentialsManager->expects($this->never()) diff --git a/apps/files_external/tests/Backend/BackendTest.php b/apps/files_external/tests/Backend/BackendTest.php index 771c053982c..26aa5ebe6af 100644 --- a/apps/files_external/tests/Backend/BackendTest.php +++ b/apps/files_external/tests/Backend/BackendTest.php @@ -10,7 +10,7 @@ use OCA\Files_External\Lib\Backend\Backend; use OCA\Files_External\Lib\StorageConfig; class BackendTest extends \Test\TestCase { - public function testJsonSerialization() { + public function testJsonSerialization(): void { $backend = $this->getMockBuilder(Backend::class) ->setMethods(['jsonSerializeDefinition']) ->getMock(); @@ -42,7 +42,7 @@ class BackendTest extends \Test\TestCase { /** * @dataProvider validateStorageProvider */ - public function testValidateStorage($expectedSuccess, $definitionSuccess) { + public function testValidateStorage($expectedSuccess, $definitionSuccess): void { $backend = $this->getMockBuilder(Backend::class) ->setMethods(['validateStorageDefinition']) ->getMock(); @@ -57,7 +57,7 @@ class BackendTest extends \Test\TestCase { $this->assertEquals($expectedSuccess, $backend->validateStorage($storageConfig)); } - public function testLegacyAuthMechanismCallback() { + public function testLegacyAuthMechanismCallback(): void { $backend = new Backend(); $backend->setLegacyAuthMechanismCallback(function (array $params) { if (isset($params['ping'])) { diff --git a/apps/files_external/tests/Backend/LegacyBackendTest.php b/apps/files_external/tests/Backend/LegacyBackendTest.php index 2d041e69f26..303700c6611 100644 --- a/apps/files_external/tests/Backend/LegacyBackendTest.php +++ b/apps/files_external/tests/Backend/LegacyBackendTest.php @@ -21,7 +21,7 @@ class LegacyBackendTest extends \Test\TestCase { ]; } - public function testConstructor() { + public function testConstructor(): void { $auth = $this->getMockBuilder('\OCA\Files_External\Lib\Auth\Builtin') ->disableOriginalConstructor() ->getMock(); @@ -77,7 +77,7 @@ class LegacyBackendTest extends \Test\TestCase { $this->assertEquals(DefinitionParameter::FLAG_OPTIONAL, $parameters['optionalpassword']->getFlags()); } - public function testNoDependencies() { + public function testNoDependencies(): void { $auth = $this->getMockBuilder('\OCA\Files_External\Lib\Auth\Builtin') ->disableOriginalConstructor() ->getMock(); diff --git a/apps/files_external/tests/Command/ApplicableTest.php b/apps/files_external/tests/Command/ApplicableTest.php index d4caadad343..223b02706e5 100644 --- a/apps/files_external/tests/Command/ApplicableTest.php +++ b/apps/files_external/tests/Command/ApplicableTest.php @@ -28,7 +28,7 @@ class ApplicableTest extends CommandTest { return new Applicable($storageService, $userManager, $groupManager); } - public function testListEmpty() { + public function testListEmpty(): void { $mount = $this->getMount(1, '', ''); $storageService = $this->getGlobalStorageService([$mount]); @@ -45,7 +45,7 @@ class ApplicableTest extends CommandTest { $this->assertEquals(['users' => [], 'groups' => []], $result); } - public function testList() { + public function testList(): void { $mount = $this->getMount(1, '', '', '', [], [], ['test', 'asd']); $storageService = $this->getGlobalStorageService([$mount]); @@ -62,7 +62,7 @@ class ApplicableTest extends CommandTest { $this->assertEquals(['users' => ['test', 'asd'], 'groups' => []], $result); } - public function testAddSingle() { + public function testAddSingle(): void { $mount = $this->getMount(1, '', '', '', [], [], []); $storageService = $this->getGlobalStorageService([$mount]); @@ -80,7 +80,7 @@ class ApplicableTest extends CommandTest { $this->assertEquals(['foo'], $mount->getApplicableUsers()); } - public function testAddDuplicate() { + public function testAddDuplicate(): void { $mount = $this->getMount(1, '', '', '', [], [], ['foo']); $storageService = $this->getGlobalStorageService([$mount]); @@ -98,7 +98,7 @@ class ApplicableTest extends CommandTest { $this->assertEquals(['foo', 'bar'], $mount->getApplicableUsers()); } - public function testRemoveSingle() { + public function testRemoveSingle(): void { $mount = $this->getMount(1, '', '', '', [], [], ['foo', 'bar']); $storageService = $this->getGlobalStorageService([$mount]); @@ -116,7 +116,7 @@ class ApplicableTest extends CommandTest { $this->assertEquals(['foo'], $mount->getApplicableUsers()); } - public function testRemoveNonExisting() { + public function testRemoveNonExisting(): void { $mount = $this->getMount(1, '', '', '', [], [], ['foo', 'bar']); $storageService = $this->getGlobalStorageService([$mount]); @@ -134,7 +134,7 @@ class ApplicableTest extends CommandTest { $this->assertEquals(['foo'], $mount->getApplicableUsers()); } - public function testRemoveAddRemove() { + public function testRemoveAddRemove(): void { $mount = $this->getMount(1, '', '', '', [], [], ['foo', 'bar']); $storageService = $this->getGlobalStorageService([$mount]); diff --git a/apps/files_external/tests/Command/ListCommandTest.php b/apps/files_external/tests/Command/ListCommandTest.php index 8375ba89f2a..bd4430b4116 100644 --- a/apps/files_external/tests/Command/ListCommandTest.php +++ b/apps/files_external/tests/Command/ListCommandTest.php @@ -39,7 +39,7 @@ class ListCommandTest extends CommandTest { return new ListCommand($globalService, $userService, $userSession, $userManager); } - public function testListAuthIdentifier() { + public function testListAuthIdentifier(): void { $l10n = $this->createMock(IL10N::class); $session = $this->createMock(ISession::class); $crypto = $this->createMock(ICrypto::class); diff --git a/apps/files_external/tests/Config/UserPlaceholderHandlerTest.php b/apps/files_external/tests/Config/UserPlaceholderHandlerTest.php index 767ae04fc79..b3c7db9306f 100644 --- a/apps/files_external/tests/Config/UserPlaceholderHandlerTest.php +++ b/apps/files_external/tests/Config/UserPlaceholderHandlerTest.php @@ -64,7 +64,7 @@ class UserPlaceholderHandlerTest extends \Test\TestCase { /** * @dataProvider optionProvider */ - public function testHandle($option, $expected) { + public function testHandle($option, $expected): void { $this->setUser(); $this->assertSame($expected, $this->handler->handle($option)); } @@ -72,7 +72,7 @@ class UserPlaceholderHandlerTest extends \Test\TestCase { /** * @dataProvider optionProvider */ - public function testHandleNoUser($option) { + public function testHandleNoUser($option): void { $this->shareManager->expects($this->once()) ->method('getShareByToken') ->willThrowException(new ShareNotFound()); diff --git a/apps/files_external/tests/Controller/AjaxControllerTest.php b/apps/files_external/tests/Controller/AjaxControllerTest.php index 4b2f973e9b0..dc9661732cc 100644 --- a/apps/files_external/tests/Controller/AjaxControllerTest.php +++ b/apps/files_external/tests/Controller/AjaxControllerTest.php @@ -52,7 +52,7 @@ class AjaxControllerTest extends TestCase { parent::setUp(); } - public function testGetSshKeys() { + public function testGetSshKeys(): void { $this->rsa ->expects($this->once()) ->method('createKey') @@ -73,7 +73,7 @@ class AjaxControllerTest extends TestCase { $this->assertEquals($expected, $this->ajaxController->getSshKeys()); } - public function testSaveGlobalCredentialsAsAdminForAnotherUser() { + public function testSaveGlobalCredentialsAsAdminForAnotherUser(): void { $user = $this->createMock(IUser::class); $user ->expects($this->once()) @@ -90,7 +90,7 @@ class AjaxControllerTest extends TestCase { $this->assertSame(false, $this->ajaxController->saveGlobalCredentials('UidOfTestUser', 'test', 'password')); } - public function testSaveGlobalCredentialsAsAdminForSelf() { + public function testSaveGlobalCredentialsAsAdminForSelf(): void { $user = $this->createMock(IUser::class); $user ->expects($this->once()) @@ -108,7 +108,7 @@ class AjaxControllerTest extends TestCase { $this->assertSame(true, $this->ajaxController->saveGlobalCredentials('MyAdminUid', 'test', 'password')); } - public function testSaveGlobalCredentialsAsNormalUserForSelf() { + public function testSaveGlobalCredentialsAsNormalUserForSelf(): void { $user = $this->createMock(IUser::class); $user ->method('getUID') @@ -123,7 +123,7 @@ class AjaxControllerTest extends TestCase { $this->assertSame(true, $this->ajaxController->saveGlobalCredentials('MyUserUid', 'test', 'password')); } - public function testSaveGlobalCredentialsAsNormalUserForAnotherUser() { + public function testSaveGlobalCredentialsAsNormalUserForAnotherUser(): void { $user = $this->createMock(IUser::class); $user ->method('getUID') diff --git a/apps/files_external/tests/Controller/GlobalStoragesControllerTest.php b/apps/files_external/tests/Controller/GlobalStoragesControllerTest.php index cc905a20ff4..4c318951d1b 100644 --- a/apps/files_external/tests/Controller/GlobalStoragesControllerTest.php +++ b/apps/files_external/tests/Controller/GlobalStoragesControllerTest.php @@ -53,7 +53,7 @@ class GlobalStoragesControllerTest extends StoragesControllerTest { ); } - public function testAddLocalStorageWhenDisabled() { + public function testAddLocalStorageWhenDisabled(): void { $this->controller = $this->createController(false); parent::testAddLocalStorageWhenDisabled(); } diff --git a/apps/files_external/tests/Controller/StoragesControllerTest.php b/apps/files_external/tests/Controller/StoragesControllerTest.php index 85f3ca81498..9e9595152ad 100644 --- a/apps/files_external/tests/Controller/StoragesControllerTest.php +++ b/apps/files_external/tests/Controller/StoragesControllerTest.php @@ -70,7 +70,7 @@ abstract class StoragesControllerTest extends \Test\TestCase { return $authMech; } - public function testAddStorage() { + public function testAddStorage(): void { $authMech = $this->getAuthMechMock(); $authMech->method('validateStorage') ->willReturn(true); @@ -111,7 +111,7 @@ abstract class StoragesControllerTest extends \Test\TestCase { $this->assertEquals($storageConfig->jsonSerialize(), $data); } - public function testAddLocalStorageWhenDisabled() { + public function testAddLocalStorageWhenDisabled(): void { $authMech = $this->getAuthMechMock(); $backend = $this->getBackendMock(); @@ -141,7 +141,7 @@ abstract class StoragesControllerTest extends \Test\TestCase { $this->assertEquals(Http::STATUS_FORBIDDEN, $response->getStatus()); } - public function testUpdateStorage() { + public function testUpdateStorage(): void { $authMech = $this->getAuthMechMock(); $authMech->method('validateStorage') ->willReturn(true); @@ -194,7 +194,7 @@ abstract class StoragesControllerTest extends \Test\TestCase { /** * @dataProvider mountPointNamesProvider */ - public function testAddOrUpdateStorageInvalidMountPoint($mountPoint) { + public function testAddOrUpdateStorageInvalidMountPoint($mountPoint): void { $storageConfig = new StorageConfig(1); $storageConfig->setMountPoint($mountPoint); $storageConfig->setBackend($this->getBackendMock()); @@ -237,7 +237,7 @@ abstract class StoragesControllerTest extends \Test\TestCase { $this->assertEquals(Http::STATUS_UNPROCESSABLE_ENTITY, $response->getStatus()); } - public function testAddOrUpdateStorageInvalidBackend() { + public function testAddOrUpdateStorageInvalidBackend(): void { $this->service->expects($this->exactly(2)) ->method('createStorage') ->will($this->throwException(new \InvalidArgumentException())); @@ -274,7 +274,7 @@ abstract class StoragesControllerTest extends \Test\TestCase { $this->assertEquals(Http::STATUS_UNPROCESSABLE_ENTITY, $response->getStatus()); } - public function testUpdateStorageNonExisting() { + public function testUpdateStorageNonExisting(): void { $authMech = $this->getAuthMechMock(); $authMech->method('validateStorage') ->willReturn(true); @@ -314,7 +314,7 @@ abstract class StoragesControllerTest extends \Test\TestCase { $this->assertEquals(Http::STATUS_NOT_FOUND, $response->getStatus()); } - public function testDeleteStorage() { + public function testDeleteStorage(): void { $this->service->expects($this->once()) ->method('removeStorage'); @@ -322,7 +322,7 @@ abstract class StoragesControllerTest extends \Test\TestCase { $this->assertEquals(Http::STATUS_NO_CONTENT, $response->getStatus()); } - public function testDeleteStorageNonExisting() { + public function testDeleteStorageNonExisting(): void { $this->service->expects($this->once()) ->method('removeStorage') ->will($this->throwException(new NotFoundException())); @@ -331,7 +331,7 @@ abstract class StoragesControllerTest extends \Test\TestCase { $this->assertEquals(Http::STATUS_NOT_FOUND, $response->getStatus()); } - public function testGetStorage() { + public function testGetStorage(): void { $backend = $this->getBackendMock(); $authMech = $this->getAuthMechMock(); $storageConfig = new StorageConfig(1); @@ -365,7 +365,7 @@ abstract class StoragesControllerTest extends \Test\TestCase { /** * @dataProvider validateStorageProvider */ - public function testValidateStorage($backendValidate, $authMechValidate, $expectSuccess) { + public function testValidateStorage($backendValidate, $authMechValidate, $expectSuccess): void { $backend = $this->getBackendMock(); $backend->method('validateStorage') ->willReturn($backendValidate); diff --git a/apps/files_external/tests/Controller/UserStoragesControllerTest.php b/apps/files_external/tests/Controller/UserStoragesControllerTest.php index 0ac2197f67c..c15ded48ea7 100644 --- a/apps/files_external/tests/Controller/UserStoragesControllerTest.php +++ b/apps/files_external/tests/Controller/UserStoragesControllerTest.php @@ -60,12 +60,12 @@ class UserStoragesControllerTest extends StoragesControllerTest { ); } - public function testAddLocalStorageWhenDisabled() { + public function testAddLocalStorageWhenDisabled(): void { $this->controller = $this->createController(false); parent::testAddLocalStorageWhenDisabled(); } - public function testAddOrUpdateStorageDisallowedBackend() { + public function testAddOrUpdateStorageDisallowedBackend(): void { $backend = $this->getBackendMock(); $backend->method('isVisibleFor') ->with(BackendService::VISIBILITY_PERSONAL) diff --git a/apps/files_external/tests/DefinitionParameterTest.php b/apps/files_external/tests/DefinitionParameterTest.php index f9d50e7a34c..0b1d11bbf0c 100644 --- a/apps/files_external/tests/DefinitionParameterTest.php +++ b/apps/files_external/tests/DefinitionParameterTest.php @@ -9,7 +9,7 @@ namespace OCA\Files_External\Tests; use OCA\Files_External\Lib\DefinitionParameter as Param; class DefinitionParameterTest extends \Test\TestCase { - public function testJsonSerialization() { + public function testJsonSerialization(): void { $param = new Param('foo', 'bar'); $this->assertEquals([ 'value' => 'bar', @@ -70,7 +70,7 @@ class DefinitionParameterTest extends \Test\TestCase { /** * @dataProvider validateValueProvider */ - public function testValidateValue($type, $flags, $value, $success, $expectedValue = null) { + public function testValidateValue($type, $flags, $value, $success, $expectedValue = null): void { $param = new Param('foo', 'bar'); $param->setType($type); $param->setFlags($flags); diff --git a/apps/files_external/tests/FrontendDefinitionTraitTest.php b/apps/files_external/tests/FrontendDefinitionTraitTest.php index e5dc0547d74..bc5d88ff3f0 100644 --- a/apps/files_external/tests/FrontendDefinitionTraitTest.php +++ b/apps/files_external/tests/FrontendDefinitionTraitTest.php @@ -10,7 +10,7 @@ use OCA\Files_External\Lib\DefinitionParameter; use OCA\Files_External\Lib\StorageConfig; class FrontendDefinitionTraitTest extends \Test\TestCase { - public function testJsonSerialization() { + public function testJsonSerialization(): void { $param = $this->getMockBuilder(DefinitionParameter::class) ->disableOriginalConstructor() ->getMock(); @@ -42,7 +42,7 @@ class FrontendDefinitionTraitTest extends \Test\TestCase { /** * @dataProvider validateStorageProvider */ - public function testValidateStorage($expectedSuccess, $params) { + public function testValidateStorage($expectedSuccess, $params): void { $backendParams = []; foreach ($params as $name => $valid) { $param = $this->getMockBuilder(DefinitionParameter::class) @@ -74,7 +74,7 @@ class FrontendDefinitionTraitTest extends \Test\TestCase { $this->assertEquals($expectedSuccess, $trait->validateStorageDefinition($storageConfig)); } - public function testValidateStorageSet() { + public function testValidateStorageSet(): void { $param = $this->getMockBuilder(DefinitionParameter::class) ->disableOriginalConstructor() ->getMock(); diff --git a/apps/files_external/tests/LegacyDependencyCheckPolyfillTest.php b/apps/files_external/tests/LegacyDependencyCheckPolyfillTest.php index 931421551eb..5fcfe1dd1e6 100644 --- a/apps/files_external/tests/LegacyDependencyCheckPolyfillTest.php +++ b/apps/files_external/tests/LegacyDependencyCheckPolyfillTest.php @@ -20,7 +20,7 @@ class LegacyDependencyCheckPolyfillTest extends \Test\TestCase { ]; } - public function testCheckDependencies() { + public function testCheckDependencies(): void { $trait = $this->getMockForTrait('\OCA\Files_External\Lib\LegacyDependencyCheckPolyfill'); $trait->expects($this->once()) ->method('getStorageClass') diff --git a/apps/files_external/tests/Listener/StorePasswordListenerTest.php b/apps/files_external/tests/Listener/StorePasswordListenerTest.php index a028e1ac0ef..ec278f84331 100644 --- a/apps/files_external/tests/Listener/StorePasswordListenerTest.php +++ b/apps/files_external/tests/Listener/StorePasswordListenerTest.php @@ -76,7 +76,7 @@ class StorePasswordListenerTest extends TestCase { $storePasswordListener->handle($event); } - public function testClassicLoginSameCredentials() { + public function testClassicLoginSameCredentials(): void { $this->getMockedCredentialManager( [ 'user' => 'test', @@ -87,7 +87,7 @@ class StorePasswordListenerTest extends TestCase { ); } - public function testClassicLoginNewPassword() { + public function testClassicLoginNewPassword(): void { $this->getMockedCredentialManager( [ 'user' => 'test', @@ -101,7 +101,7 @@ class StorePasswordListenerTest extends TestCase { ); } - public function testClassicLoginNewUser() { + public function testClassicLoginNewUser(): void { $this->getMockedCredentialManager( [ 'user' => 'test', @@ -115,7 +115,7 @@ class StorePasswordListenerTest extends TestCase { ); } - public function testSSOLogin() { + public function testSSOLogin(): void { $this->getMockedCredentialManager( [ 'user' => 'test', @@ -126,7 +126,7 @@ class StorePasswordListenerTest extends TestCase { ); } - public function testPasswordUpdated() { + public function testPasswordUpdated(): void { $this->getMockedCredentialManager( [ 'user' => 'test', @@ -140,7 +140,7 @@ class StorePasswordListenerTest extends TestCase { ); } - public function testUserLoginWithToken() { + public function testUserLoginWithToken(): void { $this->getMockedCredentialManager( null, new UserLoggedInEvent($this->mockedUser, 'test', 'password', true), @@ -148,7 +148,7 @@ class StorePasswordListenerTest extends TestCase { ); } - public function testNoInitialCredentials() { + public function testNoInitialCredentials(): void { $this->getMockedCredentialManager( false, new PasswordUpdatedEvent($this->mockedUser, 'test', 'password'), diff --git a/apps/files_external/tests/OwnCloudFunctionsTest.php b/apps/files_external/tests/OwnCloudFunctionsTest.php index 9efefe8e4dd..99cb0cf94de 100644 --- a/apps/files_external/tests/OwnCloudFunctionsTest.php +++ b/apps/files_external/tests/OwnCloudFunctionsTest.php @@ -86,7 +86,7 @@ class OwnCloudFunctionsTest extends \Test\TestCase { /** * @dataProvider configUrlProvider */ - public function testConfig($config, $expectedUri) { + public function testConfig($config, $expectedUri): void { $config['user'] = 'someuser'; $config['password'] = 'somepassword'; $instance = new \OCA\Files_External\Lib\Storage\OwnCloud($config); diff --git a/apps/files_external/tests/PersonalMountTest.php b/apps/files_external/tests/PersonalMountTest.php index aec0a8b6f75..2d8f41c3e50 100644 --- a/apps/files_external/tests/PersonalMountTest.php +++ b/apps/files_external/tests/PersonalMountTest.php @@ -13,7 +13,7 @@ use OCA\Files_External\Lib\StorageConfig; use Test\TestCase; class PersonalMountTest extends TestCase { - public function testFindByStorageId() { + public function testFindByStorageId(): void { $storageConfig = $this->createMock(StorageConfig::class); /** @var \OCA\Files_External\Service\UserStoragesService $storageService */ $storageService = $this->getMockBuilder('\OCA\Files_External\Service\UserStoragesService') diff --git a/apps/files_external/tests/Service/BackendServiceTest.php b/apps/files_external/tests/Service/BackendServiceTest.php index bda96550317..6d9754a5335 100644 --- a/apps/files_external/tests/Service/BackendServiceTest.php +++ b/apps/files_external/tests/Service/BackendServiceTest.php @@ -51,7 +51,7 @@ class BackendServiceTest extends \Test\TestCase { return $backend; } - public function testRegisterBackend() { + public function testRegisterBackend(): void { $service = new BackendService($this->config); $backend = $this->getBackendMock('\Foo\Bar'); @@ -79,7 +79,7 @@ class BackendServiceTest extends \Test\TestCase { $this->assertArrayNotHasKey('identifier_alias', $backends); } - public function testBackendProvider() { + public function testBackendProvider(): void { $service = new BackendService($this->config); $backend1 = $this->getBackendMock('\Foo\Bar'); @@ -98,7 +98,7 @@ class BackendServiceTest extends \Test\TestCase { $this->assertCount(2, $service->getBackends()); } - public function testAuthMechanismProvider() { + public function testAuthMechanismProvider(): void { $service = new BackendService($this->config); $backend1 = $this->getAuthMechanismMock('\Foo\Bar'); @@ -117,7 +117,7 @@ class BackendServiceTest extends \Test\TestCase { $this->assertCount(2, $service->getAuthMechanisms()); } - public function testMultipleBackendProviders() { + public function testMultipleBackendProviders(): void { $service = new BackendService($this->config); $backend1a = $this->getBackendMock('\Foo\Bar'); @@ -145,7 +145,7 @@ class BackendServiceTest extends \Test\TestCase { $this->assertCount(3, $service->getBackends()); } - public function testUserMountingBackends() { + public function testUserMountingBackends(): void { $this->config->expects($this->exactly(2)) ->method('getAppValue') ->willReturnMap([ @@ -176,7 +176,7 @@ class BackendServiceTest extends \Test\TestCase { $service->registerBackend($backendAlias); } - public function testGetAvailableBackends() { + public function testGetAvailableBackends(): void { $service = new BackendService($this->config); $backendAvailable = $this->getBackendMock('\Backend\Available'); @@ -217,7 +217,7 @@ class BackendServiceTest extends \Test\TestCase { /** * @dataProvider invalidConfigPlaceholderProvider */ - public function testRegisterConfigHandlerInvalid(array $placeholders) { + public function testRegisterConfigHandlerInvalid(array $placeholders): void { $this->expectException(\RuntimeException::class); $service = new BackendService($this->config); @@ -230,7 +230,7 @@ class BackendServiceTest extends \Test\TestCase { } } - public function testConfigHandlers() { + public function testConfigHandlers(): void { $service = new BackendService($this->config); $mock = $this->createMock(IConfigHandler::class); $mock->expects($this->exactly(3)) diff --git a/apps/files_external/tests/Service/DBConfigServiceTest.php b/apps/files_external/tests/Service/DBConfigServiceTest.php index 1c2cafc93f0..968c166a505 100644 --- a/apps/files_external/tests/Service/DBConfigServiceTest.php +++ b/apps/files_external/tests/Service/DBConfigServiceTest.php @@ -45,7 +45,7 @@ class DBConfigServiceTest extends TestCase { return $id; } - public function testAddSimpleMount() { + public function testAddSimpleMount(): void { $id = $this->addMount('/test', 'foo', 'bar', 100, DBConfigService::MOUNT_TYPE_ADMIN); $mount = $this->dbConfig->getMountById($id); @@ -59,7 +59,7 @@ class DBConfigServiceTest extends TestCase { $this->assertEquals([], $mount['options']); } - public function testAddApplicable() { + public function testAddApplicable(): void { $id = $this->addMount('/test', 'foo', 'bar', 100, DBConfigService::MOUNT_TYPE_ADMIN); $this->dbConfig->addApplicable($id, DBConfigService::APPLICABLE_TYPE_USER, 'test'); @@ -79,7 +79,7 @@ class DBConfigServiceTest extends TestCase { ], $mount['applicable']); } - public function testAddApplicableDouble() { + public function testAddApplicableDouble(): void { $id = $this->addMount('/test', 'foo', 'bar', 100, DBConfigService::MOUNT_TYPE_ADMIN); $this->dbConfig->addApplicable($id, DBConfigService::APPLICABLE_TYPE_USER, 'test'); $this->dbConfig->addApplicable($id, DBConfigService::APPLICABLE_TYPE_USER, 'test'); @@ -90,7 +90,7 @@ class DBConfigServiceTest extends TestCase { ], $mount['applicable']); } - public function testDeleteMount() { + public function testDeleteMount(): void { $id = $this->addMount('/test', 'foo', 'bar', 100, DBConfigService::MOUNT_TYPE_ADMIN); $this->dbConfig->removeMount($id); @@ -99,7 +99,7 @@ class DBConfigServiceTest extends TestCase { $this->assertEquals(null, $mount); } - public function testRemoveApplicable() { + public function testRemoveApplicable(): void { $id = $this->addMount('/test', 'foo', 'bar', 100, DBConfigService::MOUNT_TYPE_ADMIN); $this->dbConfig->addApplicable($id, DBConfigService::APPLICABLE_TYPE_USER, 'test'); $this->dbConfig->removeApplicable($id, DBConfigService::APPLICABLE_TYPE_USER, 'test'); @@ -108,7 +108,7 @@ class DBConfigServiceTest extends TestCase { $this->assertEquals([], $mount['applicable']); } - public function testRemoveApplicableGlobal() { + public function testRemoveApplicableGlobal(): void { $id = $this->addMount('/test', 'foo', 'bar', 100, DBConfigService::MOUNT_TYPE_ADMIN); $this->dbConfig->addApplicable($id, DBConfigService::APPLICABLE_TYPE_GLOBAL, null); $this->dbConfig->removeApplicable($id, DBConfigService::APPLICABLE_TYPE_GLOBAL, null); @@ -120,7 +120,7 @@ class DBConfigServiceTest extends TestCase { ], $mount['applicable']); } - public function testSetConfig() { + public function testSetConfig(): void { $id = $this->addMount('/test', 'foo', 'bar', 100, DBConfigService::MOUNT_TYPE_ADMIN); $this->dbConfig->setConfig($id, 'foo', 'bar'); @@ -133,7 +133,7 @@ class DBConfigServiceTest extends TestCase { $this->assertEquals(['foo' => 'bar', 'foo2' => 'bar2'], $mount['config']); } - public function testSetConfigOverwrite() { + public function testSetConfigOverwrite(): void { $id = $this->addMount('/test', 'foo', 'bar', 100, DBConfigService::MOUNT_TYPE_ADMIN); $this->dbConfig->setConfig($id, 'foo', 'bar'); $this->dbConfig->setConfig($id, 'asd', '1'); @@ -143,7 +143,7 @@ class DBConfigServiceTest extends TestCase { $this->assertEquals(['foo' => 'qwerty', 'asd' => '1'], $mount['config']); } - public function testSetOption() { + public function testSetOption(): void { $id = $this->addMount('/test', 'foo', 'bar', 100, DBConfigService::MOUNT_TYPE_ADMIN); $this->dbConfig->setOption($id, 'foo', 'bar'); @@ -156,7 +156,7 @@ class DBConfigServiceTest extends TestCase { $this->assertEquals(['foo' => 'bar', 'foo2' => 'bar2'], $mount['options']); } - public function testSetOptionOverwrite() { + public function testSetOptionOverwrite(): void { $id = $this->addMount('/test', 'foo', 'bar', 100, DBConfigService::MOUNT_TYPE_ADMIN); $this->dbConfig->setOption($id, 'foo', 'bar'); $this->dbConfig->setOption($id, 'asd', '1'); @@ -166,7 +166,7 @@ class DBConfigServiceTest extends TestCase { $this->assertEquals(['foo' => 'qwerty', 'asd' => '1'], $mount['options']); } - public function testGetMountsFor() { + public function testGetMountsFor(): void { $mounts = $this->dbConfig->getMountsFor(DBConfigService::APPLICABLE_TYPE_USER, 'test'); $this->assertEquals([], $mounts); @@ -179,7 +179,7 @@ class DBConfigServiceTest extends TestCase { $this->assertEquals([['type' => DBConfigService::APPLICABLE_TYPE_USER, 'value' => 'test', 'mount_id' => $id]], $mounts[0]['applicable']); } - public function testGetAdminMounts() { + public function testGetAdminMounts(): void { $id1 = $this->addMount('/test', 'foo', 'bar', 100, DBConfigService::MOUNT_TYPE_ADMIN); $this->addMount('/test2', 'foo2', 'bar2', 100, DBConfigService::MOUNT_TYPE_PERSONAL); @@ -188,7 +188,7 @@ class DBConfigServiceTest extends TestCase { $this->assertEquals($id1, $mounts[0]['mount_id']); } - public function testGetAdminMountsFor() { + public function testGetAdminMountsFor(): void { $id1 = $this->addMount('/test', 'foo', 'bar', 100, DBConfigService::MOUNT_TYPE_ADMIN); $this->addMount('/test2', 'foo2', 'bar2', 100, DBConfigService::MOUNT_TYPE_ADMIN); $id3 = $this->addMount('/test3', 'foo3', 'bar3', 100, DBConfigService::MOUNT_TYPE_PERSONAL); @@ -202,7 +202,7 @@ class DBConfigServiceTest extends TestCase { $this->assertEquals([['type' => DBConfigService::APPLICABLE_TYPE_USER, 'value' => 'test', 'mount_id' => $id1]], $mounts[0]['applicable']); } - public function testGetUserMountsFor() { + public function testGetUserMountsFor(): void { $id1 = $this->addMount('/test', 'foo', 'bar', 100, DBConfigService::MOUNT_TYPE_ADMIN); $this->addMount('/test2', 'foo2', 'bar2', 100, DBConfigService::MOUNT_TYPE_PERSONAL); $id3 = $this->addMount('/test3', 'foo3', 'bar3', 100, DBConfigService::MOUNT_TYPE_PERSONAL); @@ -216,7 +216,7 @@ class DBConfigServiceTest extends TestCase { $this->assertEquals([['type' => DBConfigService::APPLICABLE_TYPE_USER, 'value' => 'test', 'mount_id' => $id3]], $mounts[0]['applicable']); } - public function testGetAdminMountsForGlobal() { + public function testGetAdminMountsForGlobal(): void { $id1 = $this->addMount('/test', 'foo', 'bar', 100, DBConfigService::MOUNT_TYPE_ADMIN); $this->dbConfig->addApplicable($id1, DBConfigService::APPLICABLE_TYPE_GLOBAL, null); @@ -227,7 +227,7 @@ class DBConfigServiceTest extends TestCase { $this->assertEquals([['type' => DBConfigService::APPLICABLE_TYPE_GLOBAL, 'value' => null, 'mount_id' => $id1]], $mounts[0]['applicable']); } - public function testSetMountPoint() { + public function testSetMountPoint(): void { $id1 = $this->addMount('/test', 'foo', 'bar', 100, DBConfigService::MOUNT_TYPE_ADMIN); $id2 = $this->addMount('/foo', 'foo', 'bar', 100, DBConfigService::MOUNT_TYPE_ADMIN); @@ -241,7 +241,7 @@ class DBConfigServiceTest extends TestCase { $this->assertEquals('/foo', $mount['mount_point']); } - public function testSetAuthBackend() { + public function testSetAuthBackend(): void { $id1 = $this->addMount('/test', 'foo', 'bar', 100, DBConfigService::MOUNT_TYPE_ADMIN); $id2 = $this->addMount('/foo', 'foo', 'bar', 100, DBConfigService::MOUNT_TYPE_ADMIN); @@ -255,7 +255,7 @@ class DBConfigServiceTest extends TestCase { $this->assertEquals('bar', $mount['auth_backend']); } - public function testGetMountsForDuplicateByGroup() { + public function testGetMountsForDuplicateByGroup(): void { $id1 = $this->addMount('/test', 'foo', 'bar', 100, DBConfigService::MOUNT_TYPE_ADMIN); $this->dbConfig->addApplicable($id1, DBConfigService::APPLICABLE_TYPE_GROUP, 'group1'); @@ -266,7 +266,7 @@ class DBConfigServiceTest extends TestCase { $this->assertEquals($id1, $mounts[0]['mount_id']); } - public function testGetAllMounts() { + public function testGetAllMounts(): void { $id1 = $this->addMount('/test', 'foo', 'bar', 100, DBConfigService::MOUNT_TYPE_ADMIN); $id2 = $this->addMount('/test2', 'foo2', 'bar2', 100, DBConfigService::MOUNT_TYPE_PERSONAL); diff --git a/apps/files_external/tests/Service/GlobalStoragesServiceTest.php b/apps/files_external/tests/Service/GlobalStoragesServiceTest.php index 18fd9d174f2..0c9df2e858b 100644 --- a/apps/files_external/tests/Service/GlobalStoragesServiceTest.php +++ b/apps/files_external/tests/Service/GlobalStoragesServiceTest.php @@ -115,7 +115,7 @@ class GlobalStoragesServiceTest extends StoragesServiceTest { /** * @dataProvider storageDataProvider */ - public function testAddStorage($storageParams) { + public function testAddStorage($storageParams): void { $storage = $this->makeStorageConfig($storageParams); $newStorage = $this->service->addStorage($storage); @@ -139,7 +139,7 @@ class GlobalStoragesServiceTest extends StoragesServiceTest { /** * @dataProvider storageDataProvider */ - public function testUpdateStorage($updatedStorageParams) { + public function testUpdateStorage($updatedStorageParams): void { $updatedStorage = $this->makeStorageConfig($updatedStorageParams); $storage = $this->makeStorageConfig([ 'mountPoint' => 'mountpoint', @@ -281,7 +281,7 @@ class GlobalStoragesServiceTest extends StoragesServiceTest { /** * @dataProvider hooksAddStorageDataProvider */ - public function testHooksAddStorage($applicableUsers, $applicableGroups, $expectedCalls) { + public function testHooksAddStorage($applicableUsers, $applicableGroups, $expectedCalls): void { $storage = $this->makeTestStorageData(); $storage->setApplicableUsers($applicableUsers); $storage->setApplicableGroups($applicableGroups); @@ -424,7 +424,7 @@ class GlobalStoragesServiceTest extends StoragesServiceTest { $sourceApplicableGroups, $updatedApplicableUsers, $updatedApplicableGroups, - $expectedCalls) { + $expectedCalls): void { $storage = $this->makeTestStorageData(); $storage->setApplicableUsers($sourceApplicableUsers); $storage->setApplicableGroups($sourceApplicableGroups); @@ -452,7 +452,7 @@ class GlobalStoragesServiceTest extends StoragesServiceTest { } - public function testHooksRenameMountPoint() { + public function testHooksRenameMountPoint(): void { $storage = $this->makeTestStorageData(); $storage->setApplicableUsers(['user1', 'user2']); $storage->setApplicableGroups(['group1', 'group2']); @@ -581,7 +581,7 @@ class GlobalStoragesServiceTest extends StoragesServiceTest { public function testHooksDeleteStorage( $sourceApplicableUsers, $sourceApplicableGroups, - $expectedCalls) { + $expectedCalls): void { $storage = $this->makeTestStorageData(); $storage->setApplicableUsers($sourceApplicableUsers); $storage->setApplicableGroups($sourceApplicableGroups); diff --git a/apps/files_external/tests/Service/StoragesServiceTest.php b/apps/files_external/tests/Service/StoragesServiceTest.php index 0936912b221..40cba73a74f 100644 --- a/apps/files_external/tests/Service/StoragesServiceTest.php +++ b/apps/files_external/tests/Service/StoragesServiceTest.php @@ -248,7 +248,7 @@ abstract class StoragesServiceTest extends \Test\TestCase { $this->service->updateStorage($storage); } - public function testNonExistingStorage() { + public function testNonExistingStorage(): void { $this->expectException(\OCA\Files_External\NotFoundException::class); $this->ActualNonExistingStorageTest(); @@ -281,7 +281,7 @@ abstract class StoragesServiceTest extends \Test\TestCase { /** * @dataProvider deleteStorageDataProvider */ - public function testDeleteStorage($backendOptions, $rustyStorageId) { + public function testDeleteStorage($backendOptions, $rustyStorageId): void { $backend = $this->backendService->getBackend('identifier:\OCA\Files_External\Lib\Backend\DAV'); $authMechanism = $this->backendService->getAuthMechanism('identifier:\Auth\Mechanism'); $storage = new StorageConfig(255); @@ -352,13 +352,13 @@ abstract class StoragesServiceTest extends \Test\TestCase { $this->service->removeStorage(255); } - public function testDeleteUnexistingStorage() { + public function testDeleteUnexistingStorage(): void { $this->expectException(\OCA\Files_External\NotFoundException::class); $this->actualDeletedUnexistingStorageTest(); } - public function testCreateStorage() { + public function testCreateStorage(): void { $mountPoint = 'mount'; $backendIdentifier = 'identifier:\OCA\Files_External\Lib\Backend\SMB'; $authMechanismIdentifier = 'identifier:\Auth\Mechanism'; @@ -392,7 +392,7 @@ abstract class StoragesServiceTest extends \Test\TestCase { $this->assertEquals($priority, $storage->getPriority()); } - public function testCreateStorageInvalidClass() { + public function testCreateStorageInvalidClass(): void { $storage = $this->service->createStorage( 'mount', 'identifier:\OC\Not\A\Backend', @@ -402,7 +402,7 @@ abstract class StoragesServiceTest extends \Test\TestCase { $this->assertInstanceOf(InvalidBackend::class, $storage->getBackend()); } - public function testCreateStorageInvalidAuthMechanismClass() { + public function testCreateStorageInvalidAuthMechanismClass(): void { $storage = $this->service->createStorage( 'mount', 'identifier:\OCA\Files_External\Lib\Backend\SMB', @@ -412,7 +412,7 @@ abstract class StoragesServiceTest extends \Test\TestCase { $this->assertInstanceOf(InvalidAuth::class, $storage->getAuthMechanism()); } - public function testGetStoragesBackendNotVisible() { + public function testGetStoragesBackendNotVisible(): void { $backend = $this->backendService->getBackend('identifier:\OCA\Files_External\Lib\Backend\SMB'); $backend->expects($this->once()) ->method('isVisibleFor') @@ -435,7 +435,7 @@ abstract class StoragesServiceTest extends \Test\TestCase { $this->assertEmpty($this->service->getStorages()); } - public function testGetStoragesAuthMechanismNotVisible() { + public function testGetStoragesAuthMechanismNotVisible(): void { $backend = $this->backendService->getBackend('identifier:\OCA\Files_External\Lib\Backend\SMB'); $backend->method('isVisibleFor') ->with($this->service->getVisibilityType()) @@ -498,7 +498,7 @@ abstract class StoragesServiceTest extends \Test\TestCase { ); } - public function testUpdateStorageMountPoint() { + public function testUpdateStorageMountPoint(): void { $backend = $this->backendService->getBackend('identifier:\OCA\Files_External\Lib\Backend\SMB'); $authMechanism = $this->backendService->getAuthMechanism('identifier:\Auth\Mechanism'); diff --git a/apps/files_external/tests/Service/UserGlobalStoragesServiceTest.php b/apps/files_external/tests/Service/UserGlobalStoragesServiceTest.php index e08f3bd4d7d..992960a6ea1 100644 --- a/apps/files_external/tests/Service/UserGlobalStoragesServiceTest.php +++ b/apps/files_external/tests/Service/UserGlobalStoragesServiceTest.php @@ -108,7 +108,7 @@ class UserGlobalStoragesServiceTest extends GlobalStoragesServiceTest { /** * @dataProvider applicableStorageProvider */ - public function testGetStorageWithApplicable($applicableUsers, $applicableGroups, $isVisible) { + public function testGetStorageWithApplicable($applicableUsers, $applicableGroups, $isVisible): void { $backend = $this->backendService->getBackend('identifier:\OCA\Files_External\Lib\Backend\SMB'); $authMechanism = $this->backendService->getAuthMechanism('identifier:\Auth\Mechanism'); @@ -139,7 +139,7 @@ class UserGlobalStoragesServiceTest extends GlobalStoragesServiceTest { } - public function testAddStorage($storageParams = null) { + public function testAddStorage($storageParams = null): void { $this->expectException(\DomainException::class); $backend = $this->backendService->getBackend('identifier:\OCA\Files_External\Lib\Backend\SMB'); @@ -155,7 +155,7 @@ class UserGlobalStoragesServiceTest extends GlobalStoragesServiceTest { } - public function testUpdateStorage($storageParams = null) { + public function testUpdateStorage($storageParams = null): void { $this->expectException(\DomainException::class); $backend = $this->backendService->getBackend('identifier:\OCA\Files_External\Lib\Backend\SMB'); @@ -175,7 +175,7 @@ class UserGlobalStoragesServiceTest extends GlobalStoragesServiceTest { } - public function testNonExistingStorage() { + public function testNonExistingStorage(): void { $this->expectException(\DomainException::class); $this->ActualNonExistingStorageTest(); @@ -184,7 +184,7 @@ class UserGlobalStoragesServiceTest extends GlobalStoragesServiceTest { /** * @dataProvider deleteStorageDataProvider */ - public function testDeleteStorage($backendOptions, $rustyStorageId) { + public function testDeleteStorage($backendOptions, $rustyStorageId): void { $this->expectException(\DomainException::class); $backend = $this->backendService->getBackend('identifier:\OCA\Files_External\Lib\Backend\SMB'); @@ -203,7 +203,7 @@ class UserGlobalStoragesServiceTest extends GlobalStoragesServiceTest { } - public function testDeleteUnexistingStorage() { + public function testDeleteUnexistingStorage(): void { $this->expectException(\DomainException::class); $this->actualDeletedUnexistingStorageTest(); @@ -244,7 +244,7 @@ class UserGlobalStoragesServiceTest extends GlobalStoragesServiceTest { $priority1, $applicableUsers1, $applicableGroups1, $priority2, $applicableUsers2, $applicableGroups2, $expectedPrecedence - ) { + ): void { $backend = $this->backendService->getBackend('identifier:\OCA\Files_External\Lib\Backend\SMB'); $backend->method('isVisibleFor') ->willReturn(true); @@ -284,67 +284,67 @@ class UserGlobalStoragesServiceTest extends GlobalStoragesServiceTest { } } - public function testGetStoragesBackendNotVisible() { + public function testGetStoragesBackendNotVisible(): void { // we don't test this here $this->addToAssertionCount(1); } - public function testGetStoragesAuthMechanismNotVisible() { + public function testGetStoragesAuthMechanismNotVisible(): void { // we don't test this here $this->addToAssertionCount(1); } - public function testHooksAddStorage($a = null, $b = null, $c = null) { + public function testHooksAddStorage($a = null, $b = null, $c = null): void { // we don't test this here $this->addToAssertionCount(1); } - public function testHooksUpdateStorage($a = null, $b = null, $c = null, $d = null, $e = null) { + public function testHooksUpdateStorage($a = null, $b = null, $c = null, $d = null, $e = null): void { // we don't test this here $this->addToAssertionCount(1); } - public function testHooksRenameMountPoint() { + public function testHooksRenameMountPoint(): void { // we don't test this here $this->addToAssertionCount(1); } - public function testHooksDeleteStorage($a = null, $b = null, $c = null) { + public function testHooksDeleteStorage($a = null, $b = null, $c = null): void { // we don't test this here $this->addToAssertionCount(1); } - public function testLegacyConfigConversionApplicableAll() { + public function testLegacyConfigConversionApplicableAll(): void { // we don't test this here $this->addToAssertionCount(1); } - public function testLegacyConfigConversionApplicableUserAndGroup() { + public function testLegacyConfigConversionApplicableUserAndGroup(): void { // we don't test this here $this->addToAssertionCount(1); } - public function testReadLegacyConfigAndGenerateConfigId() { + public function testReadLegacyConfigAndGenerateConfigId(): void { // we don't test this here $this->addToAssertionCount(1); } - public function testReadLegacyConfigNoAuthMechanism() { + public function testReadLegacyConfigNoAuthMechanism(): void { // we don't test this here $this->addToAssertionCount(1); } - public function testReadLegacyConfigClass() { + public function testReadLegacyConfigClass(): void { // we don't test this here $this->addToAssertionCount(1); } - public function testReadEmptyMountPoint() { + public function testReadEmptyMountPoint(): void { // we don't test this here $this->addToAssertionCount(1); } - public function testUpdateStorageMountPoint() { + public function testUpdateStorageMountPoint(): void { // we don't test this here $this->addToAssertionCount(1); } diff --git a/apps/files_external/tests/Service/UserStoragesServiceTest.php b/apps/files_external/tests/Service/UserStoragesServiceTest.php index 370b34245c2..cb7abfaf725 100644 --- a/apps/files_external/tests/Service/UserStoragesServiceTest.php +++ b/apps/files_external/tests/Service/UserStoragesServiceTest.php @@ -65,7 +65,7 @@ class UserStoragesServiceTest extends StoragesServiceTest { ]); } - public function testAddStorage() { + public function testAddStorage(): void { $storage = $this->makeTestStorageData(); $newStorage = $this->service->addStorage($storage); @@ -93,7 +93,7 @@ class UserStoragesServiceTest extends StoragesServiceTest { $this->assertEquals($id + 1, $nextStorage->getId()); } - public function testUpdateStorage() { + public function testUpdateStorage(): void { $storage = $this->makeStorageConfig([ 'mountPoint' => 'mountpoint', 'backendIdentifier' => 'identifier:\OCA\Files_External\Lib\Backend\SMB', @@ -128,7 +128,7 @@ class UserStoragesServiceTest extends StoragesServiceTest { /** * @dataProvider deleteStorageDataProvider */ - public function testDeleteStorage($backendOptions, $rustyStorageId) { + public function testDeleteStorage($backendOptions, $rustyStorageId): void { parent::testDeleteStorage($backendOptions, $rustyStorageId); // hook called once for user (first one was during test creation) @@ -141,7 +141,7 @@ class UserStoragesServiceTest extends StoragesServiceTest { ); } - public function testHooksRenameMountPoint() { + public function testHooksRenameMountPoint(): void { $storage = $this->makeTestStorageData(); $storage = $this->service->addStorage($storage); @@ -170,7 +170,7 @@ class UserStoragesServiceTest extends StoragesServiceTest { } - public function testGetAdminStorage() { + public function testGetAdminStorage(): void { $this->expectException(\OCA\Files_External\NotFoundException::class); $backend = $this->backendService->getBackend('identifier:\OCA\Files_External\Lib\Backend\SMB'); diff --git a/apps/files_external/tests/Settings/AdminTest.php b/apps/files_external/tests/Settings/AdminTest.php index 1d584814da8..602e0124950 100644 --- a/apps/files_external/tests/Settings/AdminTest.php +++ b/apps/files_external/tests/Settings/AdminTest.php @@ -40,7 +40,7 @@ class AdminTest extends TestCase { ); } - public function testGetForm() { + public function testGetForm(): void { $this->encryptionManager ->expects($this->once()) ->method('isEnabled') @@ -85,11 +85,11 @@ class AdminTest extends TestCase { $this->assertEquals($expected, $this->admin->getForm()); } - public function testGetSection() { + public function testGetSection(): void { $this->assertSame('externalstorages', $this->admin->getSection()); } - public function testGetPriority() { + public function testGetPriority(): void { $this->assertSame(40, $this->admin->getPriority()); } } diff --git a/apps/files_external/tests/Settings/SectionTest.php b/apps/files_external/tests/Settings/SectionTest.php index e9f47cab19d..9154106ff8a 100644 --- a/apps/files_external/tests/Settings/SectionTest.php +++ b/apps/files_external/tests/Settings/SectionTest.php @@ -29,11 +29,11 @@ class SectionTest extends TestCase { ); } - public function testGetID() { + public function testGetID(): void { $this->assertSame('externalstorages', $this->section->getID()); } - public function testGetName() { + public function testGetName(): void { $this->l ->expects($this->once()) ->method('t') @@ -43,7 +43,7 @@ class SectionTest extends TestCase { $this->assertSame('External storage', $this->section->getName()); } - public function testGetPriority() { + public function testGetPriority(): void { $this->assertSame(10, $this->section->getPriority()); } } diff --git a/apps/files_external/tests/Storage/Amazons3MultiPartTest.php b/apps/files_external/tests/Storage/Amazons3MultiPartTest.php index 3db468b0fa0..1ac18406d24 100644 --- a/apps/files_external/tests/Storage/Amazons3MultiPartTest.php +++ b/apps/files_external/tests/Storage/Amazons3MultiPartTest.php @@ -40,11 +40,11 @@ class Amazons3MultiPartTest extends \Test\Files\Storage\Storage { parent::tearDown(); } - public function testStat() { + public function testStat(): void { $this->markTestSkipped('S3 doesn\'t update the parents folder mtime'); } - public function testHashInFileName() { + public function testHashInFileName(): void { $this->markTestSkipped('Localstack has a bug with hashes in filename'); } } diff --git a/apps/files_external/tests/Storage/Amazons3Test.php b/apps/files_external/tests/Storage/Amazons3Test.php index bffe98c3f4d..fd7fd9225c9 100644 --- a/apps/files_external/tests/Storage/Amazons3Test.php +++ b/apps/files_external/tests/Storage/Amazons3Test.php @@ -38,11 +38,11 @@ class Amazons3Test extends \Test\Files\Storage\Storage { parent::tearDown(); } - public function testStat() { + public function testStat(): void { $this->markTestSkipped('S3 doesn\'t update the parents folder mtime'); } - public function testHashInFileName() { + public function testHashInFileName(): void { $this->markTestSkipped('Localstack has a bug with hashes in filename'); } } diff --git a/apps/files_external/tests/Storage/FtpTest.php b/apps/files_external/tests/Storage/FtpTest.php index 24f7c511e93..c6a1d8f77ba 100644 --- a/apps/files_external/tests/Storage/FtpTest.php +++ b/apps/files_external/tests/Storage/FtpTest.php @@ -55,7 +55,7 @@ class FtpTest extends \Test\Files\Storage\Storage { /** * mtime for folders is only with a minute resolution */ - public function testStat() { + public function testStat(): void { $textFile = \OC::$SERVERROOT . '/tests/data/lorem.txt'; $ctimeStart = time(); $this->instance->file_put_contents('/lorem.txt', file_get_contents($textFile)); diff --git a/apps/files_external/tests/Storage/SFTP_KeyTest.php b/apps/files_external/tests/Storage/SFTP_KeyTest.php index c1aaf0b13a3..9be3cb7d3e8 100644 --- a/apps/files_external/tests/Storage/SFTP_KeyTest.php +++ b/apps/files_external/tests/Storage/SFTP_KeyTest.php @@ -41,39 +41,39 @@ class SFTP_KeyTest extends \Test\Files\Storage\Storage { } - public function testInvalidAddressShouldThrowException() { + public function testInvalidAddressShouldThrowException(): void { $this->expectException(\InvalidArgumentException::class); // I'd use example.com for this, but someone decided to break the spec and make it resolve $this->instance->assertHostAddressValid('notarealaddress...'); } - public function testValidAddressShouldPass() { + public function testValidAddressShouldPass(): void { $this->assertTrue($this->instance->assertHostAddressValid('localhost')); } - public function testNegativePortNumberShouldThrowException() { + public function testNegativePortNumberShouldThrowException(): void { $this->expectException(\InvalidArgumentException::class); $this->instance->assertPortNumberValid('-1'); } - public function testNonNumericalPortNumberShouldThrowException() { + public function testNonNumericalPortNumberShouldThrowException(): void { $this->expectException(\InvalidArgumentException::class); $this->instance->assertPortNumberValid('a'); } - public function testHighPortNumberShouldThrowException() { + public function testHighPortNumberShouldThrowException(): void { $this->expectException(\InvalidArgumentException::class); $this->instance->assertPortNumberValid('65536'); } - public function testValidPortNumberShouldPass() { + public function testValidPortNumberShouldPass(): void { $this->assertTrue($this->instance->assertPortNumberValid('22222')); } } diff --git a/apps/files_external/tests/Storage/SftpTest.php b/apps/files_external/tests/Storage/SftpTest.php index ce7d7461ba8..cc29486f426 100644 --- a/apps/files_external/tests/Storage/SftpTest.php +++ b/apps/files_external/tests/Storage/SftpTest.php @@ -47,7 +47,7 @@ class SftpTest extends \Test\Files\Storage\Storage { /** * @dataProvider configProvider */ - public function testStorageId($config, $expectedStorageId) { + public function testStorageId($config, $expectedStorageId): void { $instance = new SFTP($config); $this->assertEquals($expectedStorageId, $instance->getId()); } diff --git a/apps/files_external/tests/Storage/SmbTest.php b/apps/files_external/tests/Storage/SmbTest.php index 437ef9a1cdf..d5a83905112 100644 --- a/apps/files_external/tests/Storage/SmbTest.php +++ b/apps/files_external/tests/Storage/SmbTest.php @@ -54,14 +54,14 @@ class SmbTest extends \Test\Files\Storage\Storage { return [['folder']]; } - public function testRenameWithSpaces() { + public function testRenameWithSpaces(): void { $this->instance->mkdir('with spaces'); $result = $this->instance->rename('with spaces', 'foo bar'); $this->assertTrue($result); $this->assertTrue($this->instance->is_dir('foo bar')); } - public function testStorageId() { + public function testStorageId(): void { $this->instance = new SMB([ 'host' => 'testhost', 'user' => 'testuser', @@ -73,7 +73,7 @@ class SmbTest extends \Test\Files\Storage\Storage { $this->instance = null; } - public function testNotifyGetChanges() { + public function testNotifyGetChanges(): void { $lastError = null; for ($i = 0; $i < 5; $i++) { try { @@ -130,7 +130,7 @@ class SmbTest extends \Test\Files\Storage\Storage { } } - public function testNotifyListen() { + public function testNotifyListen(): void { $notifyHandler = $this->instance->notify(''); usleep(100 * 1000); //give time for the notify to start $this->instance->file_put_contents('/newfile.txt', 'test content'); @@ -153,7 +153,7 @@ class SmbTest extends \Test\Files\Storage\Storage { } } - public function testRenameRoot() { + public function testRenameRoot(): void { // root can't be renamed $this->assertFalse($this->instance->rename('', 'foo1')); @@ -162,12 +162,12 @@ class SmbTest extends \Test\Files\Storage\Storage { $this->instance->rmdir('foo2'); } - public function testUnlinkRoot() { + public function testUnlinkRoot(): void { // root can't be deleted $this->assertFalse($this->instance->unlink('')); } - public function testRmdirRoot() { + public function testRmdirRoot(): void { // root can't be deleted $this->assertFalse($this->instance->rmdir('')); } diff --git a/apps/files_external/tests/Storage/SwiftTest.php b/apps/files_external/tests/Storage/SwiftTest.php index 53ca499e4eb..c21c8c6f506 100644 --- a/apps/files_external/tests/Storage/SwiftTest.php +++ b/apps/files_external/tests/Storage/SwiftTest.php @@ -53,7 +53,7 @@ class SwiftTest extends \Test\Files\Storage\Storage { parent::tearDown(); } - public function testStat() { + public function testStat(): void { $this->markTestSkipped('Swift doesn\'t update the parents folder mtime'); } } diff --git a/apps/files_external/tests/Storage/WebdavTest.php b/apps/files_external/tests/Storage/WebdavTest.php index a063ddebb0d..872f1b5d0e2 100644 --- a/apps/files_external/tests/Storage/WebdavTest.php +++ b/apps/files_external/tests/Storage/WebdavTest.php @@ -41,7 +41,7 @@ class WebdavTest extends \Test\Files\Storage\Storage { parent::tearDown(); } - public function testMimetypeFallback() { + public function testMimetypeFallback(): void { $this->instance->file_put_contents('foo.bar', 'asd'); /** @var Detection $mimeDetector */ diff --git a/apps/files_external/tests/StorageConfigTest.php b/apps/files_external/tests/StorageConfigTest.php index fbbd9de94be..b67d69a3ce7 100644 --- a/apps/files_external/tests/StorageConfigTest.php +++ b/apps/files_external/tests/StorageConfigTest.php @@ -12,7 +12,7 @@ use OCA\Files_External\Lib\DefinitionParameter; use OCA\Files_External\Lib\StorageConfig; class StorageConfigTest extends \Test\TestCase { - public function testJsonSerialization() { + public function testJsonSerialization(): void { $backend = $this->getMockBuilder(Backend::class) ->disableOriginalConstructor() ->getMock(); diff --git a/apps/files_reminders/l10n/ru.js b/apps/files_reminders/l10n/ru.js index fa2ce38cf63..77b9f6f5134 100644 --- a/apps/files_reminders/l10n/ru.js +++ b/apps/files_reminders/l10n/ru.js @@ -7,14 +7,18 @@ OC.L10N.register( "View folder" : "Просмотреть папку", "Set file reminders" : "Установить напоминания о файлах", "**📣 File reminders**\n\nSet file reminders." : "**📣 Напоминания о файлах**\n\nУстановить напоминания о файлах.", + "We will remind you of this file" : "Мы напомним вам об этом файле", "Please choose a valid date & time" : "Пожалуйста, выберите правильную дату и время", "Cancel" : "Отмена", "Clear reminder" : "Очистить напоминание", "Set reminder" : "Установить напоминание", + "Set reminder for \"{fileName}\"" : "Установить напоминание для \"{fileName}\"", "Set reminder at custom date & time" : "Установить напоминание на индивидуальную дату и время", "Reminder set for \"{fileName}\"" : "Напоминание для \"{fileName}\"", "Failed to set reminder" : "Не удалось установить напоминание", + "Reminder cleared for \"{fileName}\"" : "Напоминание очищено для \"{fileName}\"", "Failed to clear reminder" : "Не удалось удалить напоминание", + "Reminder set" : "Установить напоминание", "Set custom reminder" : "Установить особое напоминание", "Later today" : "Позже сегодня", "Set reminder for later today" : "Установить напоминание позднее сегодня", diff --git a/apps/files_reminders/l10n/ru.json b/apps/files_reminders/l10n/ru.json index 3a6cb73bcf3..e7f4bc3bbde 100644 --- a/apps/files_reminders/l10n/ru.json +++ b/apps/files_reminders/l10n/ru.json @@ -5,14 +5,18 @@ "View folder" : "Просмотреть папку", "Set file reminders" : "Установить напоминания о файлах", "**📣 File reminders**\n\nSet file reminders." : "**📣 Напоминания о файлах**\n\nУстановить напоминания о файлах.", + "We will remind you of this file" : "Мы напомним вам об этом файле", "Please choose a valid date & time" : "Пожалуйста, выберите правильную дату и время", "Cancel" : "Отмена", "Clear reminder" : "Очистить напоминание", "Set reminder" : "Установить напоминание", + "Set reminder for \"{fileName}\"" : "Установить напоминание для \"{fileName}\"", "Set reminder at custom date & time" : "Установить напоминание на индивидуальную дату и время", "Reminder set for \"{fileName}\"" : "Напоминание для \"{fileName}\"", "Failed to set reminder" : "Не удалось установить напоминание", + "Reminder cleared for \"{fileName}\"" : "Напоминание очищено для \"{fileName}\"", "Failed to clear reminder" : "Не удалось удалить напоминание", + "Reminder set" : "Установить напоминание", "Set custom reminder" : "Установить особое напоминание", "Later today" : "Позже сегодня", "Set reminder for later today" : "Установить напоминание позднее сегодня", diff --git a/apps/files_sharing/l10n/cs.js b/apps/files_sharing/l10n/cs.js index a05f9614fab..87f4bfbb735 100644 --- a/apps/files_sharing/l10n/cs.js +++ b/apps/files_sharing/l10n/cs.js @@ -120,11 +120,16 @@ OC.L10N.register( "Note for recipient" : "Poznámka pro příjemce", "Add a note to help people understand what you are requesting." : "Přidejte poznámku vysvětlující lidem, o co žádáte.", "Select" : "Vybrat", + "Create a file request" : "Vytvořit žádost o soubor", + "File request created" : "Žádost o soubor vytvořena", + "File request" : "Žádost o soubor", "Cancel" : "Storno", + "Cancel the file request creation" : "Zrušit vytváření žádosti o soubor", "Close" : "Zavřít", "Continue" : "Pokračovat", "Error creating the share: {errorMessage}" : "Chyba při vytváření sdílení: {errorMessage}", "Error creating the share" : "Chyba při vytváření sdílení", + "_File request created and email sent_::_File request created and {count} emails sent_" : ["Byla vytvořena žádost o soubor a odeslán e-mail","Byla vytvořena žádost o soubor a odeslány {count} e-maily","Byla vytvořena žádost o soubor a odesláno {count} e-mailů","Byla vytvořena žádost o soubor a odesláno {count} e-mailů"], "Error while toggling options" : "Chyba při přepínání voleb", "Set default folder for accepted shares" : "Nastavit výchozí složku pro přijatá sdílení", "Reset" : "Vrátit na výchozí hodnoty", @@ -159,6 +164,7 @@ OC.L10N.register( "Create a new share link" : "Vytvořit nový odkaz pro sdílení", "{shareWith} by {initiator}" : "{shareWith} od {initiator}", "Shared via link by {initiator}" : "{initiator} sdílí odkazem", + "File request ({label})" : "Žádost o soubor ({label})", "Mail share ({label})" : "Sdílení e-mailem ({label})", "Share link ({label})" : "Odkaz na sdílení ({label})", "Share link ({index})" : "Odkaz na sdílení ({index})", @@ -234,6 +240,7 @@ OC.L10N.register( "Shared multiple times with different people" : "Nasdílet několikrát různým lidem", "Show sharing options" : "Zobrazit předvolby pro sdílení", "Shared with others" : "Sdíleno s ostatními", + "Create file request" : "Vytvořit žádost o soubor", "No file" : "Žádný soubor", "Public share" : "Veřejné sdílení", "Overview of shared files." : "Přehled nasdílených souborů", @@ -250,6 +257,10 @@ OC.L10N.register( "List of files that are shared by link." : "Seznam souborů, které jsou nasdílené odkazem.", "No shared links" : "Žádné sdílené odkazy", "Files and folders you shared by link will show up here" : "Zde budou zobrazeny soubory a složky, které jste nasdíleli jako odkazy", + "File requests" : "Žádosti o soubory", + "List of file requests." : "Seznam žádostí o soubory.", + "No file requests" : "Žádné žádosti o soubory", + "File requests you have created will show up here" : "Vytvořené žádosti o soubor se zobrazí zde", "Deleted shares" : "Smazaná sdílení", "List of shares you left." : "Seznam sdílení, které jste opustili.", "No deleted shares" : "Žádná smazaná sdílení", diff --git a/apps/files_sharing/l10n/cs.json b/apps/files_sharing/l10n/cs.json index 2dfbd50cf47..c0cf504e55a 100644 --- a/apps/files_sharing/l10n/cs.json +++ b/apps/files_sharing/l10n/cs.json @@ -118,11 +118,16 @@ "Note for recipient" : "Poznámka pro příjemce", "Add a note to help people understand what you are requesting." : "Přidejte poznámku vysvětlující lidem, o co žádáte.", "Select" : "Vybrat", + "Create a file request" : "Vytvořit žádost o soubor", + "File request created" : "Žádost o soubor vytvořena", + "File request" : "Žádost o soubor", "Cancel" : "Storno", + "Cancel the file request creation" : "Zrušit vytváření žádosti o soubor", "Close" : "Zavřít", "Continue" : "Pokračovat", "Error creating the share: {errorMessage}" : "Chyba při vytváření sdílení: {errorMessage}", "Error creating the share" : "Chyba při vytváření sdílení", + "_File request created and email sent_::_File request created and {count} emails sent_" : ["Byla vytvořena žádost o soubor a odeslán e-mail","Byla vytvořena žádost o soubor a odeslány {count} e-maily","Byla vytvořena žádost o soubor a odesláno {count} e-mailů","Byla vytvořena žádost o soubor a odesláno {count} e-mailů"], "Error while toggling options" : "Chyba při přepínání voleb", "Set default folder for accepted shares" : "Nastavit výchozí složku pro přijatá sdílení", "Reset" : "Vrátit na výchozí hodnoty", @@ -157,6 +162,7 @@ "Create a new share link" : "Vytvořit nový odkaz pro sdílení", "{shareWith} by {initiator}" : "{shareWith} od {initiator}", "Shared via link by {initiator}" : "{initiator} sdílí odkazem", + "File request ({label})" : "Žádost o soubor ({label})", "Mail share ({label})" : "Sdílení e-mailem ({label})", "Share link ({label})" : "Odkaz na sdílení ({label})", "Share link ({index})" : "Odkaz na sdílení ({index})", @@ -232,6 +238,7 @@ "Shared multiple times with different people" : "Nasdílet několikrát různým lidem", "Show sharing options" : "Zobrazit předvolby pro sdílení", "Shared with others" : "Sdíleno s ostatními", + "Create file request" : "Vytvořit žádost o soubor", "No file" : "Žádný soubor", "Public share" : "Veřejné sdílení", "Overview of shared files." : "Přehled nasdílených souborů", @@ -248,6 +255,10 @@ "List of files that are shared by link." : "Seznam souborů, které jsou nasdílené odkazem.", "No shared links" : "Žádné sdílené odkazy", "Files and folders you shared by link will show up here" : "Zde budou zobrazeny soubory a složky, které jste nasdíleli jako odkazy", + "File requests" : "Žádosti o soubory", + "List of file requests." : "Seznam žádostí o soubory.", + "No file requests" : "Žádné žádosti o soubory", + "File requests you have created will show up here" : "Vytvořené žádosti o soubor se zobrazí zde", "Deleted shares" : "Smazaná sdílení", "List of shares you left." : "Seznam sdílení, které jste opustili.", "No deleted shares" : "Žádná smazaná sdílení", diff --git a/apps/files_sharing/l10n/de.js b/apps/files_sharing/l10n/de.js index 677010a7076..f7a621f922b 100644 --- a/apps/files_sharing/l10n/de.js +++ b/apps/files_sharing/l10n/de.js @@ -113,6 +113,9 @@ OC.L10N.register( "You received {share} to group {group} as a share by {user}" : "Du hast {share} zur Gruppe {group} als Freigabe von {user} empfangen", "Accept" : "Akzeptieren", "Decline" : "Ablehnen", + "Remember to upload the files to %s" : "Denke daran, die Dateien auf %s hochzuladen", + "We would like to kindly remind you that you have not yet uploaded any files to the shared folder." : "Wir möchten dich freundlich daran erinnern, dass du bisher noch keine Dateien in den freigegebenen Ordner hochgeladen hast.", + "Open \"%s\"" : "\"%s\" öffnen", "This application enables people to share files within Nextcloud. If enabled, the admin can choose which groups can share files. The applicable people can then share files and folders with other accounts and groups within Nextcloud. In addition, if the admin enables the share link feature, an external link can be used to share files with other people outside of Nextcloud. Admins can also enforce passwords, expirations dates, and enable server to server sharing via share links, as well as sharing from mobile devices.\nTurning the feature off removes shared files and folders on the server for all share recipients, and also on the sync clients and mobile apps. More information is available in the Nextcloud Documentation." : "Diese App ermöglicht es Personen, Dateien innerhalb von Nextcloud zu teilen. Wenn aktiviert, kann die Administration wählen, welche Gruppen Dateien teilen können. Die entsprechenden Personen können dann Dateien und Ordner mit anderen Personen und Gruppen innerhalb von Nextcloud teilen. Wenn die Administration die Funktion zum Teilen von Links aktiviert, kann ein externer Link verwendet werden, um Dateien mit anderen Personen außerhalb von Nextcloud zu teilen. Die Administration kann auch Passwörter und Ablaufdaten erzwingen und die Freigabe von Server zu Server über Freigabelinks sowie die Freigabe von mobilen Geräten aus aktivieren.\nWenn du die Funktion deaktivierst, werden freigegebene Dateien und Ordner auf dem Server für alle Freigabeempfänger und auch auf den Sync-Clients und mobilen Apps entfernt. Weitere Informationen findest du in der Nextcloud-Dokumentation.", "People" : "Personen", "Filter accounts" : "Konten filtern", @@ -244,9 +247,14 @@ OC.L10N.register( "Note from" : "Notiz von", "Note:" : "Bemerkung:", "File drop" : "Dateiablage", + "Upload files to {foldername}." : "Dateien hochladen nach {foldername}.", + "By uploading files, you agree to the terms of service." : "Durch das Hochladen von Dateien stimmst du den Nutzungsbedingungen zu.", + "View terms of service" : "Nutzungsbedingungen anzeigen", "Terms of service" : "Nutzungsbedingungen", "{ownerDisplayName} shared a folder with you." : "{ownerDisplayName} hat einen Ordner mit dir geteilt.", "To upload files, you need to provide your name first." : "Um Dateien hochzuladen, musst du zunächst deinen Namen angeben.", + "Nickname" : "Spitzname", + "Enter your nickname" : "Gib deinen Spitznamen ein", "Upload files to {folder}" : "Dateien hochladen nach {folder}", "Submit name" : "Name übermitteln", "Allow upload and editing" : "Hochladen und Bearbeiten erlauben", @@ -283,6 +291,7 @@ OC.L10N.register( "Toggle list of others with access to this directory" : "Liste anderer Benutzer mit Zugriff auf dieses Verzeichnis umschalten", "Toggle list of others with access to this file" : "Liste anderer Benutzer mit Zugriff auf diese Datei umschalten", "Unable to fetch inherited shares" : "Vererbte Freigaben konnten nicht geladen werden", + "Link shares" : "Freigaben teilen", "Shares" : "Freigaben", "Unable to load the shares list" : "Liste der Freigaben konnte nicht geladen werden", "Expires {relativetime}" : "Läuft {relativetime} ab", @@ -300,8 +309,15 @@ OC.L10N.register( "Show sharing options" : "Freigabeoptionen anzeigen", "Shared with others" : "Von dir geteilt", "Create file request" : "Dateianfrage erstellen", + "Upload files to {foldername}" : "Dateien hochladen nach {foldername}", + "Public file share" : "Öffentliche Dateifreigabe", + "Public shared file." : "Öffentlich geteilte Datei.", "No file" : "Keine Datei", + "The file shared with you will show up here" : "Die mit dir geteilte Datei wird hier angezeigt", "Public share" : "Öffentliche Freigabe", + "Public shared files." : "Öffentlich geteilte Dateien.", + "No files" : "Keine Dateien", + "Files and folders shared with you will show up here" : "Mit dir geteilte Dateien und Ordner werden hier angezeigt", "Overview of shared files." : "Übersicht geteilter Dateien.", "No shares" : "Keine Freigaben", "Files and folders you shared or have been shared with you will show up here" : "Von dir oder mit dir geteilte Ordner und Dateien werden hier angezeigt werden.", diff --git a/apps/files_sharing/l10n/de.json b/apps/files_sharing/l10n/de.json index ce6247bcbdd..788beebe1e4 100644 --- a/apps/files_sharing/l10n/de.json +++ b/apps/files_sharing/l10n/de.json @@ -111,6 +111,9 @@ "You received {share} to group {group} as a share by {user}" : "Du hast {share} zur Gruppe {group} als Freigabe von {user} empfangen", "Accept" : "Akzeptieren", "Decline" : "Ablehnen", + "Remember to upload the files to %s" : "Denke daran, die Dateien auf %s hochzuladen", + "We would like to kindly remind you that you have not yet uploaded any files to the shared folder." : "Wir möchten dich freundlich daran erinnern, dass du bisher noch keine Dateien in den freigegebenen Ordner hochgeladen hast.", + "Open \"%s\"" : "\"%s\" öffnen", "This application enables people to share files within Nextcloud. If enabled, the admin can choose which groups can share files. The applicable people can then share files and folders with other accounts and groups within Nextcloud. In addition, if the admin enables the share link feature, an external link can be used to share files with other people outside of Nextcloud. Admins can also enforce passwords, expirations dates, and enable server to server sharing via share links, as well as sharing from mobile devices.\nTurning the feature off removes shared files and folders on the server for all share recipients, and also on the sync clients and mobile apps. More information is available in the Nextcloud Documentation." : "Diese App ermöglicht es Personen, Dateien innerhalb von Nextcloud zu teilen. Wenn aktiviert, kann die Administration wählen, welche Gruppen Dateien teilen können. Die entsprechenden Personen können dann Dateien und Ordner mit anderen Personen und Gruppen innerhalb von Nextcloud teilen. Wenn die Administration die Funktion zum Teilen von Links aktiviert, kann ein externer Link verwendet werden, um Dateien mit anderen Personen außerhalb von Nextcloud zu teilen. Die Administration kann auch Passwörter und Ablaufdaten erzwingen und die Freigabe von Server zu Server über Freigabelinks sowie die Freigabe von mobilen Geräten aus aktivieren.\nWenn du die Funktion deaktivierst, werden freigegebene Dateien und Ordner auf dem Server für alle Freigabeempfänger und auch auf den Sync-Clients und mobilen Apps entfernt. Weitere Informationen findest du in der Nextcloud-Dokumentation.", "People" : "Personen", "Filter accounts" : "Konten filtern", @@ -242,9 +245,14 @@ "Note from" : "Notiz von", "Note:" : "Bemerkung:", "File drop" : "Dateiablage", + "Upload files to {foldername}." : "Dateien hochladen nach {foldername}.", + "By uploading files, you agree to the terms of service." : "Durch das Hochladen von Dateien stimmst du den Nutzungsbedingungen zu.", + "View terms of service" : "Nutzungsbedingungen anzeigen", "Terms of service" : "Nutzungsbedingungen", "{ownerDisplayName} shared a folder with you." : "{ownerDisplayName} hat einen Ordner mit dir geteilt.", "To upload files, you need to provide your name first." : "Um Dateien hochzuladen, musst du zunächst deinen Namen angeben.", + "Nickname" : "Spitzname", + "Enter your nickname" : "Gib deinen Spitznamen ein", "Upload files to {folder}" : "Dateien hochladen nach {folder}", "Submit name" : "Name übermitteln", "Allow upload and editing" : "Hochladen und Bearbeiten erlauben", @@ -281,6 +289,7 @@ "Toggle list of others with access to this directory" : "Liste anderer Benutzer mit Zugriff auf dieses Verzeichnis umschalten", "Toggle list of others with access to this file" : "Liste anderer Benutzer mit Zugriff auf diese Datei umschalten", "Unable to fetch inherited shares" : "Vererbte Freigaben konnten nicht geladen werden", + "Link shares" : "Freigaben teilen", "Shares" : "Freigaben", "Unable to load the shares list" : "Liste der Freigaben konnte nicht geladen werden", "Expires {relativetime}" : "Läuft {relativetime} ab", @@ -298,8 +307,15 @@ "Show sharing options" : "Freigabeoptionen anzeigen", "Shared with others" : "Von dir geteilt", "Create file request" : "Dateianfrage erstellen", + "Upload files to {foldername}" : "Dateien hochladen nach {foldername}", + "Public file share" : "Öffentliche Dateifreigabe", + "Public shared file." : "Öffentlich geteilte Datei.", "No file" : "Keine Datei", + "The file shared with you will show up here" : "Die mit dir geteilte Datei wird hier angezeigt", "Public share" : "Öffentliche Freigabe", + "Public shared files." : "Öffentlich geteilte Dateien.", + "No files" : "Keine Dateien", + "Files and folders shared with you will show up here" : "Mit dir geteilte Dateien und Ordner werden hier angezeigt", "Overview of shared files." : "Übersicht geteilter Dateien.", "No shares" : "Keine Freigaben", "Files and folders you shared or have been shared with you will show up here" : "Von dir oder mit dir geteilte Ordner und Dateien werden hier angezeigt werden.", diff --git a/apps/files_sharing/l10n/fr.js b/apps/files_sharing/l10n/fr.js index ca2be049869..ec7961b802b 100644 --- a/apps/files_sharing/l10n/fr.js +++ b/apps/files_sharing/l10n/fr.js @@ -247,9 +247,14 @@ OC.L10N.register( "Note from" : "Note de", "Note:" : "Note :", "File drop" : "Dépôt de fichier", + "Upload files to {foldername}." : "Téléverser les fichiers vers {foldername}.", + "By uploading files, you agree to the terms of service." : "En téléchargeant des fichiers, vous acceptez les conditions d'utilisation du service.", + "View terms of service" : "Voir les conditions d'utilisation du service", "Terms of service" : "Conditions d'utilisation", "{ownerDisplayName} shared a folder with you." : "{ownerDisplayName} a partagé un dossier avec vous.", "To upload files, you need to provide your name first." : "Pour téléverser des fichiers, vous devez fournir votre nom.", + "Nickname" : "Pseudo", + "Enter your nickname" : "Saisissez votre pseudo", "Upload files to {folder}" : "Téléverser les fichiers dans {folder}", "Submit name" : "Confirmer votre nom", "Allow upload and editing" : "Autoriser le téléversement et la modification", @@ -286,6 +291,7 @@ OC.L10N.register( "Toggle list of others with access to this directory" : "Afficher/Masquer la liste des autres personnes ayant accès à ce dossier", "Toggle list of others with access to this file" : "Afficher/Masquer la liste des autres personnes ayant accès à ce fichier", "Unable to fetch inherited shares" : "Impossible de récupérer les partages hérités", + "Link shares" : "Partage de liens", "Shares" : "Partages", "Unable to load the shares list" : "Impossible de charger la liste des partages", "Expires {relativetime}" : "Expire {relativetime}", @@ -303,8 +309,15 @@ OC.L10N.register( "Show sharing options" : "Afficher les options de partage", "Shared with others" : "Partagés avec d’autres", "Create file request" : "Créer une demande de fichier", + "Upload files to {foldername}" : "Téléverser des fichiers vers {foldername}", + "Public file share" : "Partage de fichier public", + "Public shared file." : "Fichier partagé publiquement.", "No file" : "Aucun fichier", + "The file shared with you will show up here" : "Le fichier partagé avec vous apparaitra ici", "Public share" : "Partage public", + "Public shared files." : "Fichiers partagés publiquement.", + "No files" : "Aucun fichier", + "Files and folders shared with you will show up here" : "Les dossiers et fichiers partagés avec vous apparaitront ici.", "Overview of shared files." : "Vue d'ensemble des fichiers partagés.", "No shares" : "Aucun partage", "Files and folders you shared or have been shared with you will show up here" : "Les fichiers et les dossiers que vous avez partagés ou qui vous ont été partagés apparaîtront ici", diff --git a/apps/files_sharing/l10n/fr.json b/apps/files_sharing/l10n/fr.json index 2617c3c2459..7dd75b11aef 100644 --- a/apps/files_sharing/l10n/fr.json +++ b/apps/files_sharing/l10n/fr.json @@ -245,9 +245,14 @@ "Note from" : "Note de", "Note:" : "Note :", "File drop" : "Dépôt de fichier", + "Upload files to {foldername}." : "Téléverser les fichiers vers {foldername}.", + "By uploading files, you agree to the terms of service." : "En téléchargeant des fichiers, vous acceptez les conditions d'utilisation du service.", + "View terms of service" : "Voir les conditions d'utilisation du service", "Terms of service" : "Conditions d'utilisation", "{ownerDisplayName} shared a folder with you." : "{ownerDisplayName} a partagé un dossier avec vous.", "To upload files, you need to provide your name first." : "Pour téléverser des fichiers, vous devez fournir votre nom.", + "Nickname" : "Pseudo", + "Enter your nickname" : "Saisissez votre pseudo", "Upload files to {folder}" : "Téléverser les fichiers dans {folder}", "Submit name" : "Confirmer votre nom", "Allow upload and editing" : "Autoriser le téléversement et la modification", @@ -284,6 +289,7 @@ "Toggle list of others with access to this directory" : "Afficher/Masquer la liste des autres personnes ayant accès à ce dossier", "Toggle list of others with access to this file" : "Afficher/Masquer la liste des autres personnes ayant accès à ce fichier", "Unable to fetch inherited shares" : "Impossible de récupérer les partages hérités", + "Link shares" : "Partage de liens", "Shares" : "Partages", "Unable to load the shares list" : "Impossible de charger la liste des partages", "Expires {relativetime}" : "Expire {relativetime}", @@ -301,8 +307,15 @@ "Show sharing options" : "Afficher les options de partage", "Shared with others" : "Partagés avec d’autres", "Create file request" : "Créer une demande de fichier", + "Upload files to {foldername}" : "Téléverser des fichiers vers {foldername}", + "Public file share" : "Partage de fichier public", + "Public shared file." : "Fichier partagé publiquement.", "No file" : "Aucun fichier", + "The file shared with you will show up here" : "Le fichier partagé avec vous apparaitra ici", "Public share" : "Partage public", + "Public shared files." : "Fichiers partagés publiquement.", + "No files" : "Aucun fichier", + "Files and folders shared with you will show up here" : "Les dossiers et fichiers partagés avec vous apparaitront ici.", "Overview of shared files." : "Vue d'ensemble des fichiers partagés.", "No shares" : "Aucun partage", "Files and folders you shared or have been shared with you will show up here" : "Les fichiers et les dossiers que vous avez partagés ou qui vous ont été partagés apparaîtront ici", diff --git a/apps/files_sharing/l10n/ja.js b/apps/files_sharing/l10n/ja.js index 2d49f8b8ff8..ca36c49eac9 100644 --- a/apps/files_sharing/l10n/ja.js +++ b/apps/files_sharing/l10n/ja.js @@ -247,9 +247,14 @@ OC.L10N.register( "Note from" : "注釈", "Note:" : "注意:", "File drop" : "ファイルを転送", + "Upload files to {foldername}." : "{foldername}にファイルをアップロード", + "By uploading files, you agree to the terms of service." : "ファイルをアップロードすることで、利用規約に同意したことになります。", + "View terms of service" : "利用規約を見る", "Terms of service" : "サービス利用規約", "{ownerDisplayName} shared a folder with you." : "{ownerDisplayName}はあなたとフォルダを共有しました。", "To upload files, you need to provide your name first." : "ファイルをアップロードするには、最初に名前を入力する必要があります。", + "Nickname" : "ニックネーム", + "Enter your nickname" : "あなたのニックネームを入力してください", "Upload files to {folder}" : "{folder}にファイルをアップロード", "Submit name" : "名前を送信", "Allow upload and editing" : "アップロードと編集を許可", @@ -286,6 +291,7 @@ OC.L10N.register( "Toggle list of others with access to this directory" : "このフォルダーへのアクセス権を持つ他のユーザーリストを切り替えます", "Toggle list of others with access to this file" : "このファイルへのアクセス権を持つ他のユーザーのリストを切り替えます", "Unable to fetch inherited shares" : "継承された共有を取得できません", + "Link shares" : "リンク共有", "Shares" : "共有", "Unable to load the shares list" : "共有リストを読み込めません", "Expires {relativetime}" : "有効期限 {relativetime}", @@ -303,7 +309,15 @@ OC.L10N.register( "Show sharing options" : "共有オプションを表示", "Shared with others" : "他ユーザーと共有中", "Create file request" : "ファイルリクエストを作成", + "Upload files to {foldername}" : "{foldername}にファイルをアップロード", + "Public file share" : "公開ファイル共有", + "Public shared file." : "公開共有ファイル", + "No file" : "ファイルがありません", + "The file shared with you will show up here" : "あなたと共有されたファイルはここに表示されます", "Public share" : "公開共有", + "Public shared files." : "公開共有ファイル", + "No files" : "ファイルがありません", + "Files and folders shared with you will show up here" : "あなたと共有されたファイルやフォルダーはここに表示されます", "Overview of shared files." : "共有済みファイルの概要", "No shares" : "共有なし", "Files and folders you shared or have been shared with you will show up here" : "共有済みまたは、共有されたファイルやフォルダはここに表示されます", diff --git a/apps/files_sharing/l10n/ja.json b/apps/files_sharing/l10n/ja.json index efb73139355..898ab9281e9 100644 --- a/apps/files_sharing/l10n/ja.json +++ b/apps/files_sharing/l10n/ja.json @@ -245,9 +245,14 @@ "Note from" : "注釈", "Note:" : "注意:", "File drop" : "ファイルを転送", + "Upload files to {foldername}." : "{foldername}にファイルをアップロード", + "By uploading files, you agree to the terms of service." : "ファイルをアップロードすることで、利用規約に同意したことになります。", + "View terms of service" : "利用規約を見る", "Terms of service" : "サービス利用規約", "{ownerDisplayName} shared a folder with you." : "{ownerDisplayName}はあなたとフォルダを共有しました。", "To upload files, you need to provide your name first." : "ファイルをアップロードするには、最初に名前を入力する必要があります。", + "Nickname" : "ニックネーム", + "Enter your nickname" : "あなたのニックネームを入力してください", "Upload files to {folder}" : "{folder}にファイルをアップロード", "Submit name" : "名前を送信", "Allow upload and editing" : "アップロードと編集を許可", @@ -284,6 +289,7 @@ "Toggle list of others with access to this directory" : "このフォルダーへのアクセス権を持つ他のユーザーリストを切り替えます", "Toggle list of others with access to this file" : "このファイルへのアクセス権を持つ他のユーザーのリストを切り替えます", "Unable to fetch inherited shares" : "継承された共有を取得できません", + "Link shares" : "リンク共有", "Shares" : "共有", "Unable to load the shares list" : "共有リストを読み込めません", "Expires {relativetime}" : "有効期限 {relativetime}", @@ -301,7 +307,15 @@ "Show sharing options" : "共有オプションを表示", "Shared with others" : "他ユーザーと共有中", "Create file request" : "ファイルリクエストを作成", + "Upload files to {foldername}" : "{foldername}にファイルをアップロード", + "Public file share" : "公開ファイル共有", + "Public shared file." : "公開共有ファイル", + "No file" : "ファイルがありません", + "The file shared with you will show up here" : "あなたと共有されたファイルはここに表示されます", "Public share" : "公開共有", + "Public shared files." : "公開共有ファイル", + "No files" : "ファイルがありません", + "Files and folders shared with you will show up here" : "あなたと共有されたファイルやフォルダーはここに表示されます", "Overview of shared files." : "共有済みファイルの概要", "No shares" : "共有なし", "Files and folders you shared or have been shared with you will show up here" : "共有済みまたは、共有されたファイルやフォルダはここに表示されます", diff --git a/apps/files_sharing/l10n/pt_BR.js b/apps/files_sharing/l10n/pt_BR.js index 760e50216cb..1673d1373a4 100644 --- a/apps/files_sharing/l10n/pt_BR.js +++ b/apps/files_sharing/l10n/pt_BR.js @@ -113,6 +113,9 @@ OC.L10N.register( "You received {share} to group {group} as a share by {user}" : "Você recebeu {share} para o grupo {group} como um compartilhamento de {user}", "Accept" : "Aceitar", "Decline" : "Recusar", + "Remember to upload the files to %s" : "Lembre-se de enviar os arquivos para %s", + "We would like to kindly remind you that you have not yet uploaded any files to the shared folder." : "Gostaríamos de lembrar que você ainda não carregou nenhum arquivo para a pasta compartilhada.", + "Open \"%s\"" : "Abrir \"%s\"", "This application enables people to share files within Nextcloud. If enabled, the admin can choose which groups can share files. The applicable people can then share files and folders with other accounts and groups within Nextcloud. In addition, if the admin enables the share link feature, an external link can be used to share files with other people outside of Nextcloud. Admins can also enforce passwords, expirations dates, and enable server to server sharing via share links, as well as sharing from mobile devices.\nTurning the feature off removes shared files and folders on the server for all share recipients, and also on the sync clients and mobile apps. More information is available in the Nextcloud Documentation." : "Este aplicativo permite que as pessoas compartilhem arquivos dentro do Nextcloud. Se ativado, o administrador pode escolher quais grupos podem compartilhar arquivos. As pessoas aplicáveis podem então compartilhar arquivos e pastas com outras contas e grupos dentro do Nextcloud. Além disso, se o administrador ativar o recurso de compartilhamento de link, um link externo poderá ser usado para compartilhar arquivos com outras pessoas fora do Nextcloud. Os administradores também podem impor senhas, datas de expiração e permitir o compartilhamento de servidor para servidor por meio de links de compartilhamento, bem como compartilhamento de dispositivos móveis. \nDesativar o recurso remove arquivos e pastas compartilhados no servidor para todos os destinatários de compartilhamento e também nos clientes de sincronização e aplicativos móveis. Mais informações estão disponíveis na documentação do Nextcloud.", "People" : "Pessoas", "Filter accounts" : "Filtrar contas", @@ -244,9 +247,14 @@ OC.L10N.register( "Note from" : "Nota de", "Note:" : "Anotação:", "File drop" : "Baixar Arquivo ", + "Upload files to {foldername}." : "Subir arquivos para {foldername}.", + "By uploading files, you agree to the terms of service." : "Ao enviar arquivos, você concorda com os termos de serviço.", + "View terms of service" : "Ver os termos de serviço", "Terms of service" : "Termos de serviço", "{ownerDisplayName} shared a folder with you." : "{ownerDisplayName} compartilhou uma pasta com você.", "To upload files, you need to provide your name first." : "Para fazer upload de arquivos, você precisa primeiro fornecer seu nome.", + "Nickname" : "Apelido", + "Enter your nickname" : "Digite seu apelido", "Upload files to {folder}" : "Enviar arquivos para {folder}", "Submit name" : "Enviar nome", "Allow upload and editing" : "Permitir envio e edição", @@ -283,6 +291,7 @@ OC.L10N.register( "Toggle list of others with access to this directory" : "Alternar a lista de outras pessoas com acesso a este diretório", "Toggle list of others with access to this file" : "Alternar a lista de outras pessoas com acesso a este arquivo", "Unable to fetch inherited shares" : "Não foi possível buscar compartilhamentos herdados", + "Link shares" : "Compartilhamentos de links", "Shares" : "Compartilhamentos", "Unable to load the shares list" : "Não foi possível carregar a lista de compartilhamentos", "Expires {relativetime}" : "Expira {relativetime}", @@ -300,8 +309,15 @@ OC.L10N.register( "Show sharing options" : "Mostrar opções de compartilhamento", "Shared with others" : "Compartilhado com outros", "Create file request" : "Criar solicitação de arquivo", + "Upload files to {foldername}" : "Subir arquivos para {foldername}", + "Public file share" : "Compartilhamento público de arquivo", + "Public shared file." : "Arquivo público compartilhado.", "No file" : "Sem arquivo", + "The file shared with you will show up here" : "O arquivo compartilhado com você aparecerá aqui", "Public share" : "Compartilhamento público", + "Public shared files." : "Arquivos de compartilhamentos públicos.", + "No files" : "Não há arquivos", + "Files and folders shared with you will show up here" : "Arquivos e pastas compartilhados com você aparecerão aqui", "Overview of shared files." : "Visão geral dos arquivos compartilhados.", "No shares" : "Sem compartilhamentos", "Files and folders you shared or have been shared with you will show up here" : "Arquivos e pastas que você compartilhou ou foram compartilhados com você aparecerão aqui", diff --git a/apps/files_sharing/l10n/pt_BR.json b/apps/files_sharing/l10n/pt_BR.json index 4bfad8d9ec1..393c7afcfc6 100644 --- a/apps/files_sharing/l10n/pt_BR.json +++ b/apps/files_sharing/l10n/pt_BR.json @@ -111,6 +111,9 @@ "You received {share} to group {group} as a share by {user}" : "Você recebeu {share} para o grupo {group} como um compartilhamento de {user}", "Accept" : "Aceitar", "Decline" : "Recusar", + "Remember to upload the files to %s" : "Lembre-se de enviar os arquivos para %s", + "We would like to kindly remind you that you have not yet uploaded any files to the shared folder." : "Gostaríamos de lembrar que você ainda não carregou nenhum arquivo para a pasta compartilhada.", + "Open \"%s\"" : "Abrir \"%s\"", "This application enables people to share files within Nextcloud. If enabled, the admin can choose which groups can share files. The applicable people can then share files and folders with other accounts and groups within Nextcloud. In addition, if the admin enables the share link feature, an external link can be used to share files with other people outside of Nextcloud. Admins can also enforce passwords, expirations dates, and enable server to server sharing via share links, as well as sharing from mobile devices.\nTurning the feature off removes shared files and folders on the server for all share recipients, and also on the sync clients and mobile apps. More information is available in the Nextcloud Documentation." : "Este aplicativo permite que as pessoas compartilhem arquivos dentro do Nextcloud. Se ativado, o administrador pode escolher quais grupos podem compartilhar arquivos. As pessoas aplicáveis podem então compartilhar arquivos e pastas com outras contas e grupos dentro do Nextcloud. Além disso, se o administrador ativar o recurso de compartilhamento de link, um link externo poderá ser usado para compartilhar arquivos com outras pessoas fora do Nextcloud. Os administradores também podem impor senhas, datas de expiração e permitir o compartilhamento de servidor para servidor por meio de links de compartilhamento, bem como compartilhamento de dispositivos móveis. \nDesativar o recurso remove arquivos e pastas compartilhados no servidor para todos os destinatários de compartilhamento e também nos clientes de sincronização e aplicativos móveis. Mais informações estão disponíveis na documentação do Nextcloud.", "People" : "Pessoas", "Filter accounts" : "Filtrar contas", @@ -242,9 +245,14 @@ "Note from" : "Nota de", "Note:" : "Anotação:", "File drop" : "Baixar Arquivo ", + "Upload files to {foldername}." : "Subir arquivos para {foldername}.", + "By uploading files, you agree to the terms of service." : "Ao enviar arquivos, você concorda com os termos de serviço.", + "View terms of service" : "Ver os termos de serviço", "Terms of service" : "Termos de serviço", "{ownerDisplayName} shared a folder with you." : "{ownerDisplayName} compartilhou uma pasta com você.", "To upload files, you need to provide your name first." : "Para fazer upload de arquivos, você precisa primeiro fornecer seu nome.", + "Nickname" : "Apelido", + "Enter your nickname" : "Digite seu apelido", "Upload files to {folder}" : "Enviar arquivos para {folder}", "Submit name" : "Enviar nome", "Allow upload and editing" : "Permitir envio e edição", @@ -281,6 +289,7 @@ "Toggle list of others with access to this directory" : "Alternar a lista de outras pessoas com acesso a este diretório", "Toggle list of others with access to this file" : "Alternar a lista de outras pessoas com acesso a este arquivo", "Unable to fetch inherited shares" : "Não foi possível buscar compartilhamentos herdados", + "Link shares" : "Compartilhamentos de links", "Shares" : "Compartilhamentos", "Unable to load the shares list" : "Não foi possível carregar a lista de compartilhamentos", "Expires {relativetime}" : "Expira {relativetime}", @@ -298,8 +307,15 @@ "Show sharing options" : "Mostrar opções de compartilhamento", "Shared with others" : "Compartilhado com outros", "Create file request" : "Criar solicitação de arquivo", + "Upload files to {foldername}" : "Subir arquivos para {foldername}", + "Public file share" : "Compartilhamento público de arquivo", + "Public shared file." : "Arquivo público compartilhado.", "No file" : "Sem arquivo", + "The file shared with you will show up here" : "O arquivo compartilhado com você aparecerá aqui", "Public share" : "Compartilhamento público", + "Public shared files." : "Arquivos de compartilhamentos públicos.", + "No files" : "Não há arquivos", + "Files and folders shared with you will show up here" : "Arquivos e pastas compartilhados com você aparecerão aqui", "Overview of shared files." : "Visão geral dos arquivos compartilhados.", "No shares" : "Sem compartilhamentos", "Files and folders you shared or have been shared with you will show up here" : "Arquivos e pastas que você compartilhou ou foram compartilhados com você aparecerão aqui", diff --git a/apps/files_sharing/l10n/sv.js b/apps/files_sharing/l10n/sv.js index 91df2051ccd..a3b931dae11 100644 --- a/apps/files_sharing/l10n/sv.js +++ b/apps/files_sharing/l10n/sv.js @@ -241,7 +241,7 @@ OC.L10N.register( "Email" : "E-post", "Team" : "Team", "Talk conversation" : "Talk-konversation", - "Deck board" : "Deck-plank", + "Deck board" : "Deck-tavla", "ScienceMesh" : "ScienceMesh", "on {server}" : "på {server}", "Note from" : "Anteckning från", diff --git a/apps/files_sharing/l10n/sv.json b/apps/files_sharing/l10n/sv.json index 666b786966f..8ad0b0ef341 100644 --- a/apps/files_sharing/l10n/sv.json +++ b/apps/files_sharing/l10n/sv.json @@ -239,7 +239,7 @@ "Email" : "E-post", "Team" : "Team", "Talk conversation" : "Talk-konversation", - "Deck board" : "Deck-plank", + "Deck board" : "Deck-tavla", "ScienceMesh" : "ScienceMesh", "on {server}" : "på {server}", "Note from" : "Anteckning från", diff --git a/apps/files_sharing/l10n/uk.js b/apps/files_sharing/l10n/uk.js index 5d623e37393..e6f3afe3256 100644 --- a/apps/files_sharing/l10n/uk.js +++ b/apps/files_sharing/l10n/uk.js @@ -113,6 +113,9 @@ OC.L10N.register( "You received {share} to group {group} as a share by {user}" : "(user) надав(-ла) вам доступ до спільного ресурсу {share} в групі {group}", "Accept" : "Прийняти", "Decline" : "Відхилити", + "Remember to upload the files to %s" : "Пам'ятати про завантаження файлів до %s", + "We would like to kindly remind you that you have not yet uploaded any files to the shared folder." : "Нагадування про те, що ви ще не завантажили жодного файлу до спільного каталогу.", + "Open \"%s\"" : "Відкрити \"%s\"", "People" : "Люди", "Filter accounts" : "Фільтр облікових записів", "When should the request expire?" : "Коли спливе час дії запиту?", @@ -243,9 +246,14 @@ OC.L10N.register( "Note from" : "Примітка від", "Note:" : "Примітка:", "File drop" : "Відкинути файл", + "Upload files to {foldername}." : "Завантажити файли до {foldername}.", + "By uploading files, you agree to the terms of service." : "Завантаження файлів означає, що ви погоджуєтеся з умовами користування.", + "View terms of service" : "Переглянути умови користування.", "Terms of service" : "Умови використання", "{ownerDisplayName} shared a folder with you." : "{ownerDisplayName} поділив(-ла)ся з вами каталогом.", "To upload files, you need to provide your name first." : "Щоби завантажити файли, спочатку зазначте ваше ім'я.", + "Nickname" : "Прізвисько", + "Enter your nickname" : "Зазначте ваше прізвисько", "Upload files to {folder}" : "Завантажити файли до {folder}", "Submit name" : "Надайте ім'я", "Allow upload and editing" : "Може завантажувати та редагувати", @@ -282,6 +290,7 @@ OC.L10N.register( "Toggle list of others with access to this directory" : "Перемкнути подання списку інших користувачів, які мають доступ до цього каталогу", "Toggle list of others with access to this file" : "Перемкнути подання списку інших, які мають доступ до цього файлу", "Unable to fetch inherited shares" : "Неможливо отримати успадковані спільні ресурси", + "Link shares" : "Посилання на спільні ресурси", "Shares" : "Спільні", "Unable to load the shares list" : "Не вдалося завантажити список спільних ресурсів", "Expires {relativetime}" : "Термін дії закінчується {relativetime}", @@ -299,8 +308,15 @@ OC.L10N.register( "Show sharing options" : "Показати налаштування спільного доступу", "Shared with others" : "Ви поділилися", "Create file request" : "Створити запит на файл", + "Upload files to {foldername}" : "Завантажити файли до {foldername}", + "Public file share" : "Публічний спільний ресурс", + "Public shared file." : "Файл з публічним доступом.", "No file" : "Немає файлу", + "The file shared with you will show up here" : "Файл, яким поділилися з вами, буде показано тут", "Public share" : "Спільний ресурс", + "Public shared files." : "Файли з публічним доступом.", + "No files" : "Відсутні файли", + "Files and folders shared with you will show up here" : "Файли та каталоги, яким поділилися з вами, буде показано тут", "Overview of shared files." : "Перегляд файлів у спільному доступі.", "No shares" : "Відсутні спільні дані", "Files and folders you shared or have been shared with you will show up here" : "Тут показуватимуться файли та каталоги, якими ви поділилися, або якими поділилися з вами.", diff --git a/apps/files_sharing/l10n/uk.json b/apps/files_sharing/l10n/uk.json index 156d73163fe..8c52bca2b61 100644 --- a/apps/files_sharing/l10n/uk.json +++ b/apps/files_sharing/l10n/uk.json @@ -111,6 +111,9 @@ "You received {share} to group {group} as a share by {user}" : "(user) надав(-ла) вам доступ до спільного ресурсу {share} в групі {group}", "Accept" : "Прийняти", "Decline" : "Відхилити", + "Remember to upload the files to %s" : "Пам'ятати про завантаження файлів до %s", + "We would like to kindly remind you that you have not yet uploaded any files to the shared folder." : "Нагадування про те, що ви ще не завантажили жодного файлу до спільного каталогу.", + "Open \"%s\"" : "Відкрити \"%s\"", "People" : "Люди", "Filter accounts" : "Фільтр облікових записів", "When should the request expire?" : "Коли спливе час дії запиту?", @@ -241,9 +244,14 @@ "Note from" : "Примітка від", "Note:" : "Примітка:", "File drop" : "Відкинути файл", + "Upload files to {foldername}." : "Завантажити файли до {foldername}.", + "By uploading files, you agree to the terms of service." : "Завантаження файлів означає, що ви погоджуєтеся з умовами користування.", + "View terms of service" : "Переглянути умови користування.", "Terms of service" : "Умови використання", "{ownerDisplayName} shared a folder with you." : "{ownerDisplayName} поділив(-ла)ся з вами каталогом.", "To upload files, you need to provide your name first." : "Щоби завантажити файли, спочатку зазначте ваше ім'я.", + "Nickname" : "Прізвисько", + "Enter your nickname" : "Зазначте ваше прізвисько", "Upload files to {folder}" : "Завантажити файли до {folder}", "Submit name" : "Надайте ім'я", "Allow upload and editing" : "Може завантажувати та редагувати", @@ -280,6 +288,7 @@ "Toggle list of others with access to this directory" : "Перемкнути подання списку інших користувачів, які мають доступ до цього каталогу", "Toggle list of others with access to this file" : "Перемкнути подання списку інших, які мають доступ до цього файлу", "Unable to fetch inherited shares" : "Неможливо отримати успадковані спільні ресурси", + "Link shares" : "Посилання на спільні ресурси", "Shares" : "Спільні", "Unable to load the shares list" : "Не вдалося завантажити список спільних ресурсів", "Expires {relativetime}" : "Термін дії закінчується {relativetime}", @@ -297,8 +306,15 @@ "Show sharing options" : "Показати налаштування спільного доступу", "Shared with others" : "Ви поділилися", "Create file request" : "Створити запит на файл", + "Upload files to {foldername}" : "Завантажити файли до {foldername}", + "Public file share" : "Публічний спільний ресурс", + "Public shared file." : "Файл з публічним доступом.", "No file" : "Немає файлу", + "The file shared with you will show up here" : "Файл, яким поділилися з вами, буде показано тут", "Public share" : "Спільний ресурс", + "Public shared files." : "Файли з публічним доступом.", + "No files" : "Відсутні файли", + "Files and folders shared with you will show up here" : "Файли та каталоги, яким поділилися з вами, буде показано тут", "Overview of shared files." : "Перегляд файлів у спільному доступі.", "No shares" : "Відсутні спільні дані", "Files and folders you shared or have been shared with you will show up here" : "Тут показуватимуться файли та каталоги, якими ви поділилися, або якими поділилися з вами.", diff --git a/apps/files_sharing/lib/External/Manager.php b/apps/files_sharing/lib/External/Manager.php index 9d008170e68..a3226e9f3dd 100644 --- a/apps/files_sharing/lib/External/Manager.php +++ b/apps/files_sharing/lib/External/Manager.php @@ -119,7 +119,7 @@ class Manager { * @throws \Doctrine\DBAL\Exception */ public function addShare($remote, $token, $password, $name, $owner, $shareType, $accepted = false, $user = null, $remoteId = '', $parent = -1) { - $user = $user ? $user : $this->uid; + $user = $user ?? $this->uid; $accepted = $accepted ? IShare::STATUS_ACCEPTED : IShare::STATUS_PENDING; $name = Filesystem::normalizePath('/' . $name); diff --git a/apps/files_sharing/tests/ApiTest.php b/apps/files_sharing/tests/ApiTest.php index 9b95ac78770..fe0739cfcde 100644 --- a/apps/files_sharing/tests/ApiTest.php +++ b/apps/files_sharing/tests/ApiTest.php @@ -125,7 +125,7 @@ class ApiTest extends TestCase { ); } - public function testCreateShareUserFile() { + public function testCreateShareUserFile(): void { $this->setUp(); // for some reasons phpunit refuses to do this for us only for this test $ocs = $this->createOCS(self::TEST_FILES_SHARING_API_USER1); $result = $ocs->createShare($this->filename, \OCP\Constants::PERMISSION_ALL, IShare::TYPE_USER, self::TEST_FILES_SHARING_API_USER2); @@ -143,7 +143,7 @@ class ApiTest extends TestCase { $ocs->cleanup(); } - public function testCreateShareUserFolder() { + public function testCreateShareUserFolder(): void { $ocs = $this->createOCS(self::TEST_FILES_SHARING_API_USER1); $result = $ocs->createShare($this->folder, \OCP\Constants::PERMISSION_ALL, IShare::TYPE_USER, self::TEST_FILES_SHARING_API_USER2); $ocs->cleanup(); @@ -160,7 +160,7 @@ class ApiTest extends TestCase { } - public function testCreateShareGroupFile() { + public function testCreateShareGroupFile(): void { $ocs = $this->createOCS(self::TEST_FILES_SHARING_API_USER1); $result = $ocs->createShare($this->filename, \OCP\Constants::PERMISSION_ALL, IShare::TYPE_GROUP, self::TEST_FILES_SHARING_API_GROUP1); $ocs->cleanup(); @@ -176,7 +176,7 @@ class ApiTest extends TestCase { $ocs->cleanup(); } - public function testCreateShareGroupFolder() { + public function testCreateShareGroupFolder(): void { $ocs = $this->createOCS(self::TEST_FILES_SHARING_API_USER1); $result = $ocs->createShare($this->folder, \OCP\Constants::PERMISSION_ALL, IShare::TYPE_GROUP, self::TEST_FILES_SHARING_API_GROUP1); $ocs->cleanup(); @@ -195,7 +195,7 @@ class ApiTest extends TestCase { /** * @group RoutingWeirdness */ - public function testCreateShareLink() { + public function testCreateShareLink(): void { $ocs = $this->createOCS(self::TEST_FILES_SHARING_API_USER1); $result = $ocs->createShare($this->folder, \OCP\Constants::PERMISSION_ALL, IShare::TYPE_LINK); $ocs->cleanup(); @@ -220,7 +220,7 @@ class ApiTest extends TestCase { /** * @group RoutingWeirdness */ - public function testCreateShareLinkPublicUpload() { + public function testCreateShareLinkPublicUpload(): void { $ocs = $this->createOCS(self::TEST_FILES_SHARING_API_USER1); $result = $ocs->createShare($this->folder, \OCP\Constants::PERMISSION_ALL, IShare::TYPE_LINK, null, 'true'); $ocs->cleanup(); @@ -248,7 +248,7 @@ class ApiTest extends TestCase { $ocs->cleanup(); } - public function testEnforceLinkPassword() { + public function testEnforceLinkPassword(): void { $password = md5(time()); $config = \OC::$server->getConfig(); $config->setAppValue('core', 'shareapi_enforce_links_password', 'yes'); @@ -302,7 +302,7 @@ class ApiTest extends TestCase { /** * @medium */ - public function testSharePermissions() { + public function testSharePermissions(): void { // sharing file to a user should work if shareapi_exclude_groups is set // to no \OC::$server->getConfig()->setAppValue('core', 'shareapi_exclude_groups', 'no'); @@ -353,7 +353,7 @@ class ApiTest extends TestCase { /** * @medium */ - public function testGetAllShares() { + public function testGetAllShares(): void { $node = $this->userFolder->get($this->filename); $share = $this->shareManager->newShare(); @@ -374,7 +374,7 @@ class ApiTest extends TestCase { $this->shareManager->deleteShare($share); } - public function testGetAllSharesWithMe() { + public function testGetAllSharesWithMe(): void { $this->loginAsUser(self::TEST_FILES_SHARING_API_USER2); $this->logout(); @@ -414,7 +414,7 @@ class ApiTest extends TestCase { * @medium * @group RoutingWeirdness */ - public function testPublicLinkUrl() { + public function testPublicLinkUrl(): void { $ocs = $this->createOCS(self::TEST_FILES_SHARING_API_USER1); $result = $ocs->createShare($this->folder, \OCP\Constants::PERMISSION_ALL, IShare::TYPE_LINK); $ocs->cleanup(); @@ -463,7 +463,7 @@ class ApiTest extends TestCase { * @depends testCreateShareUserFile * @depends testCreateShareLink */ - public function testGetShareFromSource() { + public function testGetShareFromSource(): void { $node = $this->userFolder->get($this->filename); $share = $this->shareManager->newShare(); $share->setNode($node) @@ -496,7 +496,7 @@ class ApiTest extends TestCase { * @depends testCreateShareUserFile * @depends testCreateShareLink */ - public function testGetShareFromSourceWithReshares() { + public function testGetShareFromSourceWithReshares(): void { $node = $this->userFolder->get($this->filename); $share1 = $this->shareManager->newShare(); $share1->setNode($node) @@ -537,7 +537,7 @@ class ApiTest extends TestCase { * @medium * @depends testCreateShareUserFile */ - public function testGetShareFromId() { + public function testGetShareFromId(): void { $node = $this->userFolder->get($this->filename); $share1 = $this->shareManager->newShare(); $share1->setNode($node) @@ -561,7 +561,7 @@ class ApiTest extends TestCase { /** * @medium */ - public function testGetShareFromFolder() { + public function testGetShareFromFolder(): void { $node1 = $this->userFolder->get($this->filename); $share1 = $this->shareManager->newShare(); $share1->setNode($node1) @@ -591,7 +591,7 @@ class ApiTest extends TestCase { $this->shareManager->deleteShare($share2); } - public function testGetShareFromFolderWithFile() { + public function testGetShareFromFolderWithFile(): void { $node1 = $this->userFolder->get($this->filename); $share1 = $this->shareManager->newShare(); $share1->setNode($node1) @@ -617,7 +617,7 @@ class ApiTest extends TestCase { * share a folder, than reshare a file within the shared folder and check if we construct the correct path * @medium */ - public function testGetShareFromFolderReshares() { + public function testGetShareFromFolderReshares(): void { $node1 = $this->userFolder->get($this->folder); $share1 = $this->shareManager->newShare(); $share1->setNode($node1) @@ -677,7 +677,7 @@ class ApiTest extends TestCase { * reshare a sub folder and check if we get the correct path * @medium */ - public function testGetShareFromSubFolderReShares() { + public function testGetShareFromSubFolderReShares(): void { $node1 = $this->userFolder->get($this->folder . $this->subfolder); $share1 = $this->shareManager->newShare(); $share1->setNode($node1) @@ -796,7 +796,7 @@ class ApiTest extends TestCase { * test multiple shared folder if the path gets constructed correctly * @medium */ - public function testGetShareMultipleSharedFolder() { + public function testGetShareMultipleSharedFolder(): void { $this->setUp(); $node1 = $this->userFolder->get($this->folder . $this->subfolder); $share1 = $this->shareManager->newShare(); @@ -861,7 +861,7 @@ class ApiTest extends TestCase { * test re-re-share of folder if the path gets constructed correctly * @medium */ - public function testGetShareFromFileReReShares() { + public function testGetShareFromFileReReShares(): void { $node1 = $this->userFolder->get($this->folder . $this->subfolder); $share1 = $this->shareManager->newShare(); $share1->setNode($node1) @@ -916,7 +916,7 @@ class ApiTest extends TestCase { /** * @medium */ - public function testGetShareFromUnknownId() { + public function testGetShareFromUnknownId(): void { $ocs = $this->createOCS(self::TEST_FILES_SHARING_API_USER3); try { $ocs->getShare(0); @@ -932,7 +932,7 @@ class ApiTest extends TestCase { * @depends testCreateShareUserFile * @depends testCreateShareLink */ - public function testUpdateShare() { + public function testUpdateShare(): void { $password = md5(time()); $node1 = $this->userFolder->get($this->filename); @@ -992,7 +992,7 @@ class ApiTest extends TestCase { /** * @medium */ - public function testUpdateShareUpload() { + public function testUpdateShareUpload(): void { $node1 = $this->userFolder->get($this->folder); $share1 = $this->shareManager->newShare(); $share1->setNode($node1) @@ -1023,7 +1023,7 @@ class ApiTest extends TestCase { /** * @medium */ - public function testUpdateShareExpireDate() { + public function testUpdateShareExpireDate(): void { $node1 = $this->userFolder->get($this->folder); $share1 = $this->shareManager->newShare(); $share1->setNode($node1) @@ -1096,7 +1096,7 @@ class ApiTest extends TestCase { * @medium * @depends testCreateShareUserFile */ - public function testDeleteShare() { + public function testDeleteShare(): void { $node1 = $this->userFolder->get($this->filename); $share1 = $this->shareManager->newShare(); $share1->setNode($node1) @@ -1128,7 +1128,7 @@ class ApiTest extends TestCase { /** * test unshare of a reshared file */ - public function testDeleteReshare() { + public function testDeleteReshare(): void { $node1 = $this->userFolder->get($this->folder); $share1 = $this->shareManager->newShare(); $share1->setNode($node1) @@ -1163,7 +1163,7 @@ class ApiTest extends TestCase { /** * share a folder which contains a share mount point, should be forbidden */ - public function testShareFolderWithAMountPoint() { + public function testShareFolderWithAMountPoint(): void { // user 1 shares a folder with user2 self::loginHelper(self::TEST_FILES_SHARING_API_USER1); @@ -1230,7 +1230,7 @@ class ApiTest extends TestCase { /** * Tests mounting a folder that is an external storage mount point. */ - public function testShareStorageMountPoint() { + public function testShareStorageMountPoint(): void { $tempStorage = new \OC\Files\Storage\Temporary([]); $tempStorage->file_put_contents('test.txt', 'abcdef'); $tempStorage->getScanner()->scan(''); @@ -1286,7 +1286,7 @@ class ApiTest extends TestCase { * @dataProvider datesProvider * @group RoutingWeirdness */ - public function testPublicLinkExpireDate($date, $valid) { + public function testPublicLinkExpireDate($date, $valid): void { $ocs = $this->createOCS(self::TEST_FILES_SHARING_API_USER1); try { @@ -1318,7 +1318,7 @@ class ApiTest extends TestCase { /** * @group RoutingWeirdness */ - public function testCreatePublicLinkExpireDateValid() { + public function testCreatePublicLinkExpireDateValid(): void { $config = \OC::$server->getConfig(); // enforce expire date, by default 7 days after the file was shared @@ -1350,7 +1350,7 @@ class ApiTest extends TestCase { $config->setAppValue('core', 'shareapi_enforce_expire_date', 'no'); } - public function testCreatePublicLinkExpireDateInvalidFuture() { + public function testCreatePublicLinkExpireDateInvalidFuture(): void { $config = \OC::$server->getConfig(); // enforce expire date, by default 7 days after the file was shared @@ -1400,7 +1400,7 @@ class ApiTest extends TestCase { * test for no invisible shares * See: https://github.com/owncloud/core/issues/22295 */ - public function testInvisibleSharesUser() { + public function testInvisibleSharesUser(): void { // simulate a post request $ocs = $this->createOCS(self::TEST_FILES_SHARING_API_USER1); $result = $ocs->createShare($this->folder, \OCP\Constants::PERMISSION_ALL, IShare::TYPE_USER, self::TEST_FILES_SHARING_API_USER2); @@ -1432,7 +1432,7 @@ class ApiTest extends TestCase { * test for no invisible shares * See: https://github.com/owncloud/core/issues/22295 */ - public function testInvisibleSharesGroup() { + public function testInvisibleSharesGroup(): void { // simulate a post request $ocs = $this->createOCS(self::TEST_FILES_SHARING_API_USER1); $result = $ocs->createShare($this->folder, \OCP\Constants::PERMISSION_ALL, IShare::TYPE_GROUP, self::TEST_FILES_SHARING_API_GROUP1); diff --git a/apps/files_sharing/tests/CacheTest.php b/apps/files_sharing/tests/CacheTest.php index 9f4a4b9e2ea..4db3adf34a6 100644 --- a/apps/files_sharing/tests/CacheTest.php +++ b/apps/files_sharing/tests/CacheTest.php @@ -188,7 +188,7 @@ class CacheTest extends TestCase { * we cannot use a dataProvider because that would cause the stray hook detection to remove the hooks * that were added in setUpBeforeClass. */ - public function testSearch() { + public function testSearch(): void { foreach ($this->searchDataProvider() as $data) { [$pattern, $expectedFiles] = $data; @@ -200,7 +200,7 @@ class CacheTest extends TestCase { /** * Test searching by mime type */ - public function testSearchByMime() { + public function testSearchByMime(): void { $results = $this->sharedStorage->getCache()->searchByMime('text'); $check = [ [ @@ -219,7 +219,7 @@ class CacheTest extends TestCase { $this->verifyFiles($check, $results); } - public function testGetFolderContentsInRoot() { + public function testGetFolderContentsInRoot(): void { $results = $this->user2View->getDirectoryContent('/'); $results = (array_filter($results, function ($file) { return $file->getName() !== 'welcome.txt'; @@ -249,7 +249,7 @@ class CacheTest extends TestCase { ); } - public function testGetFolderContentsInSubdir() { + public function testGetFolderContentsInSubdir(): void { $results = $this->user2View->getDirectoryContent('/shareddir'); $this->verifyFiles( @@ -287,7 +287,7 @@ class CacheTest extends TestCase { * * https://github.com/nextcloud/server/issues/39879 */ - public function testShareRenameOriginalFileInRecentResults() { + public function testShareRenameOriginalFileInRecentResults(): void { self::loginHelper(self::TEST_FILES_SHARING_API_USER1); $rootFolder = \OC::$server->getUserFolder(self::TEST_FILES_SHARING_API_USER1); @@ -316,7 +316,7 @@ class CacheTest extends TestCase { }, $recents)); } - public function testGetFolderContentsWhenSubSubdirShared() { + public function testGetFolderContentsWhenSubSubdirShared(): void { self::loginHelper(self::TEST_FILES_SHARING_API_USER1); $rootFolder = \OC::$server->getUserFolder(self::TEST_FILES_SHARING_API_USER1); @@ -400,7 +400,7 @@ class CacheTest extends TestCase { } } - public function testGetPathByIdDirectShare() { + public function testGetPathByIdDirectShare(): void { self::loginHelper(self::TEST_FILES_SHARING_API_USER1); \OC\Files\Filesystem::file_put_contents('test.txt', 'foo'); $info = \OC\Files\Filesystem::getFileInfo('test.txt'); @@ -430,7 +430,7 @@ class CacheTest extends TestCase { $this->assertEquals('', $sharedCache->getPathById($info->getId())); } - public function testGetPathByIdShareSubFolder() { + public function testGetPathByIdShareSubFolder(): void { self::loginHelper(self::TEST_FILES_SHARING_API_USER1); \OC\Files\Filesystem::mkdir('foo'); \OC\Files\Filesystem::mkdir('foo/bar'); @@ -463,7 +463,7 @@ class CacheTest extends TestCase { $this->assertEquals('bar/test.txt', $sharedCache->getPathById($fileInfo->getId())); } - public function testNumericStorageId() { + public function testNumericStorageId(): void { self::loginHelper(self::TEST_FILES_SHARING_API_USER1); \OC\Files\Filesystem::mkdir('foo'); @@ -490,7 +490,7 @@ class CacheTest extends TestCase { $this->assertEquals($sourceStorage->getCache()->getNumericStorageId(), $sharedStorage->getCache()->getNumericStorageId()); } - public function testShareJailedStorage() { + public function testShareJailedStorage(): void { $sourceStorage = new Temporary(); $sourceStorage->mkdir('jail'); $sourceStorage->mkdir('jail/sub'); @@ -529,7 +529,7 @@ class CacheTest extends TestCase { $this->assertTrue($sourceStorage->getCache()->inCache('jail/sub/bar.txt')); } - public function testSearchShareJailedStorage() { + public function testSearchShareJailedStorage(): void { $sourceStorage = new Temporary(); $sourceStorage->mkdir('jail'); $sourceStorage->mkdir('jail/sub'); diff --git a/apps/files_sharing/tests/CapabilitiesTest.php b/apps/files_sharing/tests/CapabilitiesTest.php index 69911100f56..c188cbfdfcc 100644 --- a/apps/files_sharing/tests/CapabilitiesTest.php +++ b/apps/files_sharing/tests/CapabilitiesTest.php @@ -81,7 +81,7 @@ class CapabilitiesTest extends \Test\TestCase { return $result; } - public function testEnabledSharingAPI() { + public function testEnabledSharingAPI(): void { $map = [ ['core', 'shareapi_enabled', 'yes', 'yes'], ]; @@ -92,7 +92,7 @@ class CapabilitiesTest extends \Test\TestCase { $this->assertArrayHasKey('resharing', $result); } - public function testDisabledSharingAPI() { + public function testDisabledSharingAPI(): void { $map = [ ['core', 'shareapi_enabled', 'yes', 'no'], ]; @@ -103,7 +103,7 @@ class CapabilitiesTest extends \Test\TestCase { $this->assertFalse($result['resharing']); } - public function testNoLinkSharing() { + public function testNoLinkSharing(): void { $map = [ ['core', 'shareapi_enabled', 'yes', 'yes'], ['core', 'shareapi_allow_links', 'yes', 'no'], @@ -113,7 +113,7 @@ class CapabilitiesTest extends \Test\TestCase { $this->assertFalse($result['public']['enabled']); } - public function testOnlyLinkSharing() { + public function testOnlyLinkSharing(): void { $map = [ ['core', 'shareapi_enabled', 'yes', 'yes'], ['core', 'shareapi_allow_links', 'yes', 'yes'], @@ -124,7 +124,7 @@ class CapabilitiesTest extends \Test\TestCase { $this->assertTrue($result['public']['enabled']); } - public function testLinkPassword() { + public function testLinkPassword(): void { $map = [ ['core', 'shareapi_enabled', 'yes', 'yes'], ['core', 'shareapi_allow_links', 'yes', 'yes'], @@ -137,7 +137,7 @@ class CapabilitiesTest extends \Test\TestCase { $this->assertTrue($result['public']['password']['enforced']); } - public function testLinkNoPassword() { + public function testLinkNoPassword(): void { $map = [ ['core', 'shareapi_enabled', 'yes', 'yes'], ['core', 'shareapi_allow_links', 'yes', 'yes'], @@ -150,7 +150,7 @@ class CapabilitiesTest extends \Test\TestCase { $this->assertFalse($result['public']['password']['enforced']); } - public function testLinkNoExpireDate() { + public function testLinkNoExpireDate(): void { $map = [ ['core', 'shareapi_enabled', 'yes', 'yes'], ['core', 'shareapi_allow_links', 'yes', 'yes'], @@ -163,7 +163,7 @@ class CapabilitiesTest extends \Test\TestCase { $this->assertFalse($result['public']['expire_date']['enabled']); } - public function testLinkExpireDate() { + public function testLinkExpireDate(): void { $map = [ ['core', 'shareapi_enabled', 'yes', 'yes'], ['core', 'shareapi_allow_links', 'yes', 'yes'], @@ -180,7 +180,7 @@ class CapabilitiesTest extends \Test\TestCase { $this->assertFalse($result['public']['expire_date']['enforced']); } - public function testLinkExpireDateEnforced() { + public function testLinkExpireDateEnforced(): void { $map = [ ['core', 'shareapi_enabled', 'yes', 'yes'], ['core', 'shareapi_allow_links', 'yes', 'yes'], @@ -194,7 +194,7 @@ class CapabilitiesTest extends \Test\TestCase { $this->assertTrue($result['public']['expire_date']['enforced']); } - public function testLinkSendMail() { + public function testLinkSendMail(): void { $map = [ ['core', 'shareapi_enabled', 'yes', 'yes'], ['core', 'shareapi_allow_links', 'yes', 'yes'], @@ -205,7 +205,7 @@ class CapabilitiesTest extends \Test\TestCase { $this->assertTrue($result['public']['send_mail']); } - public function testLinkNoSendMail() { + public function testLinkNoSendMail(): void { $map = [ ['core', 'shareapi_enabled', 'yes', 'yes'], ['core', 'shareapi_allow_links', 'yes', 'yes'], @@ -216,7 +216,7 @@ class CapabilitiesTest extends \Test\TestCase { $this->assertFalse($result['public']['send_mail']); } - public function testResharing() { + public function testResharing(): void { $map = [ ['core', 'shareapi_enabled', 'yes', 'yes'], ['core', 'shareapi_allow_resharing', 'yes', 'yes'], @@ -226,7 +226,7 @@ class CapabilitiesTest extends \Test\TestCase { $this->assertTrue($result['resharing']); } - public function testNoResharing() { + public function testNoResharing(): void { $map = [ ['core', 'shareapi_enabled', 'yes', 'yes'], ['core', 'shareapi_allow_resharing', 'yes', 'no'], @@ -236,7 +236,7 @@ class CapabilitiesTest extends \Test\TestCase { $this->assertFalse($result['resharing']); } - public function testLinkPublicUpload() { + public function testLinkPublicUpload(): void { $map = [ ['core', 'shareapi_enabled', 'yes', 'yes'], ['core', 'shareapi_allow_links', 'yes', 'yes'], @@ -248,7 +248,7 @@ class CapabilitiesTest extends \Test\TestCase { $this->assertTrue($result['public']['upload_files_drop']); } - public function testLinkNoPublicUpload() { + public function testLinkNoPublicUpload(): void { $map = [ ['core', 'shareapi_enabled', 'yes', 'yes'], ['core', 'shareapi_allow_links', 'yes', 'yes'], @@ -260,7 +260,7 @@ class CapabilitiesTest extends \Test\TestCase { $this->assertFalse($result['public']['upload_files_drop']); } - public function testNoGroupSharing() { + public function testNoGroupSharing(): void { $map = [ ['core', 'shareapi_enabled', 'yes', 'yes'], ['core', 'shareapi_allow_group_sharing', 'yes', 'no'], @@ -269,7 +269,7 @@ class CapabilitiesTest extends \Test\TestCase { $this->assertFalse($result['group_sharing']); } - public function testGroupSharing() { + public function testGroupSharing(): void { $map = [ ['core', 'shareapi_enabled', 'yes', 'yes'], ['core', 'shareapi_allow_group_sharing', 'yes', 'yes'], @@ -278,7 +278,7 @@ class CapabilitiesTest extends \Test\TestCase { $this->assertTrue($result['group_sharing']); } - public function testFederatedSharingIncoming() { + public function testFederatedSharingIncoming(): void { $map = [ ['files_sharing', 'incoming_server2server_share_enabled', 'yes', 'yes'], ]; @@ -287,7 +287,7 @@ class CapabilitiesTest extends \Test\TestCase { $this->assertTrue($result['federation']['incoming']); } - public function testFederatedSharingNoIncoming() { + public function testFederatedSharingNoIncoming(): void { $map = [ ['files_sharing', 'incoming_server2server_share_enabled', 'yes', 'no'], ]; @@ -296,7 +296,7 @@ class CapabilitiesTest extends \Test\TestCase { $this->assertFalse($result['federation']['incoming']); } - public function testFederatedSharingOutgoing() { + public function testFederatedSharingOutgoing(): void { $map = [ ['files_sharing', 'outgoing_server2server_share_enabled', 'yes', 'yes'], ]; @@ -305,7 +305,7 @@ class CapabilitiesTest extends \Test\TestCase { $this->assertTrue($result['federation']['outgoing']); } - public function testFederatedSharingNoOutgoing() { + public function testFederatedSharingNoOutgoing(): void { $map = [ ['files_sharing', 'outgoing_server2server_share_enabled', 'yes', 'no'], ]; @@ -314,7 +314,7 @@ class CapabilitiesTest extends \Test\TestCase { $this->assertFalse($result['federation']['outgoing']); } - public function testFederatedSharingExpirationDate() { + public function testFederatedSharingExpirationDate(): void { $result = $this->getResults([]); $this->assertArrayHasKey('federation', $result); $this->assertEquals(['enabled' => true], $result['federation']['expire_date']); diff --git a/apps/files_sharing/tests/Collaboration/ShareRecipientSorterTest.php b/apps/files_sharing/tests/Collaboration/ShareRecipientSorterTest.php index 309bb84d6df..83dde42f37b 100644 --- a/apps/files_sharing/tests/Collaboration/ShareRecipientSorterTest.php +++ b/apps/files_sharing/tests/Collaboration/ShareRecipientSorterTest.php @@ -38,7 +38,7 @@ class ShareRecipientSorterTest extends TestCase { * @dataProvider sortDataProvider * @param $data */ - public function testSort($data) { + public function testSort($data): void { $node = $this->createMock(Node::class); /** @var Folder|\PHPUnit\Framework\MockObject\MockObject $folder */ @@ -79,7 +79,7 @@ class ShareRecipientSorterTest extends TestCase { $this->assertEquals($data['expected'], $workArray); } - public function testSortNoNodes() { + public function testSortNoNodes(): void { /** @var Folder|\PHPUnit\Framework\MockObject\MockObject $folder */ $folder = $this->createMock(Folder::class); $this->rootFolder->expects($this->any()) diff --git a/apps/files_sharing/tests/Command/CleanupRemoteStoragesTest.php b/apps/files_sharing/tests/Command/CleanupRemoteStoragesTest.php index 803ee1d02c9..05b412a60b6 100644 --- a/apps/files_sharing/tests/Command/CleanupRemoteStoragesTest.php +++ b/apps/files_sharing/tests/Command/CleanupRemoteStoragesTest.php @@ -163,7 +163,7 @@ class CleanupRemoteStoragesTest extends TestCase { /** * Test cleanup of orphaned storages */ - public function testCleanup() { + public function testCleanup(): void { $input = $this->getMockBuilder(InputInterface::class) ->disableOriginalConstructor() ->getMock(); diff --git a/apps/files_sharing/tests/Controller/ExternalShareControllerTest.php b/apps/files_sharing/tests/Controller/ExternalShareControllerTest.php index 3b4173ba7fa..eac37a3f3a5 100644 --- a/apps/files_sharing/tests/Controller/ExternalShareControllerTest.php +++ b/apps/files_sharing/tests/Controller/ExternalShareControllerTest.php @@ -53,7 +53,7 @@ class ExternalShareControllerTest extends \Test\TestCase { ); } - public function testIndex() { + public function testIndex(): void { $this->externalManager ->expects($this->once()) ->method('getOpenShares') @@ -62,7 +62,7 @@ class ExternalShareControllerTest extends \Test\TestCase { $this->assertEquals(new JSONResponse(['MyDummyArray']), $this->getExternalShareController()->index()); } - public function testCreate() { + public function testCreate(): void { $this->externalManager ->expects($this->once()) ->method('acceptShare') @@ -71,7 +71,7 @@ class ExternalShareControllerTest extends \Test\TestCase { $this->assertEquals(new JSONResponse(), $this->getExternalShareController()->create(4)); } - public function testDestroy() { + public function testDestroy(): void { $this->externalManager ->expects($this->once()) ->method('declineShare') @@ -80,7 +80,7 @@ class ExternalShareControllerTest extends \Test\TestCase { $this->assertEquals(new JSONResponse(), $this->getExternalShareController()->destroy(4)); } - public function testRemoteWithValidHttps() { + public function testRemoteWithValidHttps(): void { $client = $this->createMock(IClient::class); $response = $this->createMock(IResponse::class); $response @@ -103,7 +103,7 @@ class ExternalShareControllerTest extends \Test\TestCase { $this->assertEquals(new DataResponse('https'), $this->getExternalShareController()->testRemote('nextcloud.com')); } - public function testRemoteWithWorkingHttp() { + public function testRemoteWithWorkingHttp(): void { $client = $this->createMock(IClient::class); $response = $this->createMock(IResponse::class); $client @@ -127,7 +127,7 @@ class ExternalShareControllerTest extends \Test\TestCase { $this->assertEquals(new DataResponse('http'), $this->getExternalShareController()->testRemote('nextcloud.com')); } - public function testRemoteWithInvalidRemote() { + public function testRemoteWithInvalidRemote(): void { $client = $this->createMock(IClient::class); $response = $this->createMock(IResponse::class); $client @@ -158,7 +158,7 @@ class ExternalShareControllerTest extends \Test\TestCase { * @dataProvider dataRemoteWithInvalidRemoteURLs * @param string $remote */ - public function testRemoteWithInvalidRemoteURLs(string $remote) { + public function testRemoteWithInvalidRemoteURLs(string $remote): void { $this->clientService ->expects($this->never()) ->method('newClient'); diff --git a/apps/files_sharing/tests/Controller/PublicPreviewControllerTest.php b/apps/files_sharing/tests/Controller/PublicPreviewControllerTest.php index d1e542cc5d9..700406c97ba 100644 --- a/apps/files_sharing/tests/Controller/PublicPreviewControllerTest.php +++ b/apps/files_sharing/tests/Controller/PublicPreviewControllerTest.php @@ -57,28 +57,28 @@ class PublicPreviewControllerTest extends TestCase { ); } - public function testInvalidToken() { + public function testInvalidToken(): void { $res = $this->controller->getPreview('', 'file', 10, 10, ''); $expected = new DataResponse([], Http::STATUS_BAD_REQUEST); $this->assertEquals($expected, $res); } - public function testInvalidWidth() { + public function testInvalidWidth(): void { $res = $this->controller->getPreview('token', 'file', 0); $expected = new DataResponse([], Http::STATUS_BAD_REQUEST); $this->assertEquals($expected, $res); } - public function testInvalidHeight() { + public function testInvalidHeight(): void { $res = $this->controller->getPreview('token', 'file', 10, 0); $expected = new DataResponse([], Http::STATUS_BAD_REQUEST); $this->assertEquals($expected, $res); } - public function testInvalidShare() { + public function testInvalidShare(): void { $this->shareManager->method('getShareByToken') ->with($this->equalTo('token')) ->willThrowException(new ShareNotFound()); @@ -89,7 +89,7 @@ class PublicPreviewControllerTest extends TestCase { $this->assertEquals($expected, $res); } - public function testShareNotAccessable() { + public function testShareNotAccessable(): void { $share = $this->createMock(IShare::class); $this->shareManager->method('getShareByToken') ->with($this->equalTo('token')) @@ -104,7 +104,7 @@ class PublicPreviewControllerTest extends TestCase { $this->assertEquals($expected, $res); } - public function testPreviewFile() { + public function testPreviewFile(): void { $share = $this->createMock(IShare::class); $this->shareManager->method('getShareByToken') ->with($this->equalTo('token')) @@ -133,7 +133,7 @@ class PublicPreviewControllerTest extends TestCase { $this->assertEquals($expected, $res); } - public function testPreviewFolderInvalidFile() { + public function testPreviewFolderInvalidFile(): void { $share = $this->createMock(IShare::class); $this->shareManager->method('getShareByToken') ->with($this->equalTo('token')) @@ -156,7 +156,7 @@ class PublicPreviewControllerTest extends TestCase { } - public function testPreviewFolderValidFile() { + public function testPreviewFolderValidFile(): void { $share = $this->createMock(IShare::class); $this->shareManager->method('getShareByToken') ->with($this->equalTo('token')) diff --git a/apps/files_sharing/tests/Controller/ShareAPIControllerTest.php b/apps/files_sharing/tests/Controller/ShareAPIControllerTest.php index fd1c60ff842..f28302b4ccd 100644 --- a/apps/files_sharing/tests/Controller/ShareAPIControllerTest.php +++ b/apps/files_sharing/tests/Controller/ShareAPIControllerTest.php @@ -174,7 +174,7 @@ class ShareAPIControllerTest extends TestCase { return [$shareAttributes, \json_encode($formattedShareAttributes)]; } - public function testDeleteShareShareNotFound() { + public function testDeleteShareShareNotFound(): void { $this->expectException(\OCP\AppFramework\OCS\OCSNotFoundException::class); $this->expectExceptionMessage('Wrong share ID, share does not exist'); @@ -194,7 +194,7 @@ class ShareAPIControllerTest extends TestCase { $this->ocs->deleteShare(42); } - public function testDeleteShare() { + public function testDeleteShare(): void { $node = $this->getMockBuilder(File::class)->getMock(); $share = $this->newShare(); @@ -222,7 +222,7 @@ class ShareAPIControllerTest extends TestCase { } - public function testDeleteShareLocked() { + public function testDeleteShareLocked(): void { $this->expectException(\OCP\AppFramework\OCS\OCSNotFoundException::class); $this->expectExceptionMessage('Could not delete share'); @@ -256,7 +256,7 @@ class ShareAPIControllerTest extends TestCase { /** * You can always remove a share that was shared with you */ - public function testDeleteShareWithMe() { + public function testDeleteShareWithMe(): void { $node = $this->getMockBuilder(File::class)->getMock(); $share = $this->newShare(); @@ -288,7 +288,7 @@ class ShareAPIControllerTest extends TestCase { /** * You can always delete a share you own */ - public function testDeleteShareOwner() { + public function testDeleteShareOwner(): void { $node = $this->getMockBuilder(File::class)->getMock(); $share = $this->newShare(); @@ -320,7 +320,7 @@ class ShareAPIControllerTest extends TestCase { * You can always delete a share when you own * the file path it belong to */ - public function testDeleteShareFileOwner() { + public function testDeleteShareFileOwner(): void { $node = $this->getMockBuilder(File::class)->getMock(); $node->method('getId')->willReturn(1); @@ -353,7 +353,7 @@ class ShareAPIControllerTest extends TestCase { * You can remove (the mountpoint, not the share) * a share if you're in the group the share is shared with */ - public function testDeleteSharedWithMyGroup() { + public function testDeleteSharedWithMyGroup(): void { $node = $this->getMockBuilder(File::class)->getMock(); $node->method('getId')->willReturn(1); @@ -413,7 +413,7 @@ class ShareAPIControllerTest extends TestCase { * You cannot remove a share if you're not * in the group the share is shared with */ - public function testDeleteSharedWithGroupIDontBelongTo() { + public function testDeleteSharedWithGroupIDontBelongTo(): void { $this->expectException(\OCP\AppFramework\OCS\OCSNotFoundException::class); $this->expectExceptionMessage('Wrong share ID, share does not exist'); @@ -730,7 +730,7 @@ class ShareAPIControllerTest extends TestCase { /** * @dataProvider dataGetShare */ - public function testGetShare(\OCP\Share\IShare $share, array $result) { + public function testGetShare(\OCP\Share\IShare $share, array $result): void { /** @var ShareAPIController|\PHPUnit\Framework\MockObject\MockObject $ocs */ $ocs = $this->getMockBuilder(ShareAPIController::class) ->setConstructorArgs([ @@ -819,7 +819,7 @@ class ShareAPIControllerTest extends TestCase { } - public function testGetShareInvalidNode() { + public function testGetShareInvalidNode(): void { $this->expectException(\OCP\AppFramework\OCS\OCSNotFoundException::class); $this->expectExceptionMessage('Wrong share ID, share does not exist'); @@ -1364,7 +1364,7 @@ class ShareAPIControllerTest extends TestCase { /** * @dataProvider dataGetShares */ - public function testGetShares(array $getSharesParameters, array $shares, array $extraShareTypes, array $expected) { + public function testGetShares(array $getSharesParameters, array $shares, array $extraShareTypes, array $expected): void { /** @var \OCA\Files_Sharing\Controller\ShareAPIController $ocs */ $ocs = $this->getMockBuilder(ShareAPIController::class) ->setConstructorArgs([ @@ -1445,7 +1445,7 @@ class ShareAPIControllerTest extends TestCase { $this->assertEquals($expected, $result->getData()); } - public function testCanAccessShare() { + public function testCanAccessShare(): void { $share = $this->getMockBuilder(IShare::class)->getMock(); $share->method('getShareOwner')->willReturn($this->currentUser); $this->assertTrue($this->invokePrivate($this->ocs, 'canAccessShare', [$share])); @@ -1556,7 +1556,7 @@ class ShareAPIControllerTest extends TestCase { * @param bool helperAvailable * @param bool canAccessShareByHelper */ - public function testCanAccessRoomShare(bool $expected, \OCP\Share\IShare $share, bool $helperAvailable, bool $canAccessShareByHelper) { + public function testCanAccessRoomShare(bool $expected, \OCP\Share\IShare $share, bool $helperAvailable, bool $canAccessShareByHelper): void { $userFolder = $this->getMockBuilder(Folder::class)->getMock(); $this->rootFolder->method('getUserFolder') ->with($this->currentUser) @@ -1591,7 +1591,7 @@ class ShareAPIControllerTest extends TestCase { } - public function testCreateShareNoPath() { + public function testCreateShareNoPath(): void { $this->expectException(\OCP\AppFramework\OCS\OCSNotFoundException::class); $this->expectExceptionMessage('Please specify a file or folder path'); @@ -1599,7 +1599,7 @@ class ShareAPIControllerTest extends TestCase { } - public function testCreateShareInvalidPath() { + public function testCreateShareInvalidPath(): void { $this->expectException(\OCP\AppFramework\OCS\OCSNotFoundException::class); $this->expectExceptionMessage('Wrong path, file/folder does not exist'); @@ -1618,7 +1618,7 @@ class ShareAPIControllerTest extends TestCase { } - public function testCreateShareInvalidPermissions() { + public function testCreateShareInvalidPermissions(): void { $this->expectException(\OCP\AppFramework\OCS\OCSNotFoundException::class); $this->expectExceptionMessage('Invalid permissions'); @@ -1647,7 +1647,7 @@ class ShareAPIControllerTest extends TestCase { } - public function testCreateShareUserNoShareWith() { + public function testCreateShareUserNoShareWith(): void { $this->expectException(\OCP\AppFramework\OCS\OCSNotFoundException::class); $this->expectExceptionMessage('Please specify a valid account to share with'); @@ -1675,7 +1675,7 @@ class ShareAPIControllerTest extends TestCase { } - public function testCreateShareUserNoValidShareWith() { + public function testCreateShareUserNoValidShareWith(): void { $this->expectException(\OCP\AppFramework\OCS\OCSNotFoundException::class); $this->expectExceptionMessage('Please specify a valid account to share with'); @@ -1704,7 +1704,7 @@ class ShareAPIControllerTest extends TestCase { $this->ocs->createShare('valid-path', \OCP\Constants::PERMISSION_ALL, IShare::TYPE_USER, 'invalidUser'); } - public function testCreateShareUser() { + public function testCreateShareUser(): void { $share = $this->newShare(); $this->shareManager->method('newShare')->willReturn($share); @@ -1773,7 +1773,7 @@ class ShareAPIControllerTest extends TestCase { } - public function testCreateShareGroupNoValidShareWith() { + public function testCreateShareGroupNoValidShareWith(): void { $this->expectException(\OCP\AppFramework\OCS\OCSNotFoundException::class); $this->expectExceptionMessage('Please specify a valid group'); @@ -1802,7 +1802,7 @@ class ShareAPIControllerTest extends TestCase { $this->ocs->createShare('valid-path', \OCP\Constants::PERMISSION_ALL, IShare::TYPE_GROUP, 'invalidGroup'); } - public function testCreateShareGroup() { + public function testCreateShareGroup(): void { $share = $this->newShare(); $this->shareManager->method('newShare')->willReturn($share); @@ -1880,7 +1880,7 @@ class ShareAPIControllerTest extends TestCase { } - public function testCreateShareGroupNotAllowed() { + public function testCreateShareGroupNotAllowed(): void { $this->expectException(\OCP\AppFramework\OCS\OCSNotFoundException::class); $this->expectExceptionMessage('Group sharing is disabled by the administrator'); @@ -1910,7 +1910,7 @@ class ShareAPIControllerTest extends TestCase { } - public function testCreateShareLinkNoLinksAllowed() { + public function testCreateShareLinkNoLinksAllowed(): void { $this->expectException(\OCP\AppFramework\OCS\OCSNotFoundException::class); $this->expectExceptionMessage('Public link sharing is disabled by the administrator'); @@ -1941,7 +1941,7 @@ class ShareAPIControllerTest extends TestCase { } - public function testCreateShareLinkNoPublicUpload() { + public function testCreateShareLinkNoPublicUpload(): void { $this->expectException(\OCP\AppFramework\OCS\OCSForbiddenException::class); $this->expectExceptionMessage('Public upload disabled by the administrator'); @@ -1966,7 +1966,7 @@ class ShareAPIControllerTest extends TestCase { } - public function testCreateShareLinkPublicUploadFile() { + public function testCreateShareLinkPublicUploadFile(): void { $this->expectException(\OCP\AppFramework\OCS\OCSNotFoundException::class); $this->expectExceptionMessage('Public upload is only possible for publicly shared folders'); @@ -1991,7 +1991,7 @@ class ShareAPIControllerTest extends TestCase { $this->ocs->createShare('valid-path', \OCP\Constants::PERMISSION_ALL, IShare::TYPE_LINK, null, 'true'); } - public function testCreateShareLinkPublicUploadFolder() { + public function testCreateShareLinkPublicUploadFolder(): void { $ocs = $this->mockFormatShare(); $path = $this->getMockBuilder(Folder::class)->getMock(); @@ -2030,7 +2030,7 @@ class ShareAPIControllerTest extends TestCase { $this->assertEquals($expected->getData(), $result->getData()); } - public function testCreateShareLinkPassword() { + public function testCreateShareLinkPassword(): void { $ocs = $this->mockFormatShare(); $path = $this->getMockBuilder(Folder::class)->getMock(); @@ -2069,7 +2069,7 @@ class ShareAPIControllerTest extends TestCase { $this->assertEquals($expected->getData(), $result->getData()); } - public function testCreateShareLinkSendPasswordByTalk() { + public function testCreateShareLinkSendPasswordByTalk(): void { $ocs = $this->mockFormatShare(); $path = $this->getMockBuilder(Folder::class)->getMock(); @@ -2112,7 +2112,7 @@ class ShareAPIControllerTest extends TestCase { } - public function testCreateShareLinkSendPasswordByTalkWithTalkDisabled() { + public function testCreateShareLinkSendPasswordByTalkWithTalkDisabled(): void { $this->expectException(\OCP\AppFramework\OCS\OCSForbiddenException::class); $this->expectExceptionMessage('Sharing valid-path sending the password by Nextcloud Talk failed because Nextcloud Talk is not enabled'); @@ -2144,7 +2144,7 @@ class ShareAPIControllerTest extends TestCase { $ocs->createShare('valid-path', \OCP\Constants::PERMISSION_ALL, IShare::TYPE_LINK, null, 'false', 'password', 'true', ''); } - public function testCreateShareValidExpireDate() { + public function testCreateShareValidExpireDate(): void { $ocs = $this->mockFormatShare(); $this->request @@ -2197,7 +2197,7 @@ class ShareAPIControllerTest extends TestCase { } - public function testCreateShareInvalidExpireDate() { + public function testCreateShareInvalidExpireDate(): void { $this->expectException(\OCP\AppFramework\OCS\OCSNotFoundException::class); $this->expectExceptionMessage('Invalid date, date format must be YYYY-MM-DD'); @@ -2224,7 +2224,7 @@ class ShareAPIControllerTest extends TestCase { $ocs->createShare('valid-path', \OCP\Constants::PERMISSION_ALL, IShare::TYPE_LINK, null, 'false', '', null, 'a1b2d3'); } - public function testCreateShareRemote() { + public function testCreateShareRemote(): void { $share = $this->newShare(); $this->shareManager->method('newShare')->willReturn($share); @@ -2294,7 +2294,7 @@ class ShareAPIControllerTest extends TestCase { $this->assertEquals($expected->getData(), $result->getData()); } - public function testCreateShareRemoteGroup() { + public function testCreateShareRemoteGroup(): void { $share = $this->newShare(); $this->shareManager->method('newShare')->willReturn($share); @@ -2364,7 +2364,7 @@ class ShareAPIControllerTest extends TestCase { $this->assertEquals($expected->getData(), $result->getData()); } - public function testCreateShareRoom() { + public function testCreateShareRoom(): void { $ocs = $this->mockFormatShare(); $share = $this->newShare(); @@ -2439,7 +2439,7 @@ class ShareAPIControllerTest extends TestCase { } - public function testCreateShareRoomHelperNotAvailable() { + public function testCreateShareRoomHelperNotAvailable(): void { $this->expectException(\OCP\AppFramework\OCS\OCSForbiddenException::class); $this->expectExceptionMessage('Sharing valid-path failed because the back end does not support room shares'); @@ -2476,7 +2476,7 @@ class ShareAPIControllerTest extends TestCase { } - public function testCreateShareRoomHelperThrowException() { + public function testCreateShareRoomHelperThrowException(): void { $this->expectException(\OCP\AppFramework\OCS\OCSNotFoundException::class); $this->expectExceptionMessage('Exception thrown by the helper'); @@ -2537,7 +2537,7 @@ class ShareAPIControllerTest extends TestCase { * Test for https://github.com/owncloud/core/issues/22587 * TODO: Remove once proper solution is in place */ - public function testCreateReshareOfFederatedMountNoDeletePermissions() { + public function testCreateReshareOfFederatedMountNoDeletePermissions(): void { $share = \OC::$server->getShareManager()->newShare(); $this->shareManager->method('newShare')->willReturn($share); @@ -2605,7 +2605,7 @@ class ShareAPIControllerTest extends TestCase { } - public function testUpdateShareCantAccess() { + public function testUpdateShareCantAccess(): void { $this->expectException(\OCP\AppFramework\OCS\OCSNotFoundException::class); $this->expectExceptionMessage('Wrong share ID, share does not exist'); @@ -2631,7 +2631,7 @@ class ShareAPIControllerTest extends TestCase { } - public function testUpdateNoParametersLink() { + public function testUpdateNoParametersLink(): void { $this->expectException(\OCP\AppFramework\OCS\OCSBadRequestException::class); $this->expectExceptionMessage('Wrong or no update parameter given'); @@ -2652,7 +2652,7 @@ class ShareAPIControllerTest extends TestCase { } - public function testUpdateNoParametersOther() { + public function testUpdateNoParametersOther(): void { $this->expectException(\OCP\AppFramework\OCS\OCSBadRequestException::class); $this->expectExceptionMessage('Wrong or no update parameter given'); @@ -2672,7 +2672,7 @@ class ShareAPIControllerTest extends TestCase { $this->ocs->updateShare(42); } - public function testUpdateLinkShareClear() { + public function testUpdateLinkShareClear(): void { $ocs = $this->mockFormatShare(); [$userFolder, $node] = $this->getNonSharedUserFolder(); @@ -2733,7 +2733,7 @@ class ShareAPIControllerTest extends TestCase { $this->assertEquals($expected->getData(), $result->getData()); } - public function testUpdateLinkShareSet() { + public function testUpdateLinkShareSet(): void { $ocs = $this->mockFormatShare(); [$userFolder, $folder] = $this->getNonSharedUserFolder(); @@ -2790,7 +2790,7 @@ class ShareAPIControllerTest extends TestCase { /** * @dataProvider publicUploadParamsProvider */ - public function testUpdateLinkShareEnablePublicUpload($permissions, $publicUpload, $expireDate, $password) { + public function testUpdateLinkShareEnablePublicUpload($permissions, $publicUpload, $expireDate, $password): void { $ocs = $this->mockFormatShare(); [$userFolder, $folder] = $this->getNonSharedUserFolder(); @@ -2851,7 +2851,7 @@ class ShareAPIControllerTest extends TestCase { /** * @dataProvider publicLinkValidPermissionsProvider */ - public function testUpdateLinkShareSetCRUDPermissions($permissions) { + public function testUpdateLinkShareSetCRUDPermissions($permissions): void { $ocs = $this->mockFormatShare(); [$userFolder, $folder] = $this->getNonSharedUserFolder(); @@ -2906,7 +2906,7 @@ class ShareAPIControllerTest extends TestCase { /** * @dataProvider publicLinkInvalidPermissionsProvider1 */ - public function testUpdateLinkShareSetInvalidCRUDPermissions1($permissions) { + public function testUpdateLinkShareSetInvalidCRUDPermissions1($permissions): void { $this->expectException(\OCP\AppFramework\OCS\OCSBadRequestException::class); $this->expectExceptionMessage('Share must at least have READ or CREATE permissions'); @@ -2923,14 +2923,14 @@ class ShareAPIControllerTest extends TestCase { /** * @dataProvider publicLinkInvalidPermissionsProvider2 */ - public function testUpdateLinkShareSetInvalidCRUDPermissions2($permissions) { + public function testUpdateLinkShareSetInvalidCRUDPermissions2($permissions): void { $this->expectException(\OCP\AppFramework\OCS\OCSBadRequestException::class); $this->expectExceptionMessage('Share must have READ permission if UPDATE or DELETE permission is set'); $this->testUpdateLinkShareSetCRUDPermissions($permissions); } - public function testUpdateLinkShareInvalidDate() { + public function testUpdateLinkShareInvalidDate(): void { $this->expectException(\OCP\AppFramework\OCS\OCSBadRequestException::class); $this->expectExceptionMessage('Invalid date. Format must be YYYY-MM-DD'); @@ -2977,7 +2977,7 @@ class ShareAPIControllerTest extends TestCase { /** * @dataProvider publicUploadParamsProvider */ - public function testUpdateLinkSharePublicUploadNotAllowed($permissions, $publicUpload, $expireDate, $password) { + public function testUpdateLinkSharePublicUploadNotAllowed($permissions, $publicUpload, $expireDate, $password): void { $this->expectException(\OCP\AppFramework\OCS\OCSForbiddenException::class); $this->expectExceptionMessage('Public upload disabled by the administrator'); @@ -3005,7 +3005,7 @@ class ShareAPIControllerTest extends TestCase { } - public function testUpdateLinkSharePublicUploadOnFile() { + public function testUpdateLinkSharePublicUploadOnFile(): void { $this->expectException(\OCP\AppFramework\OCS\OCSBadRequestException::class); $this->expectExceptionMessage('Public upload is only possible for publicly shared folders'); @@ -3086,7 +3086,7 @@ class ShareAPIControllerTest extends TestCase { $this->assertEquals($expected->getData(), $result->getData()); } - public function testUpdateLinkShareSendPasswordByTalkDoesNotChangeOther() { + public function testUpdateLinkShareSendPasswordByTalkDoesNotChangeOther(): void { $ocs = $this->mockFormatShare(); $date = new \DateTime('2000-01-01'); @@ -3141,7 +3141,7 @@ class ShareAPIControllerTest extends TestCase { } - public function testUpdateLinkShareSendPasswordByTalkWithTalkDisabledDoesNotChangeOther() { + public function testUpdateLinkShareSendPasswordByTalkWithTalkDisabledDoesNotChangeOther(): void { $this->expectException(\OCP\AppFramework\OCS\OCSForbiddenException::class); $this->expectExceptionMessage('"Sending the password by Nextcloud Talk" for sharing a file or folder failed because Nextcloud Talk is not enabled.'); @@ -3184,7 +3184,7 @@ class ShareAPIControllerTest extends TestCase { $ocs->updateShare(42, null, null, 'true', null, null, null, null, null); } - public function testUpdateLinkShareDoNotSendPasswordByTalkDoesNotChangeOther() { + public function testUpdateLinkShareDoNotSendPasswordByTalkDoesNotChangeOther(): void { $ocs = $this->mockFormatShare(); $date = new \DateTime('2000-01-01'); @@ -3238,7 +3238,7 @@ class ShareAPIControllerTest extends TestCase { $this->assertEquals($expected->getData(), $result->getData()); } - public function testUpdateLinkShareDoNotSendPasswordByTalkWithTalkDisabledDoesNotChangeOther() { + public function testUpdateLinkShareDoNotSendPasswordByTalkWithTalkDisabledDoesNotChangeOther(): void { $ocs = $this->mockFormatShare(); $date = new \DateTime('2000-01-01'); @@ -3308,7 +3308,7 @@ class ShareAPIControllerTest extends TestCase { $this->assertEquals($expected->getData(), $result->getData()); } - public function testUpdateLinkShareExpireDateDoesNotChangeOther() { + public function testUpdateLinkShareExpireDateDoesNotChangeOther(): void { $ocs = $this->mockFormatShare(); [$userFolder, $node] = $this->getNonSharedUserFolder(); @@ -3370,7 +3370,7 @@ class ShareAPIControllerTest extends TestCase { $this->assertEquals($expected->getData(), $result->getData()); } - public function testUpdateLinkSharePublicUploadDoesNotChangeOther() { + public function testUpdateLinkSharePublicUploadDoesNotChangeOther(): void { $ocs = $this->mockFormatShare(); $date = new \DateTime('2000-01-01'); @@ -3431,7 +3431,7 @@ class ShareAPIControllerTest extends TestCase { $this->assertEquals($expected->getData(), $result->getData()); } - public function testUpdateLinkSharePermissions() { + public function testUpdateLinkSharePermissions(): void { $ocs = $this->mockFormatShare(); $date = new \DateTime('2000-01-01'); @@ -3491,7 +3491,7 @@ class ShareAPIControllerTest extends TestCase { $this->assertEquals($expected->getData(), $result->getData()); } - public function testUpdateLinkSharePermissionsShare() { + public function testUpdateLinkSharePermissionsShare(): void { $ocs = $this->mockFormatShare(); $date = new \DateTime('2000-01-01'); @@ -3551,7 +3551,7 @@ class ShareAPIControllerTest extends TestCase { $this->assertEquals($expected->getData(), $result->getData()); } - public function testUpdateOtherPermissions() { + public function testUpdateOtherPermissions(): void { $ocs = $this->mockFormatShare(); [$userFolder, $file] = $this->getNonSharedUserFolder(); @@ -3597,7 +3597,7 @@ class ShareAPIControllerTest extends TestCase { $this->assertEquals($expected->getData(), $result->getData()); } - public function testUpdateShareCannotIncreasePermissions() { + public function testUpdateShareCannotIncreasePermissions(): void { $ocs = $this->mockFormatShare(); [$userFolder, $folder] = $this->getNonSharedUserFolder(); @@ -3669,7 +3669,7 @@ class ShareAPIControllerTest extends TestCase { } } - public function testUpdateShareCanIncreasePermissionsIfOwner() { + public function testUpdateShareCanIncreasePermissionsIfOwner(): void { $ocs = $this->mockFormatShare(); [$userFolder, $folder] = $this->getNonSharedUserFolder(); @@ -4665,7 +4665,7 @@ class ShareAPIControllerTest extends TestCase { * @param array $users * @param $exception */ - public function testFormatShare(array $expects, \OCP\Share\IShare $share, array $users, $exception) { + public function testFormatShare(array $expects, \OCP\Share\IShare $share, array $users, $exception): void { $this->userManager->method('get')->willReturnMap($users); $recipientGroup = $this->createMock(IGroup::class); @@ -4882,7 +4882,7 @@ class ShareAPIControllerTest extends TestCase { * @param bool $helperAvailable * @param array $formatShareByHelper */ - public function testFormatRoomShare(array $expects, \OCP\Share\IShare $share, bool $helperAvailable, array $formatShareByHelper) { + public function testFormatRoomShare(array $expects, \OCP\Share\IShare $share, bool $helperAvailable, array $formatShareByHelper): void { $this->rootFolder->method('getUserFolder') ->with($this->currentUser) ->willReturnSelf(); diff --git a/apps/files_sharing/tests/Controller/ShareControllerTest.php b/apps/files_sharing/tests/Controller/ShareControllerTest.php index 09b02be5f66..cfe9d935f7f 100644 --- a/apps/files_sharing/tests/Controller/ShareControllerTest.php +++ b/apps/files_sharing/tests/Controller/ShareControllerTest.php @@ -165,7 +165,7 @@ class ShareControllerTest extends \Test\TestCase { parent::tearDown(); } - public function testShowShareInvalidToken() { + public function testShowShareInvalidToken(): void { $this->shareController->setToken('invalidtoken'); $this->shareManager @@ -180,7 +180,7 @@ class ShareControllerTest extends \Test\TestCase { $this->shareController->showShare(); } - public function testShowShareNotAuthenticated() { + public function testShowShareNotAuthenticated(): void { $this->shareController->setToken('validtoken'); $share = \OC::$server->getShareManager()->newShare(); @@ -199,7 +199,7 @@ class ShareControllerTest extends \Test\TestCase { } - public function testShowShare() { + public function testShowShare(): void { $note = 'personal note'; $filename = 'file1.txt'; @@ -347,7 +347,7 @@ class ShareControllerTest extends \Test\TestCase { $this->assertEquals($expectedResponse, $response); } - public function testShowFileDropShare() { + public function testShowFileDropShare(): void { $filename = 'folder1'; $this->shareController->setToken('token'); @@ -484,7 +484,7 @@ class ShareControllerTest extends \Test\TestCase { $this->assertEquals($expectedResponse, $response); } - public function testShowShareWithPrivateName() { + public function testShowShareWithPrivateName(): void { $note = 'personal note'; $filename = 'file1.txt'; @@ -614,7 +614,7 @@ class ShareControllerTest extends \Test\TestCase { } - public function testShowShareInvalid() { + public function testShowShareInvalid(): void { $this->expectException(\OCP\Files\NotFoundException::class); $filename = 'file1.txt'; @@ -664,7 +664,7 @@ class ShareControllerTest extends \Test\TestCase { $this->shareController->showShare(); } - public function testDownloadShareWithCreateOnlyShare() { + public function testDownloadShareWithCreateOnlyShare(): void { $share = $this->getMockBuilder(IShare::class)->getMock(); $share->method('getPassword')->willReturn('password'); $share @@ -684,7 +684,7 @@ class ShareControllerTest extends \Test\TestCase { $this->assertEquals($expectedResponse, $response); } - public function testDisabledOwner() { + public function testDisabledOwner(): void { $this->shareController->setToken('token'); $owner = $this->getMockBuilder(IUser::class)->getMock(); @@ -725,7 +725,7 @@ class ShareControllerTest extends \Test\TestCase { $this->shareController->showShare(); } - public function testDisabledInitiator() { + public function testDisabledInitiator(): void { $this->shareController->setToken('token'); $owner = $this->getMockBuilder(IUser::class)->getMock(); diff --git a/apps/files_sharing/tests/Controller/ShareInfoControllerTest.php b/apps/files_sharing/tests/Controller/ShareInfoControllerTest.php index 59d7afc28d6..f2df74fd01b 100644 --- a/apps/files_sharing/tests/Controller/ShareInfoControllerTest.php +++ b/apps/files_sharing/tests/Controller/ShareInfoControllerTest.php @@ -41,7 +41,7 @@ class ShareInfoControllerTest extends TestCase { ->getMock(); } - public function testNoShare() { + public function testNoShare(): void { $this->shareManager->method('getShareByToken') ->with('token') ->willThrowException(new ShareNotFound()); @@ -51,7 +51,7 @@ class ShareInfoControllerTest extends TestCase { $this->assertEquals($expected, $this->controller->info('token')); } - public function testWrongPassword() { + public function testWrongPassword(): void { $share = $this->createMock(IShare::class); $share->method('getPassword') ->willReturn('sharePass'); @@ -68,7 +68,7 @@ class ShareInfoControllerTest extends TestCase { $this->assertEquals($expected, $this->controller->info('token', 'pass')); } - public function testNoReadPermissions() { + public function testNoReadPermissions(): void { $share = $this->createMock(IShare::class); $share->method('getPassword') ->willReturn('sharePass'); @@ -107,7 +107,7 @@ class ShareInfoControllerTest extends TestCase { return $file; } - public function testInfoFile() { + public function testInfoFile(): void { $file = $this->prepareFile(); $share = $this->createMock(IShare::class); @@ -139,7 +139,7 @@ class ShareInfoControllerTest extends TestCase { $this->assertEquals($expected, $this->controller->info('token', 'pass')); } - public function testInfoFileRO() { + public function testInfoFileRO(): void { $file = $this->prepareFile(); $share = $this->createMock(IShare::class); @@ -221,7 +221,7 @@ class ShareInfoControllerTest extends TestCase { return $root; } - public function testInfoFolder() { + public function testInfoFolder(): void { $file = $this->prepareFolder(); $share = $this->createMock(IShare::class); diff --git a/apps/files_sharing/tests/Controller/ShareesAPIControllerTest.php b/apps/files_sharing/tests/Controller/ShareesAPIControllerTest.php index f787607f5a8..bf02e8114df 100644 --- a/apps/files_sharing/tests/Controller/ShareesAPIControllerTest.php +++ b/apps/files_sharing/tests/Controller/ShareesAPIControllerTest.php @@ -223,7 +223,7 @@ class ShareesAPIControllerTest extends TestCase { bool $shareWithGroupOnly, bool $shareeEnumeration, bool $allowGroupSharing, - ) { + ): void { $search = $getData['search'] ?? ''; $itemType = $getData['itemType'] ?? 'irrelevant'; $page = $getData['page'] ?? 1; @@ -333,7 +333,7 @@ class ShareesAPIControllerTest extends TestCase { * @param array $getData * @param string $message */ - public function testSearchInvalid($getData, $message) { + public function testSearchInvalid($getData, $message): void { $page = $getData['page'] ?? 1; $perPage = $getData['perPage'] ?? 200; @@ -391,11 +391,11 @@ class ShareesAPIControllerTest extends TestCase { * @param string $itemType * @param bool $expected */ - public function testIsRemoteSharingAllowed($itemType, $expected) { + public function testIsRemoteSharingAllowed($itemType, $expected): void { $this->assertSame($expected, $this->invokePrivate($this->sharees, 'isRemoteSharingAllowed', [$itemType])); } - public function testSearchSharingDisabled() { + public function testSearchSharingDisabled(): void { $this->shareManager->expects($this->once()) ->method('sharingDisabledForUser') ->with($this->uid) @@ -412,7 +412,7 @@ class ShareesAPIControllerTest extends TestCase { $this->assertInstanceOf(DataResponse::class, $this->sharees->search('', null, 1, 10, [], false)); } - public function testSearchNoItemType() { + public function testSearchNoItemType(): void { $this->expectException(\OCP\AppFramework\OCS\OCSBadRequestException::class); $this->expectExceptionMessage('Missing itemType'); @@ -434,7 +434,7 @@ class ShareesAPIControllerTest extends TestCase { * @param array $params * @param array $expected */ - public function testGetPaginationLink($page, $scriptName, $params, $expected) { + public function testGetPaginationLink($page, $scriptName, $params, $expected): void { $this->request->expects($this->once()) ->method('getScriptName') ->willReturn($scriptName); @@ -455,7 +455,7 @@ class ShareesAPIControllerTest extends TestCase { * @param string $scriptName * @param bool $expected */ - public function testIsV2($scriptName, $expected) { + public function testIsV2($scriptName, $expected): void { $this->request->expects($this->once()) ->method('getScriptName') ->willReturn($scriptName); diff --git a/apps/files_sharing/tests/DeleteOrphanedSharesJobTest.php b/apps/files_sharing/tests/DeleteOrphanedSharesJobTest.php index 20365ebb842..e0d2d67d45f 100644 --- a/apps/files_sharing/tests/DeleteOrphanedSharesJobTest.php +++ b/apps/files_sharing/tests/DeleteOrphanedSharesJobTest.php @@ -107,7 +107,7 @@ class DeleteOrphanedSharesJobTest extends \Test\TestCase { /** * Test clearing orphaned shares */ - public function testClearShares() { + public function testClearShares(): void { $this->loginAsUser($this->user1); $user1Folder = \OC::$server->getUserFolder($this->user1); diff --git a/apps/files_sharing/tests/EtagPropagationTest.php b/apps/files_sharing/tests/EtagPropagationTest.php index 3f9ddfc413d..5a65b1b5389 100644 --- a/apps/files_sharing/tests/EtagPropagationTest.php +++ b/apps/files_sharing/tests/EtagPropagationTest.php @@ -171,7 +171,7 @@ class EtagPropagationTest extends PropagationTestCase { } } - public function testOwnerWritesToShare() { + public function testOwnerWritesToShare(): void { $this->loginAsUser(self::TEST_FILES_SHARING_API_USER1); Filesystem::file_put_contents('/sub1/sub2/folder/asd.txt', 'bar'); $this->assertEtagsNotChanged([self::TEST_FILES_SHARING_API_USER4]); @@ -181,7 +181,7 @@ class EtagPropagationTest extends PropagationTestCase { $this->assertAllUnchanged(); } - public function testOwnerWritesToSingleFileShare() { + public function testOwnerWritesToSingleFileShare(): void { $this->loginAsUser(self::TEST_FILES_SHARING_API_USER1); Filesystem::file_put_contents('/foo.txt', 'longer_bar'); $t = (int)Filesystem::filemtime('/foo.txt') - 1; @@ -192,7 +192,7 @@ class EtagPropagationTest extends PropagationTestCase { $this->assertAllUnchanged(); } - public function testOwnerWritesToShareWithReshare() { + public function testOwnerWritesToShareWithReshare(): void { $this->loginAsUser(self::TEST_FILES_SHARING_API_USER1); Filesystem::file_put_contents('/sub1/sub2/folder/inside/bar.txt', 'bar'); $this->assertEtagsForFoldersChanged([self::TEST_FILES_SHARING_API_USER1, self::TEST_FILES_SHARING_API_USER2, @@ -201,7 +201,7 @@ class EtagPropagationTest extends PropagationTestCase { $this->assertAllUnchanged(); } - public function testOwnerRenameInShare() { + public function testOwnerRenameInShare(): void { $this->loginAsUser(self::TEST_FILES_SHARING_API_USER1); $this->assertEtagsNotChanged([self::TEST_FILES_SHARING_API_USER4]); Filesystem::rename('/sub1/sub2/folder/file.txt', '/sub1/sub2/folder/renamed.txt'); @@ -211,7 +211,7 @@ class EtagPropagationTest extends PropagationTestCase { $this->assertAllUnchanged(); } - public function testOwnerRenameInReShare() { + public function testOwnerRenameInReShare(): void { $this->loginAsUser(self::TEST_FILES_SHARING_API_USER1); Filesystem::rename('/sub1/sub2/folder/inside/file.txt', '/sub1/sub2/folder/inside/renamed.txt'); $this->assertEtagsForFoldersChanged([self::TEST_FILES_SHARING_API_USER1, self::TEST_FILES_SHARING_API_USER2, @@ -220,7 +220,7 @@ class EtagPropagationTest extends PropagationTestCase { $this->assertAllUnchanged(); } - public function testOwnerRenameIntoReShare() { + public function testOwnerRenameIntoReShare(): void { $this->loginAsUser(self::TEST_FILES_SHARING_API_USER1); Filesystem::rename('/sub1/sub2/folder/file.txt', '/sub1/sub2/folder/inside/renamed.txt'); $this->assertEtagsForFoldersChanged([self::TEST_FILES_SHARING_API_USER1, self::TEST_FILES_SHARING_API_USER2, @@ -229,7 +229,7 @@ class EtagPropagationTest extends PropagationTestCase { $this->assertAllUnchanged(); } - public function testOwnerRenameOutOfReShare() { + public function testOwnerRenameOutOfReShare(): void { $this->loginAsUser(self::TEST_FILES_SHARING_API_USER1); Filesystem::rename('/sub1/sub2/folder/inside/file.txt', '/sub1/sub2/folder/renamed.txt'); $this->assertEtagsForFoldersChanged([self::TEST_FILES_SHARING_API_USER1, self::TEST_FILES_SHARING_API_USER2, @@ -238,7 +238,7 @@ class EtagPropagationTest extends PropagationTestCase { $this->assertAllUnchanged(); } - public function testOwnerDeleteInShare() { + public function testOwnerDeleteInShare(): void { $this->loginAsUser(self::TEST_FILES_SHARING_API_USER1); Filesystem::unlink('/sub1/sub2/folder/file.txt'); $this->assertEtagsNotChanged([self::TEST_FILES_SHARING_API_USER4]); @@ -248,7 +248,7 @@ class EtagPropagationTest extends PropagationTestCase { $this->assertAllUnchanged(); } - public function testOwnerDeleteInReShare() { + public function testOwnerDeleteInReShare(): void { $this->loginAsUser(self::TEST_FILES_SHARING_API_USER1); Filesystem::unlink('/sub1/sub2/folder/inside/file.txt'); $this->assertEtagsForFoldersChanged([self::TEST_FILES_SHARING_API_USER1, self::TEST_FILES_SHARING_API_USER2, @@ -257,7 +257,7 @@ class EtagPropagationTest extends PropagationTestCase { $this->assertAllUnchanged(); } - public function testOwnerUnshares() { + public function testOwnerUnshares(): void { $this->loginAsUser(self::TEST_FILES_SHARING_API_USER1); $folderInfo = $this->rootView->getFileInfo('/' . self::TEST_FILES_SHARING_API_USER1 . '/files/sub1/sub2/folder'); $this->assertInstanceOf('\OC\Files\FileInfo', $folderInfo); @@ -280,7 +280,7 @@ class EtagPropagationTest extends PropagationTestCase { $this->assertAllUnchanged(); } - public function testOwnerUnsharesFlatReshares() { + public function testOwnerUnsharesFlatReshares(): void { $this->loginAsUser(self::TEST_FILES_SHARING_API_USER1); $folderInfo = $this->rootView->getFileInfo('/' . self::TEST_FILES_SHARING_API_USER1 . '/files/sub1/sub2/folder/inside'); $this->assertInstanceOf('\OC\Files\FileInfo', $folderInfo); @@ -301,7 +301,7 @@ class EtagPropagationTest extends PropagationTestCase { $this->assertAllUnchanged(); } - public function testRecipientUnsharesFromSelf() { + public function testRecipientUnsharesFromSelf(): void { $this->loginAsUser(self::TEST_FILES_SHARING_API_USER2); $ls = $this->rootView->getDirectoryContent('/' . self::TEST_FILES_SHARING_API_USER2 . '/files/sub1/sub2/'); $this->assertTrue( @@ -315,7 +315,7 @@ class EtagPropagationTest extends PropagationTestCase { $this->assertAllUnchanged(); } - public function testRecipientWritesToShare() { + public function testRecipientWritesToShare(): void { $this->loginAsUser(self::TEST_FILES_SHARING_API_USER2); Filesystem::file_put_contents('/sub1/sub2/folder/asd.txt', 'bar'); $this->assertEtagsNotChanged([self::TEST_FILES_SHARING_API_USER4]); @@ -328,7 +328,7 @@ class EtagPropagationTest extends PropagationTestCase { $this->assertAllUnchanged(); } - public function testRecipientWritesToReshare() { + public function testRecipientWritesToReshare(): void { $this->loginAsUser(self::TEST_FILES_SHARING_API_USER2); Filesystem::file_put_contents('/sub1/sub2/folder/inside/asd.txt', 'bar'); $this->assertEtagsForFoldersChanged([self::TEST_FILES_SHARING_API_USER1, self::TEST_FILES_SHARING_API_USER2, @@ -337,7 +337,7 @@ class EtagPropagationTest extends PropagationTestCase { $this->assertAllUnchanged(); } - public function testRecipientWritesToOtherRecipientsReshare() { + public function testRecipientWritesToOtherRecipientsReshare(): void { $this->loginAsUser(self::TEST_FILES_SHARING_API_USER3); Filesystem::file_put_contents('/sub1/sub2/folder/inside/asd.txt', 'bar'); $this->assertEtagsForFoldersChanged([self::TEST_FILES_SHARING_API_USER1, self::TEST_FILES_SHARING_API_USER2, @@ -346,7 +346,7 @@ class EtagPropagationTest extends PropagationTestCase { $this->assertAllUnchanged(); } - public function testRecipientRenameInShare() { + public function testRecipientRenameInShare(): void { $this->loginAsUser(self::TEST_FILES_SHARING_API_USER2); Filesystem::rename('/sub1/sub2/folder/file.txt', '/sub1/sub2/folder/renamed.txt'); $this->assertEtagsNotChanged([self::TEST_FILES_SHARING_API_USER4]); @@ -356,7 +356,7 @@ class EtagPropagationTest extends PropagationTestCase { $this->assertAllUnchanged(); } - public function testRecipientRenameInReShare() { + public function testRecipientRenameInReShare(): void { $this->loginAsUser(self::TEST_FILES_SHARING_API_USER2); Filesystem::rename('/sub1/sub2/folder/inside/file.txt', '/sub1/sub2/folder/inside/renamed.txt'); $this->assertEtagsForFoldersChanged([self::TEST_FILES_SHARING_API_USER1, self::TEST_FILES_SHARING_API_USER2, @@ -365,7 +365,7 @@ class EtagPropagationTest extends PropagationTestCase { $this->assertAllUnchanged(); } - public function testRecipientRenameResharedFolder() { + public function testRecipientRenameResharedFolder(): void { $this->loginAsUser(self::TEST_FILES_SHARING_API_USER2); Filesystem::rename('/directReshare', '/sub1/directReshare'); $this->assertEtagsNotChanged([self::TEST_FILES_SHARING_API_USER1, self::TEST_FILES_SHARING_API_USER3, self::TEST_FILES_SHARING_API_USER4]); @@ -376,7 +376,7 @@ class EtagPropagationTest extends PropagationTestCase { $this->assertAllUnchanged(); } - public function testRecipientDeleteInShare() { + public function testRecipientDeleteInShare(): void { $this->loginAsUser(self::TEST_FILES_SHARING_API_USER2); Filesystem::unlink('/sub1/sub2/folder/file.txt'); $this->assertEtagsNotChanged([self::TEST_FILES_SHARING_API_USER4]); @@ -386,7 +386,7 @@ class EtagPropagationTest extends PropagationTestCase { $this->assertAllUnchanged(); } - public function testRecipientDeleteInReShare() { + public function testRecipientDeleteInReShare(): void { $this->loginAsUser(self::TEST_FILES_SHARING_API_USER2); Filesystem::unlink('/sub1/sub2/folder/inside/file.txt'); $this->assertEtagsForFoldersChanged([self::TEST_FILES_SHARING_API_USER1, self::TEST_FILES_SHARING_API_USER2, @@ -395,7 +395,7 @@ class EtagPropagationTest extends PropagationTestCase { $this->assertAllUnchanged(); } - public function testReshareRecipientWritesToReshare() { + public function testReshareRecipientWritesToReshare(): void { $this->loginAsUser(self::TEST_FILES_SHARING_API_USER4); Filesystem::file_put_contents('/sub1/sub2/inside/asd.txt', 'bar'); $this->assertEtagsForFoldersChanged([self::TEST_FILES_SHARING_API_USER1, self::TEST_FILES_SHARING_API_USER2, @@ -404,7 +404,7 @@ class EtagPropagationTest extends PropagationTestCase { $this->assertAllUnchanged(); } - public function testReshareRecipientRenameInReShare() { + public function testReshareRecipientRenameInReShare(): void { $this->loginAsUser(self::TEST_FILES_SHARING_API_USER4); Filesystem::rename('/sub1/sub2/inside/file.txt', '/sub1/sub2/inside/renamed.txt'); $this->assertEtagsForFoldersChanged([self::TEST_FILES_SHARING_API_USER1, self::TEST_FILES_SHARING_API_USER2, @@ -413,7 +413,7 @@ class EtagPropagationTest extends PropagationTestCase { $this->assertAllUnchanged(); } - public function testReshareRecipientDeleteInReShare() { + public function testReshareRecipientDeleteInReShare(): void { $this->loginAsUser(self::TEST_FILES_SHARING_API_USER4); Filesystem::unlink('/sub1/sub2/inside/file.txt'); $this->assertEtagsForFoldersChanged([self::TEST_FILES_SHARING_API_USER1, self::TEST_FILES_SHARING_API_USER2, @@ -422,7 +422,7 @@ class EtagPropagationTest extends PropagationTestCase { $this->assertAllUnchanged(); } - public function testRecipientUploadInDirectReshare() { + public function testRecipientUploadInDirectReshare(): void { $this->loginAsUser(self::TEST_FILES_SHARING_API_USER2); Filesystem::file_put_contents('/directReshare/test.txt', 'sad'); $this->assertEtagsNotChanged([self::TEST_FILES_SHARING_API_USER3]); @@ -431,7 +431,7 @@ class EtagPropagationTest extends PropagationTestCase { $this->assertAllUnchanged(); } - public function testEtagChangeOnPermissionsChange() { + public function testEtagChangeOnPermissionsChange(): void { $userFolder = $this->rootFolder->getUserFolder(self::TEST_FILES_SHARING_API_USER1); $node = $userFolder->get('/sub1/sub2/folder'); diff --git a/apps/files_sharing/tests/ExpireSharesJobTest.php b/apps/files_sharing/tests/ExpireSharesJobTest.php index e6383d12ded..cf7be7b20a0 100644 --- a/apps/files_sharing/tests/ExpireSharesJobTest.php +++ b/apps/files_sharing/tests/ExpireSharesJobTest.php @@ -107,7 +107,7 @@ class ExpireSharesJobTest extends \Test\TestCase { * @param bool $addInterval If true add to the current time if false subtract * @param bool $shouldExpire Should this share be expired */ - public function testExpireLinkShare($addExpiration, $interval, $addInterval, $shouldExpire) { + public function testExpireLinkShare($addExpiration, $interval, $addInterval, $shouldExpire): void { $this->loginAsUser($this->user1); $user1Folder = \OC::$server->getUserFolder($this->user1); @@ -164,7 +164,7 @@ class ExpireSharesJobTest extends \Test\TestCase { } } - public function testDoNotExpireOtherShares() { + public function testDoNotExpireOtherShares(): void { $this->loginAsUser($this->user1); $user1Folder = \OC::$server->getUserFolder($this->user1); diff --git a/apps/files_sharing/tests/External/CacheTest.php b/apps/files_sharing/tests/External/CacheTest.php index 6259fc98e1f..2fb99e15715 100644 --- a/apps/files_sharing/tests/External/CacheTest.php +++ b/apps/files_sharing/tests/External/CacheTest.php @@ -91,7 +91,7 @@ class CacheTest extends TestCase { parent::tearDown(); } - public function testGetInjectsOwnerDisplayName() { + public function testGetInjectsOwnerDisplayName(): void { $info = $this->cache->get('test.txt'); $this->assertEquals( $this->remoteUser . '@example.com/owncloud', @@ -99,12 +99,12 @@ class CacheTest extends TestCase { ); } - public function testGetReturnsFalseIfNotFound() { + public function testGetReturnsFalseIfNotFound(): void { $info = $this->cache->get('unexisting-entry.txt'); $this->assertFalse($info); } - public function testGetFolderPopulatesOwner() { + public function testGetFolderPopulatesOwner(): void { $dirId = $this->cache->put( 'subdir', [ diff --git a/apps/files_sharing/tests/External/ManagerTest.php b/apps/files_sharing/tests/External/ManagerTest.php index 0687d567453..7302fd307f2 100644 --- a/apps/files_sharing/tests/External/ManagerTest.php +++ b/apps/files_sharing/tests/External/ManagerTest.php @@ -181,7 +181,7 @@ class ManagerTest extends TestCase { $this->mountManager->addMount(new MountPoint(Temporary::class, '', [])); } - public function testAddUserShare() { + public function testAddUserShare(): void { $this->doTestAddShare([ 'remote' => 'http://localhost', 'token' => 'token1', @@ -195,7 +195,7 @@ class ManagerTest extends TestCase { ], false); } - public function testAddGroupShare() { + public function testAddGroupShare(): void { $this->doTestAddShare([ 'remote' => 'http://localhost', 'token' => 'token1', @@ -474,7 +474,7 @@ class ManagerTest extends TestCase { return [$shareData, $groupShare]; } - public function testAcceptOriginalGroupShare() { + public function testAcceptOriginalGroupShare(): void { [$shareData, $groupShare] = $this->createTestGroupShare(); $this->assertTrue($this->manager->acceptShare($groupShare['id'])); $this->verifyAcceptedGroupShare($shareData); @@ -484,7 +484,7 @@ class ManagerTest extends TestCase { $this->verifyAcceptedGroupShare($shareData); } - public function testAcceptGroupShareAgainThroughGroupShare() { + public function testAcceptGroupShareAgainThroughGroupShare(): void { [$shareData, $groupShare] = $this->createTestGroupShare(); $this->assertTrue($this->manager->acceptShare($groupShare['id'])); $this->verifyAcceptedGroupShare($shareData); @@ -506,7 +506,7 @@ class ManagerTest extends TestCase { $this->verifyAcceptedGroupShare($shareData, '/SharedFolder'); } - public function testAcceptGroupShareAgainThroughSubShare() { + public function testAcceptGroupShareAgainThroughSubShare(): void { [$shareData, $groupShare] = $this->createTestGroupShare(); $this->assertTrue($this->manager->acceptShare($groupShare['id'])); $this->verifyAcceptedGroupShare($shareData); @@ -528,7 +528,7 @@ class ManagerTest extends TestCase { $this->verifyAcceptedGroupShare($shareData); } - public function testDeclineOriginalGroupShare() { + public function testDeclineOriginalGroupShare(): void { [$shareData, $groupShare] = $this->createTestGroupShare(); $this->assertTrue($this->manager->declineShare($groupShare['id'])); $this->verifyDeclinedGroupShare($shareData); @@ -538,7 +538,7 @@ class ManagerTest extends TestCase { $this->verifyDeclinedGroupShare($shareData); } - public function testDeclineGroupShareAgainThroughGroupShare() { + public function testDeclineGroupShareAgainThroughGroupShare(): void { [$shareData, $groupShare] = $this->createTestGroupShare(); $this->assertTrue($this->manager->acceptShare($groupShare['id'])); $this->verifyAcceptedGroupShare($shareData); @@ -552,7 +552,7 @@ class ManagerTest extends TestCase { $this->verifyDeclinedGroupShare($shareData, '/SharedFolder'); } - public function testDeclineGroupShareAgainThroughSubshare() { + public function testDeclineGroupShareAgainThroughSubshare(): void { [$shareData, $groupShare] = $this->createTestGroupShare(); $this->assertTrue($this->manager->acceptShare($groupShare['id'])); $this->verifyAcceptedGroupShare($shareData); @@ -570,7 +570,7 @@ class ManagerTest extends TestCase { $this->verifyDeclinedGroupShare($shareData, '/SharedFolder'); } - public function testDeclineGroupShareAgainThroughMountPoint() { + public function testDeclineGroupShareAgainThroughMountPoint(): void { [$shareData, $groupShare] = $this->createTestGroupShare(); $this->assertTrue($this->manager->acceptShare($groupShare['id'])); $this->verifyAcceptedGroupShare($shareData); @@ -583,7 +583,7 @@ class ManagerTest extends TestCase { $this->assertFalse($this->manager->removeShare($this->uid . '/files/' . $shareData['name'])); } - public function testDeclineThenAcceptGroupShareAgainThroughGroupShare() { + public function testDeclineThenAcceptGroupShareAgainThroughGroupShare(): void { [$shareData, $groupShare] = $this->createTestGroupShare(); // decline, this creates a declined sub-share $this->assertTrue($this->manager->declineShare($groupShare['id'])); @@ -601,7 +601,7 @@ class ManagerTest extends TestCase { $this->verifyAcceptedGroupShare($shareData, '/SharedFolder'); } - public function testDeclineThenAcceptGroupShareAgainThroughSubShare() { + public function testDeclineThenAcceptGroupShareAgainThroughSubShare(): void { [$shareData, $groupShare] = $this->createTestGroupShare(); // decline, this creates a declined sub-share $this->assertTrue($this->manager->declineShare($groupShare['id'])); @@ -619,7 +619,7 @@ class ManagerTest extends TestCase { $this->verifyAcceptedGroupShare($shareData); } - public function testDeleteUserShares() { + public function testDeleteUserShares(): void { // user 1 shares $shareData = $this->createTestUserShare($this->uid); @@ -666,7 +666,7 @@ class ManagerTest extends TestCase { $this->assertEquals($user2Shares[1]['user'], 'user2'); } - public function testDeleteGroupShares() { + public function testDeleteGroupShares(): void { $shareData = $this->createTestUserShare($this->uid); [$shareData, $groupShare] = $this->createTestGroupShare(); diff --git a/apps/files_sharing/tests/External/ScannerTest.php b/apps/files_sharing/tests/External/ScannerTest.php index c828fd59a08..7daa5f229d2 100644 --- a/apps/files_sharing/tests/External/ScannerTest.php +++ b/apps/files_sharing/tests/External/ScannerTest.php @@ -35,7 +35,7 @@ class ScannerTest extends TestCase { $this->scanner = new Scanner($this->storage); } - public function testScan() { + public function testScan(): void { $this->storage->expects($this->any()) ->method('getShareInfo') ->willReturn(['status' => 'success', 'data' => []]); @@ -47,7 +47,7 @@ class ScannerTest extends TestCase { $this->addToAssertionCount(1); } - public function testScanFile() { + public function testScanFile(): void { // FIXME add real tests, we are currently only checking for // Declaration of OCA\Files_Sharing\External\Scanner::*() should be // compatible with OC\Files\Cache\Scanner::*() diff --git a/apps/files_sharing/tests/ExternalStorageTest.php b/apps/files_sharing/tests/ExternalStorageTest.php index 4d807526f0d..56a1f320030 100644 --- a/apps/files_sharing/tests/ExternalStorageTest.php +++ b/apps/files_sharing/tests/ExternalStorageTest.php @@ -89,12 +89,12 @@ class ExternalStorageTest extends \Test\TestCase { /** * @dataProvider optionsProvider */ - public function testStorageMountOptions($inputUri, $baseUri) { + public function testStorageMountOptions($inputUri, $baseUri): void { $storage = $this->getTestStorage($inputUri); $this->assertEquals($baseUri, $storage->getBaseUri()); } - public function testIfTestReturnsTheValue() { + public function testIfTestReturnsTheValue(): void { $result = $this->getTestStorage('https://remoteserver')->test(); $this->assertSame(true, $result); } diff --git a/apps/files_sharing/tests/GroupEtagPropagationTest.php b/apps/files_sharing/tests/GroupEtagPropagationTest.php index 280b091b5f7..9b2b63b0181 100644 --- a/apps/files_sharing/tests/GroupEtagPropagationTest.php +++ b/apps/files_sharing/tests/GroupEtagPropagationTest.php @@ -89,7 +89,7 @@ class GroupEtagPropagationTest extends PropagationTestCase { } } - public function testGroupReShareRecipientWrites() { + public function testGroupReShareRecipientWrites(): void { $this->loginAsUser(self::TEST_FILES_SHARING_API_USER3); Filesystem::file_put_contents('/test/sub/file.txt', 'asd'); @@ -99,7 +99,7 @@ class GroupEtagPropagationTest extends PropagationTestCase { $this->assertAllUnchanged(); } - public function testGroupReShareSubFolderRecipientWrites() { + public function testGroupReShareSubFolderRecipientWrites(): void { $this->loginAsUser(self::TEST_FILES_SHARING_API_USER4); Filesystem::file_put_contents('/sub/file.txt', 'asd'); @@ -109,7 +109,7 @@ class GroupEtagPropagationTest extends PropagationTestCase { $this->assertAllUnchanged(); } - public function testRecipientUnsharesFromSelf() { + public function testRecipientUnsharesFromSelf(): void { $this->loginAsUser(self::TEST_FILES_SHARING_API_USER2); $this->assertTrue( $this->rootView->unlink('/' . self::TEST_FILES_SHARING_API_USER2 . '/files/test') @@ -119,7 +119,7 @@ class GroupEtagPropagationTest extends PropagationTestCase { $this->assertAllUnchanged(); } - public function testRecipientUnsharesFromSelfUniqueGroupShare() { + public function testRecipientUnsharesFromSelfUniqueGroupShare(): void { $this->loginAsUser(self::TEST_FILES_SHARING_API_USER2); // rename to create an extra entry in the share table $this->rootView->rename('/' . self::TEST_FILES_SHARING_API_USER2 . '/files/test', '/' . self::TEST_FILES_SHARING_API_USER2 . '/files/test_renamed'); diff --git a/apps/files_sharing/tests/HelperTest.php b/apps/files_sharing/tests/HelperTest.php index cc5c0d27e60..d72afc4d4aa 100644 --- a/apps/files_sharing/tests/HelperTest.php +++ b/apps/files_sharing/tests/HelperTest.php @@ -16,7 +16,7 @@ class HelperTest extends TestCase { /** * test set and get share folder */ - public function testSetGetShareFolder() { + public function testSetGetShareFolder(): void { $this->assertSame('/', \OCA\Files_Sharing\Helper::getShareFolder()); \OCA\Files_Sharing\Helper::setShareFolder('/Shared/Folder'); diff --git a/apps/files_sharing/tests/LockingTest.php b/apps/files_sharing/tests/LockingTest.php index 0ca204ef215..c69cf99f185 100644 --- a/apps/files_sharing/tests/LockingTest.php +++ b/apps/files_sharing/tests/LockingTest.php @@ -61,7 +61,7 @@ class LockingTest extends TestCase { } - public function testLockAsRecipient() { + public function testLockAsRecipient(): void { $this->expectException(\OCP\Lock\LockedException::class); $this->loginAsUser($this->ownerUid); @@ -73,7 +73,7 @@ class LockingTest extends TestCase { Filesystem::rename('/foo', '/asd'); } - public function testUnLockAsRecipient() { + public function testUnLockAsRecipient(): void { $this->loginAsUser($this->ownerUid); Filesystem::initMountPoints($this->recipientUid); @@ -84,7 +84,7 @@ class LockingTest extends TestCase { $this->assertTrue(Filesystem::rename('/foo', '/asd')); } - public function testChangeLock() { + public function testChangeLock(): void { Filesystem::initMountPoints($this->recipientUid); $recipientView = new View('/' . $this->recipientUid . '/files'); $recipientView->lockFile('bar.txt', ILockingProvider::LOCK_SHARED); diff --git a/apps/files_sharing/tests/Middleware/OCSShareAPIMiddlewareTest.php b/apps/files_sharing/tests/Middleware/OCSShareAPIMiddlewareTest.php index b5c7e1ce890..30bae45f520 100644 --- a/apps/files_sharing/tests/Middleware/OCSShareAPIMiddlewareTest.php +++ b/apps/files_sharing/tests/Middleware/OCSShareAPIMiddlewareTest.php @@ -78,7 +78,7 @@ class OCSShareAPIMiddlewareTest extends \Test\TestCase { * @param bool $enabled * @param bool $exception */ - public function testBeforeController(Controller $controller, $enabled, $exception) { + public function testBeforeController(Controller $controller, $enabled, $exception): void { $this->shareManager->method('shareApiEnabled')->willReturn($enabled); try { @@ -109,7 +109,7 @@ class OCSShareAPIMiddlewareTest extends \Test\TestCase { * @param Controller $controller * @param bool $called */ - public function testAfterController(Controller $controller) { + public function testAfterController(Controller $controller): void { if ($controller instanceof ShareAPIController) { $controller->expects($this->once())->method('cleanup'); } diff --git a/apps/files_sharing/tests/Middleware/ShareInfoMiddlewareTest.php b/apps/files_sharing/tests/Middleware/ShareInfoMiddlewareTest.php index 5ba21255a8d..88fa56a9bcb 100644 --- a/apps/files_sharing/tests/Middleware/ShareInfoMiddlewareTest.php +++ b/apps/files_sharing/tests/Middleware/ShareInfoMiddlewareTest.php @@ -29,14 +29,14 @@ class ShareInfoMiddlewareTest extends TestCase { $this->middleware = new ShareInfoMiddleware($this->shareManager); } - public function testBeforeControllerNoShareInfo() { + public function testBeforeControllerNoShareInfo(): void { $this->shareManager->expects($this->never()) ->method($this->anything()); $this->middleware->beforeController($this->createMock(ShareInfoMiddlewareTestController::class), 'foo'); } - public function testBeforeControllerShareInfoNoS2s() { + public function testBeforeControllerShareInfoNoS2s(): void { $this->shareManager->expects($this->once()) ->method('outgoingServer2ServerSharesAllowed') ->willReturn(false); @@ -45,7 +45,7 @@ class ShareInfoMiddlewareTest extends TestCase { $this->middleware->beforeController($this->createMock(ShareInfoController::class), 'foo'); } - public function testBeforeControllerShareInfo() { + public function testBeforeControllerShareInfo(): void { $this->shareManager->expects($this->once()) ->method('outgoingServer2ServerSharesAllowed') ->willReturn(true); @@ -53,7 +53,7 @@ class ShareInfoMiddlewareTest extends TestCase { $this->middleware->beforeController($this->createMock(ShareInfoController::class), 'foo'); } - public function testAfterExceptionNoShareInfo() { + public function testAfterExceptionNoShareInfo(): void { $exeption = new \Exception(); try { @@ -65,7 +65,7 @@ class ShareInfoMiddlewareTest extends TestCase { } - public function testAfterExceptionNoS2S() { + public function testAfterExceptionNoS2S(): void { $exeption = new \Exception(); try { @@ -76,7 +76,7 @@ class ShareInfoMiddlewareTest extends TestCase { } } - public function testAfterExceptionS2S() { + public function testAfterExceptionS2S(): void { $expected = new JSONResponse([], Http::STATUS_NOT_FOUND); $this->assertEquals( @@ -85,7 +85,7 @@ class ShareInfoMiddlewareTest extends TestCase { ); } - public function testAfterControllerNoShareInfo() { + public function testAfterControllerNoShareInfo(): void { $response = $this->createMock(Http\Response::class); $this->assertEquals( @@ -94,7 +94,7 @@ class ShareInfoMiddlewareTest extends TestCase { ); } - public function testAfterControllerNoJSON() { + public function testAfterControllerNoJSON(): void { $response = $this->createMock(Http\Response::class); $this->assertEquals( @@ -103,7 +103,7 @@ class ShareInfoMiddlewareTest extends TestCase { ); } - public function testAfterControllerJSONok() { + public function testAfterControllerJSONok(): void { $data = ['foo' => 'bar']; $response = new JSONResponse($data); @@ -118,7 +118,7 @@ class ShareInfoMiddlewareTest extends TestCase { ); } - public function testAfterControllerJSONerror() { + public function testAfterControllerJSONerror(): void { $data = ['foo' => 'bar']; $response = new JSONResponse($data, Http::STATUS_FORBIDDEN); diff --git a/apps/files_sharing/tests/Middleware/SharingCheckMiddlewareTest.php b/apps/files_sharing/tests/Middleware/SharingCheckMiddlewareTest.php index 580295a26ec..99fcb4eaea0 100644 --- a/apps/files_sharing/tests/Middleware/SharingCheckMiddlewareTest.php +++ b/apps/files_sharing/tests/Middleware/SharingCheckMiddlewareTest.php @@ -59,7 +59,7 @@ class SharingCheckMiddlewareTest extends \Test\TestCase { $this->request); } - public function testIsSharingEnabledWithAppEnabled() { + public function testIsSharingEnabledWithAppEnabled(): void { $this->appManager ->expects($this->once()) ->method('isEnabledForUser') @@ -69,7 +69,7 @@ class SharingCheckMiddlewareTest extends \Test\TestCase { $this->assertTrue(self::invokePrivate($this->sharingCheckMiddleware, 'isSharingEnabled')); } - public function testIsSharingEnabledWithAppDisabled() { + public function testIsSharingEnabledWithAppDisabled(): void { $this->appManager ->expects($this->once()) ->method('isEnabledForUser') @@ -117,7 +117,7 @@ class SharingCheckMiddlewareTest extends \Test\TestCase { /** * @dataProvider externalSharesChecksDataProvider */ - public function testExternalSharesChecks($annotations, $config, $expectedResult) { + public function testExternalSharesChecks($annotations, $config, $expectedResult): void { $this->reflector ->expects($this->atLeastOnce()) ->method('hasAnnotation') @@ -133,7 +133,7 @@ class SharingCheckMiddlewareTest extends \Test\TestCase { /** * @dataProvider externalSharesChecksDataProvider */ - public function testBeforeControllerWithExternalShareControllerWithSharingEnabled($annotations, $config, $noException) { + public function testBeforeControllerWithExternalShareControllerWithSharingEnabled($annotations, $config, $noException): void { $this->appManager ->expects($this->once()) ->method('isEnabledForUser') @@ -162,7 +162,7 @@ class SharingCheckMiddlewareTest extends \Test\TestCase { $this->assertNotEquals($noException, $exceptionThrown); } - public function testBeforeControllerWithShareControllerWithSharingEnabled() { + public function testBeforeControllerWithShareControllerWithSharingEnabled(): void { $share = $this->createMock(IShare::class); $this->appManager @@ -177,7 +177,7 @@ class SharingCheckMiddlewareTest extends \Test\TestCase { } - public function testBeforeControllerWithSharingDisabled() { + public function testBeforeControllerWithSharingDisabled(): void { $this->expectException(\OCP\Files\NotFoundException::class); $this->expectExceptionMessage('Sharing is disabled.'); @@ -191,18 +191,18 @@ class SharingCheckMiddlewareTest extends \Test\TestCase { } - public function testAfterExceptionWithRegularException() { + public function testAfterExceptionWithRegularException(): void { $this->expectException(\Exception::class); $this->expectExceptionMessage('My Exception message'); $this->sharingCheckMiddleware->afterException($this->controllerMock, 'myMethod', new \Exception('My Exception message')); } - public function testAfterExceptionWithNotFoundException() { + public function testAfterExceptionWithNotFoundException(): void { $this->assertEquals(new NotFoundResponse(), $this->sharingCheckMiddleware->afterException($this->controllerMock, 'myMethod', new NotFoundException('My Exception message'))); } - public function testAfterExceptionWithS2SException() { + public function testAfterExceptionWithS2SException(): void { $this->assertEquals(new JSONResponse('My Exception message', 405), $this->sharingCheckMiddleware->afterException($this->controllerMock, 'myMethod', new S2SException('My Exception message'))); } } diff --git a/apps/files_sharing/tests/Migration/SetPasswordColumnTest.php b/apps/files_sharing/tests/Migration/SetPasswordColumnTest.php index eb377412a2e..e15914f6ba1 100644 --- a/apps/files_sharing/tests/Migration/SetPasswordColumnTest.php +++ b/apps/files_sharing/tests/Migration/SetPasswordColumnTest.php @@ -50,7 +50,7 @@ class SetPasswordColumnTest extends TestCase { $query->delete($this->table)->execute(); } - public function testAddPasswordColumn() { + public function testAddPasswordColumn(): void { $this->config->expects($this->once()) ->method('getAppValue') ->with('files_sharing', 'installed_version', '0.0.0') diff --git a/apps/files_sharing/tests/MountProviderTest.php b/apps/files_sharing/tests/MountProviderTest.php index f565d2e3656..2dc5365ae2b 100644 --- a/apps/files_sharing/tests/MountProviderTest.php +++ b/apps/files_sharing/tests/MountProviderTest.php @@ -113,7 +113,7 @@ class MountProviderTest extends \Test\TestCase { * - shares that were opted out of (permissions === 0) * - shares with a group in which the owner is already in */ - public function testExcludeShares() { + public function testExcludeShares(): void { $rootFolder = $this->createMock(IRootFolder::class); $userManager = $this->createMock(IUserManager::class); $attr1 = []; @@ -346,7 +346,7 @@ class MountProviderTest extends \Test\TestCase { * @param array $groupShares array of group share specs * @param array $expectedShares array of expected supershare specs */ - public function testMergeShares($userShares, $groupShares, $expectedShares, $moveFails = false) { + public function testMergeShares($userShares, $groupShares, $expectedShares, $moveFails = false): void { $rootFolder = $this->createMock(IRootFolder::class); $userManager = $this->createMock(IUserManager::class); diff --git a/apps/files_sharing/tests/ShareTest.php b/apps/files_sharing/tests/ShareTest.php index a1580c97fcf..651341a5607 100644 --- a/apps/files_sharing/tests/ShareTest.php +++ b/apps/files_sharing/tests/ShareTest.php @@ -48,7 +48,7 @@ class ShareTest extends TestCase { parent::tearDown(); } - public function testUnshareFromSelf() { + public function testUnshareFromSelf(): void { $groupManager = \OC::$server->getGroupManager(); $userManager = \OC::$server->getUserManager(); @@ -108,7 +108,7 @@ class ShareTest extends TestCase { } } - public function testShareWithDifferentShareFolder() { + public function testShareWithDifferentShareFolder(): void { $fileinfo = $this->view->getFileInfo($this->filename); $folderinfo = $this->view->getFileInfo($this->folder); @@ -139,7 +139,7 @@ class ShareTest extends TestCase { \OC::$server->getConfig()->deleteSystemValue('share_folder'); } - public function testShareWithGroupUniqueName() { + public function testShareWithGroupUniqueName(): void { $this->markTestSkipped('TODO: Disable because fails on drone'); $this->loginHelper(self::TEST_FILES_SHARING_API_USER1); @@ -182,7 +182,7 @@ class ShareTest extends TestCase { * shared files should never have delete permissions * @dataProvider dataProviderTestFileSharePermissions */ - public function testFileSharePermissions($permission, $expectedvalid) { + public function testFileSharePermissions($permission, $expectedvalid): void { $pass = true; try { $this->share( @@ -215,7 +215,7 @@ class ShareTest extends TestCase { ]; } - public function testFileOwner() { + public function testFileOwner(): void { $this->share( IShare::TYPE_USER, $this->filename, diff --git a/apps/files_sharing/tests/SharedMountTest.php b/apps/files_sharing/tests/SharedMountTest.php index c8d42460b8b..82c0770440d 100644 --- a/apps/files_sharing/tests/SharedMountTest.php +++ b/apps/files_sharing/tests/SharedMountTest.php @@ -65,7 +65,7 @@ class SharedMountTest extends TestCase { /** * test if the mount point moves up if the parent folder no longer exists */ - public function testShareMountLoseParentFolder() { + public function testShareMountLoseParentFolder(): void { // share to user $share = $this->share( @@ -97,7 +97,7 @@ class SharedMountTest extends TestCase { /** * @medium */ - public function testDeleteParentOfMountPoint() { + public function testDeleteParentOfMountPoint(): void { // share to user $share = $this->share( IShare::TYPE_USER, @@ -137,7 +137,7 @@ class SharedMountTest extends TestCase { $this->view->unlink($this->folder); } - public function testMoveSharedFile() { + public function testMoveSharedFile(): void { $share = $this->share( IShare::TYPE_USER, $this->filename, @@ -171,7 +171,7 @@ class SharedMountTest extends TestCase { * share file with a group if a user renames the file the filename should not change * for the other users */ - public function testMoveGroupShare() { + public function testMoveGroupShare(): void { $testGroup = $this->groupManager->createGroup('testGroup'); $user1 = $this->userManager->get(self::TEST_FILES_SHARING_API_USER1); $user2 = $this->userManager->get(self::TEST_FILES_SHARING_API_USER2); @@ -223,7 +223,7 @@ class SharedMountTest extends TestCase { * @param string $expectedResult * @param bool $exception if a exception is expected */ - public function testStripUserFilesPath($path, $expectedResult, $exception) { + public function testStripUserFilesPath($path, $expectedResult, $exception): void { $testClass = new DummyTestClassSharedMount(null, null); try { $result = $testClass->stripUserFilesPathDummy($path); @@ -252,7 +252,7 @@ class SharedMountTest extends TestCase { * If the permissions on a group share are upgraded be sure to still respect * removed shares by a member of that group */ - public function testPermissionUpgradeOnUserDeletedGroupShare() { + public function testPermissionUpgradeOnUserDeletedGroupShare(): void { $testGroup = $this->groupManager->createGroup('testGroup'); $user1 = $this->userManager->get(self::TEST_FILES_SHARING_API_USER1); $user2 = $this->userManager->get(self::TEST_FILES_SHARING_API_USER2); @@ -314,7 +314,7 @@ class SharedMountTest extends TestCase { /** * test if the mount point gets renamed if a folder exists at the target */ - public function testShareMountOverFolder() { + public function testShareMountOverFolder(): void { self::loginHelper(self::TEST_FILES_SHARING_API_USER2); $this->view2->mkdir('bar'); @@ -349,7 +349,7 @@ class SharedMountTest extends TestCase { /** * test if the mount point gets renamed if another share exists at the target */ - public function testShareMountOverShare() { + public function testShareMountOverShare(): void { // create a shared cache $caches = []; $cacheFactory = $this->createMock(ICacheFactory::class); diff --git a/apps/files_sharing/tests/SharedStorageTest.php b/apps/files_sharing/tests/SharedStorageTest.php index 521167f1d88..5f907ad8de3 100644 --- a/apps/files_sharing/tests/SharedStorageTest.php +++ b/apps/files_sharing/tests/SharedStorageTest.php @@ -56,7 +56,7 @@ class SharedStorageTest extends TestCase { * * @medium */ - public function testParentOfMountPointIsGone() { + public function testParentOfMountPointIsGone(): void { // share to user $share = $this->share( @@ -101,7 +101,7 @@ class SharedStorageTest extends TestCase { /** * @medium */ - public function testRenamePartFile() { + public function testRenamePartFile(): void { // share to user $share = $this->share( @@ -139,7 +139,7 @@ class SharedStorageTest extends TestCase { $this->shareManager->deleteShare($share); } - public function testFilesize() { + public function testFilesize(): void { $folderSize = $this->view->filesize($this->folder); $file1Size = $this->view->filesize($this->folder . $this->filename); $file2Size = $this->view->filesize($this->filename); @@ -173,7 +173,7 @@ class SharedStorageTest extends TestCase { $this->shareManager->deleteShare($share2); } - public function testGetPermissions() { + public function testGetPermissions(): void { $share = $this->share( IShare::TYPE_USER, $this->folder, @@ -203,7 +203,7 @@ class SharedStorageTest extends TestCase { $this->shareManager->deleteShare($share); } - public function testFopenWithReadOnlyPermission() { + public function testFopenWithReadOnlyPermission(): void { $this->view->file_put_contents($this->folder . '/existing.txt', 'foo'); $share = $this->share( @@ -235,7 +235,7 @@ class SharedStorageTest extends TestCase { $this->shareManager->deleteShare($share); } - public function testFopenWithCreateOnlyPermission() { + public function testFopenWithCreateOnlyPermission(): void { $this->view->file_put_contents($this->folder . '/existing.txt', 'foo'); $fileinfoFolder = $this->view->getFileInfo($this->folder); @@ -282,7 +282,7 @@ class SharedStorageTest extends TestCase { $this->shareManager->deleteShare($share); } - public function testFopenWithUpdateOnlyPermission() { + public function testFopenWithUpdateOnlyPermission(): void { $this->view->file_put_contents($this->folder . '/existing.txt', 'foo'); $share = $this->share( @@ -328,7 +328,7 @@ class SharedStorageTest extends TestCase { $this->shareManager->deleteShare($share); } - public function testFopenWithDeleteOnlyPermission() { + public function testFopenWithDeleteOnlyPermission(): void { $this->view->file_put_contents($this->folder . '/existing.txt', 'foo'); $share = $this->share( @@ -360,7 +360,7 @@ class SharedStorageTest extends TestCase { $this->shareManager->deleteShare($share); } - public function testMountSharesOtherUser() { + public function testMountSharesOtherUser(): void { $rootView = new \OC\Files\View(''); self::loginHelper(self::TEST_FILES_SHARING_API_USER1); @@ -401,7 +401,7 @@ class SharedStorageTest extends TestCase { $this->shareManager->deleteShare($share2); } - public function testCopyFromStorage() { + public function testCopyFromStorage(): void { self::loginHelper(self::TEST_FILES_SHARING_API_USER1); $share = $this->share( @@ -434,7 +434,7 @@ class SharedStorageTest extends TestCase { $this->shareManager->deleteShare($share); } - public function testMoveFromStorage() { + public function testMoveFromStorage(): void { self::loginHelper(self::TEST_FILES_SHARING_API_USER1); $share = $this->share( @@ -467,7 +467,7 @@ class SharedStorageTest extends TestCase { $this->shareManager->deleteShare($share); } - public function testNameConflict() { + public function testNameConflict(): void { self::loginHelper(self::TEST_FILES_SHARING_API_USER1); $view1 = new \OC\Files\View('/' . self::TEST_FILES_SHARING_API_USER1 . '/files'); $view1->mkdir('foo'); @@ -518,7 +518,7 @@ class SharedStorageTest extends TestCase { $this->shareManager->deleteShare($share2); } - public function testOwnerPermissions() { + public function testOwnerPermissions(): void { self::loginHelper(self::TEST_FILES_SHARING_API_USER1); $share = $this->share( @@ -545,7 +545,7 @@ class SharedStorageTest extends TestCase { $this->shareManager->deleteShare($share); } - public function testInitWithNonExistingUser() { + public function testInitWithNonExistingUser(): void { $share = $this->createMock(IShare::class); $share->method('getShareOwner')->willReturn('unexist'); $ownerView = $this->createMock(View::class); @@ -561,7 +561,7 @@ class SharedStorageTest extends TestCase { $this->assertInstanceOf(\OC\Files\Cache\FailedCache::class, $storage->getCache()); } - public function testInitWithNotFoundSource() { + public function testInitWithNotFoundSource(): void { $share = $this->createMock(IShare::class); $share->method('getShareOwner')->willReturn(self::TEST_FILES_SHARING_API_USER1); $share->method('getNodeId')->willReturn(1); diff --git a/apps/files_sharing/tests/SizePropagationTest.php b/apps/files_sharing/tests/SizePropagationTest.php index 1112cb03425..de830c508cd 100644 --- a/apps/files_sharing/tests/SizePropagationTest.php +++ b/apps/files_sharing/tests/SizePropagationTest.php @@ -28,7 +28,7 @@ class SizePropagationTest extends TestCase { return new View('/' . $name . '/files'); } - public function testSizePropagationWhenOwnerChangesFile() { + public function testSizePropagationWhenOwnerChangesFile(): void { $recipientView = $this->setupUser(self::TEST_FILES_SHARING_API_USER1); $ownerView = $this->setupUser(self::TEST_FILES_SHARING_API_USER2); @@ -63,7 +63,7 @@ class SizePropagationTest extends TestCase { $this->assertEquals($ownerRootInfo->getSize() + 3, $newOwnerRootInfo->getSize()); } - public function testSizePropagationWhenRecipientChangesFile() { + public function testSizePropagationWhenRecipientChangesFile(): void { $recipientView = $this->setupUser(self::TEST_FILES_SHARING_API_USER1); $ownerView = $this->setupUser(self::TEST_FILES_SHARING_API_USER2); diff --git a/apps/files_sharing/tests/UnshareChildrenTest.php b/apps/files_sharing/tests/UnshareChildrenTest.php index 70445635e38..e95c1c68ecb 100644 --- a/apps/files_sharing/tests/UnshareChildrenTest.php +++ b/apps/files_sharing/tests/UnshareChildrenTest.php @@ -54,7 +54,7 @@ class UnshareChildrenTest extends TestCase { /** * @medium */ - public function testUnshareChildren() { + public function testUnshareChildren(): void { $fileInfo2 = \OC\Files\Filesystem::getFileInfo($this->folder); $this->share( diff --git a/apps/files_sharing/tests/UpdaterTest.php b/apps/files_sharing/tests/UpdaterTest.php index aeefbac5934..9d26ff873a5 100644 --- a/apps/files_sharing/tests/UpdaterTest.php +++ b/apps/files_sharing/tests/UpdaterTest.php @@ -50,7 +50,7 @@ class UpdaterTest extends TestCase { * points should be unshared before the folder gets deleted so * that the mount point doesn't end up at the trash bin */ - public function testDeleteParentFolder() { + public function testDeleteParentFolder(): void { $status = \OC::$server->getAppManager()->isEnabledForUser('files_trashbin'); (new \OC_App())->enable('files_trashbin'); @@ -128,7 +128,7 @@ class UpdaterTest extends TestCase { * * @param string $shareFolder share folder to use */ - public function testShareFile($shareFolder) { + public function testShareFile($shareFolder): void { $config = \OC::$server->getConfig(); $oldShareFolder = $config->getSystemValue('share_folder'); $config->setSystemValue('share_folder', $shareFolder); @@ -178,7 +178,7 @@ class UpdaterTest extends TestCase { /** * if a folder gets renamed all children mount points should be renamed too */ - public function testRename() { + public function testRename(): void { $fileinfo = \OC\Files\Filesystem::getFileInfo($this->folder); $share = $this->share( @@ -225,7 +225,7 @@ class UpdaterTest extends TestCase { * |-subfolder2 * |-file2.txt --> shared with user3 */ - public function testMovedIntoShareChangeOwner() { + public function testMovedIntoShareChangeOwner(): void { $this->markTestSkipped('Skipped because this is failing with S3 as primary as file id are change when moved.'); // user1 creates folder1 diff --git a/apps/files_sharing/tests/WatcherTest.php b/apps/files_sharing/tests/WatcherTest.php index c116f542fba..012acdcd691 100644 --- a/apps/files_sharing/tests/WatcherTest.php +++ b/apps/files_sharing/tests/WatcherTest.php @@ -87,7 +87,7 @@ class WatcherTest extends TestCase { * Tests that writing a file using the shared storage will propagate the file * size to the owner's parent folders. */ - public function testFolderSizePropagationToOwnerStorage() { + public function testFolderSizePropagationToOwnerStorage(): void { $initialSizes = self::getOwnerDirSizes('files/container/shareddir'); $textData = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'; @@ -117,7 +117,7 @@ class WatcherTest extends TestCase { * Tests that writing a file using the shared storage will propagate the file * size to the owner's parent folders. */ - public function testSubFolderSizePropagationToOwnerStorage() { + public function testSubFolderSizePropagationToOwnerStorage(): void { $initialSizes = self::getOwnerDirSizes('files/container/shareddir/subdir'); $textData = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'; diff --git a/apps/files_trashbin/tests/CapabilitiesTest.php b/apps/files_trashbin/tests/CapabilitiesTest.php index f5d3bdd9a9b..a2a17ca349e 100644 --- a/apps/files_trashbin/tests/CapabilitiesTest.php +++ b/apps/files_trashbin/tests/CapabilitiesTest.php @@ -18,7 +18,7 @@ class CapabilitiesTest extends TestCase { $this->capabilities = new Capabilities(); } - public function testGetCapabilities() { + public function testGetCapabilities(): void { $capabilities = [ 'files' => [ 'undelete' => true diff --git a/apps/files_trashbin/tests/Command/CleanUpTest.php b/apps/files_trashbin/tests/Command/CleanUpTest.php index 3ab11ba96aa..49ae103ea30 100644 --- a/apps/files_trashbin/tests/Command/CleanUpTest.php +++ b/apps/files_trashbin/tests/Command/CleanUpTest.php @@ -82,7 +82,7 @@ class CleanUpTest extends TestCase { * @dataProvider dataTestRemoveDeletedFiles * @param boolean $nodeExists */ - public function testRemoveDeletedFiles(bool $nodeExists) { + public function testRemoveDeletedFiles(bool $nodeExists): void { $this->initTable(); $this->rootFolder ->method('nodeExists') @@ -137,7 +137,7 @@ class CleanUpTest extends TestCase { /** * test remove deleted files from users given as parameter */ - public function testExecuteDeleteListOfUsers() { + public function testExecuteDeleteListOfUsers(): void { $userIds = ['user1', 'user2', 'user3']; $instance = $this->getMockBuilder('OCA\Files_Trashbin\Command\CleanUp') ->setMethods(['removeDeletedFiles']) @@ -168,7 +168,7 @@ class CleanUpTest extends TestCase { /** * test remove deleted files of all users */ - public function testExecuteAllUsers() { + public function testExecuteAllUsers(): void { $userIds = []; $backendUsers = ['user1', 'user2']; $instance = $this->getMockBuilder('OCA\Files_Trashbin\Command\CleanUp') @@ -200,7 +200,7 @@ class CleanUpTest extends TestCase { $this->invokePrivate($instance, 'execute', [$inputInterface, $outputInterface]); } - public function testExecuteNoUsersAndNoAllUsers() { + public function testExecuteNoUsersAndNoAllUsers(): void { $inputInterface = $this->createMock(InputInterface::class); $inputInterface->method('getArgument') ->with('user_id') @@ -218,7 +218,7 @@ class CleanUpTest extends TestCase { $this->invokePrivate($this->cleanup, 'execute', [$inputInterface, $outputInterface]); } - public function testExecuteUsersAndAllUsers() { + public function testExecuteUsersAndAllUsers(): void { $inputInterface = $this->createMock(InputInterface::class); $inputInterface->method('getArgument') ->with('user_id') diff --git a/apps/files_trashbin/tests/Command/ExpireTest.php b/apps/files_trashbin/tests/Command/ExpireTest.php index 5a7f857adbe..4402e07bbb0 100644 --- a/apps/files_trashbin/tests/Command/ExpireTest.php +++ b/apps/files_trashbin/tests/Command/ExpireTest.php @@ -17,7 +17,7 @@ use Test\TestCase; * @package OCA\Files_Trashbin\Tests\Command */ class ExpireTest extends TestCase { - public function testExpireNonExistingUser() { + public function testExpireNonExistingUser(): void { $command = new Expire('test'); $command->handle(); diff --git a/apps/files_trashbin/tests/Controller/PreviewControllerTest.php b/apps/files_trashbin/tests/Controller/PreviewControllerTest.php index f834b324f2b..1076870bb9f 100644 --- a/apps/files_trashbin/tests/Controller/PreviewControllerTest.php +++ b/apps/files_trashbin/tests/Controller/PreviewControllerTest.php @@ -78,21 +78,21 @@ class PreviewControllerTest extends TestCase { ); } - public function testInvalidWidth() { + public function testInvalidWidth(): void { $res = $this->controller->getPreview(42, 0); $expected = new DataResponse([], Http::STATUS_BAD_REQUEST); $this->assertEquals($expected, $res); } - public function testInvalidHeight() { + public function testInvalidHeight(): void { $res = $this->controller->getPreview(42, 10, 0); $expected = new DataResponse([], Http::STATUS_BAD_REQUEST); $this->assertEquals($expected, $res); } - public function testValidPreview() { + public function testValidPreview(): void { $userFolder = $this->createMock(Folder::class); $userRoot = $this->createMock(Folder::class); $trash = $this->createMock(Folder::class); @@ -145,7 +145,7 @@ class PreviewControllerTest extends TestCase { $this->assertEquals($expected, $res); } - public function testTrashFileNotFound() { + public function testTrashFileNotFound(): void { $userFolder = $this->createMock(Folder::class); $userRoot = $this->createMock(Folder::class); $trash = $this->createMock(Folder::class); @@ -169,7 +169,7 @@ class PreviewControllerTest extends TestCase { $this->assertEquals($expected, $res); } - public function testTrashFolder() { + public function testTrashFolder(): void { $userFolder = $this->createMock(Folder::class); $userRoot = $this->createMock(Folder::class); $trash = $this->createMock(Folder::class); diff --git a/apps/files_trashbin/tests/ExpirationTest.php b/apps/files_trashbin/tests/ExpirationTest.php index bf4e1ef2ad9..7f026c16806 100644 --- a/apps/files_trashbin/tests/ExpirationTest.php +++ b/apps/files_trashbin/tests/ExpirationTest.php @@ -89,7 +89,7 @@ class ExpirationTest extends \Test\TestCase { * @param bool $quotaExceeded * @param string $expectedResult */ - public function testExpiration($retentionObligation, $timeNow, $timestamp, $quotaExceeded, $expectedResult) { + public function testExpiration($retentionObligation, $timeNow, $timestamp, $quotaExceeded, $expectedResult): void { $mockedConfig = $this->getMockedConfig($retentionObligation); $mockedTimeFactory = $this->getMockedTimeFactory($timeNow); @@ -120,7 +120,7 @@ class ExpirationTest extends \Test\TestCase { * @param string $configValue * @param int $expectedMaxAgeTimestamp */ - public function testGetMaxAgeAsTimestamp($configValue, $expectedMaxAgeTimestamp) { + public function testGetMaxAgeAsTimestamp($configValue, $expectedMaxAgeTimestamp): void { $mockedConfig = $this->getMockedConfig($configValue); $mockedTimeFactory = $this->getMockedTimeFactory( self::FAKE_TIME_NOW diff --git a/apps/files_trashbin/tests/StorageTest.php b/apps/files_trashbin/tests/StorageTest.php index 76c9829cf9c..37dfe84fc60 100644 --- a/apps/files_trashbin/tests/StorageTest.php +++ b/apps/files_trashbin/tests/StorageTest.php @@ -110,7 +110,7 @@ class StorageTest extends \Test\TestCase { /** * Test that deleting a file puts it into the trashbin. */ - public function testSingleStorageDeleteFile() { + public function testSingleStorageDeleteFile(): void { $this->assertTrue($this->userView->file_exists('test.txt')); $this->userView->unlink('test.txt'); [$storage,] = $this->userView->resolvePath('test.txt'); @@ -127,7 +127,7 @@ class StorageTest extends \Test\TestCase { /** * Test that deleting a folder puts it into the trashbin. */ - public function testSingleStorageDeleteFolder() { + public function testSingleStorageDeleteFolder(): void { $this->assertTrue($this->userView->file_exists('folder/inside.txt')); $this->userView->rmdir('folder'); [$storage,] = $this->userView->resolvePath('folder/inside.txt'); @@ -149,7 +149,7 @@ class StorageTest extends \Test\TestCase { /** * Test that deleting a file with a long filename puts it into the trashbin. */ - public function testSingleStorageDeleteLongFilename() { + public function testSingleStorageDeleteLongFilename(): void { $truncatedFilename = 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.txt'; $this->assertTrue($this->userView->file_exists(static::LONG_FILENAME)); @@ -168,7 +168,7 @@ class StorageTest extends \Test\TestCase { /** * Test that deleting a file with the max filename length puts it into the trashbin. */ - public function testSingleStorageDeleteMaxLengthFilename() { + public function testSingleStorageDeleteMaxLengthFilename(): void { $truncatedFilename = 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.txt'; $this->assertTrue($this->userView->file_exists(static::MAX_FILENAME)); @@ -190,7 +190,7 @@ class StorageTest extends \Test\TestCase { * the trashbin folder is in the root storage while the mounted one * isn't. */ - public function testCrossStorageDeleteFile() { + public function testCrossStorageDeleteFile(): void { $storage2 = new Temporary([]); \OC\Files\Filesystem::mount($storage2, [], $this->user . '/files/substorage'); @@ -216,7 +216,7 @@ class StorageTest extends \Test\TestCase { * the trashbin folder is in the root storage while the mounted one * isn't. */ - public function testCrossStorageDeleteFolder() { + public function testCrossStorageDeleteFolder(): void { $storage2 = new Temporary([]); \OC\Files\Filesystem::mount($storage2, [], $this->user . '/files/substorage'); @@ -245,7 +245,7 @@ class StorageTest extends \Test\TestCase { /** * Test that deleted versions properly land in the trashbin. */ - public function testDeleteVersionsOfFile() { + public function testDeleteVersionsOfFile(): void { // trigger a version (multiple would not work because of the expire logic) $this->userView->file_put_contents('test.txt', 'v1'); @@ -272,7 +272,7 @@ class StorageTest extends \Test\TestCase { /** * Test that deleted versions properly land in the trashbin. */ - public function testDeleteVersionsOfFolder() { + public function testDeleteVersionsOfFolder(): void { // trigger a version (multiple would not work because of the expire logic) $this->userView->file_put_contents('folder/inside.txt', 'v1'); @@ -305,7 +305,7 @@ class StorageTest extends \Test\TestCase { /** * Test that deleted versions properly land in the trashbin when deleting as share recipient. */ - public function testDeleteVersionsOfFileAsRecipient() { + public function testDeleteVersionsOfFileAsRecipient(): void { $this->userView->mkdir('share'); // trigger a version (multiple would not work because of the expire logic) $this->userView->file_put_contents('share/test.txt', 'v1'); @@ -356,7 +356,7 @@ class StorageTest extends \Test\TestCase { /** * Test that deleted versions properly land in the trashbin when deleting as share recipient. */ - public function testDeleteVersionsOfFolderAsRecipient() { + public function testDeleteVersionsOfFolderAsRecipient(): void { $this->userView->mkdir('share'); $this->userView->mkdir('share/folder'); // trigger a version (multiple would not work because of the expire logic) @@ -423,7 +423,7 @@ class StorageTest extends \Test\TestCase { * storages. This is because rename() between storages would call * unlink() which should NOT trigger the version deletion logic. */ - public function testKeepFileAndVersionsWhenMovingFileBetweenStorages() { + public function testKeepFileAndVersionsWhenMovingFileBetweenStorages(): void { $storage2 = new Temporary([]); \OC\Files\Filesystem::mount($storage2, [], $this->user . '/files/substorage'); @@ -462,7 +462,7 @@ class StorageTest extends \Test\TestCase { * storages. This is because rename() between storages would call * unlink() which should NOT trigger the version deletion logic. */ - public function testKeepFileAndVersionsWhenMovingFolderBetweenStorages() { + public function testKeepFileAndVersionsWhenMovingFolderBetweenStorages(): void { $storage2 = new Temporary([]); \OC\Files\Filesystem::mount($storage2, [], $this->user . '/files/substorage'); @@ -499,7 +499,7 @@ class StorageTest extends \Test\TestCase { /** * Delete should fail if the source file can't be deleted. */ - public function testSingleStorageDeleteFileFail() { + public function testSingleStorageDeleteFileFail(): void { /** * @var \OC\Files\Storage\Temporary | \PHPUnit\Framework\MockObject\MockObject $storage */ @@ -536,7 +536,7 @@ class StorageTest extends \Test\TestCase { /** * Delete should fail if the source folder can't be deleted. */ - public function testSingleStorageDeleteFolderFail() { + public function testSingleStorageDeleteFolderFail(): void { /** * @var \OC\Files\Storage\Temporary | \PHPUnit\Framework\MockObject\MockObject $storage */ @@ -570,7 +570,7 @@ class StorageTest extends \Test\TestCase { /** * @dataProvider dataTestShouldMoveToTrash */ - public function testShouldMoveToTrash($mountPoint, $path, $userExists, $appDisablesTrash, $expected) { + public function testShouldMoveToTrash($mountPoint, $path, $userExists, $appDisablesTrash, $expected): void { $fileID = 1; $cache = $this->createMock(ICache::class); $cache->expects($this->any())->method('getId')->willReturn($fileID); @@ -628,7 +628,7 @@ class StorageTest extends \Test\TestCase { /** * Test that deleting a file doesn't error when nobody is logged in */ - public function testSingleStorageDeleteFileLoggedOut() { + public function testSingleStorageDeleteFileLoggedOut(): void { $this->logout(); if (!$this->userView->file_exists('test.txt')) { @@ -639,7 +639,7 @@ class StorageTest extends \Test\TestCase { } } - public function testTrashbinCollision() { + public function testTrashbinCollision(): void { $this->userView->file_put_contents('test.txt', 'foo'); $this->userView->file_put_contents('folder/test.txt', 'bar'); @@ -671,7 +671,7 @@ class StorageTest extends \Test\TestCase { $this->assertEquals('bar', $this->rootView->file_get_contents($this->user . '/files_trashbin/files/test.txt.d1001')); } - public function testMoveFromStoragePreserveFileId() { + public function testMoveFromStoragePreserveFileId(): void { if (!$this->userView->getMount('')->getStorage()->instanceOfStorage(Local::class)) { $this->markTestSkipped('Skipping on non-local users storage'); } diff --git a/apps/files_trashbin/tests/TrashbinTest.php b/apps/files_trashbin/tests/TrashbinTest.php index 528dd86820f..11501891c77 100644 --- a/apps/files_trashbin/tests/TrashbinTest.php +++ b/apps/files_trashbin/tests/TrashbinTest.php @@ -146,7 +146,7 @@ class TrashbinTest extends \Test\TestCase { /** * test expiration of files older then the max storage time defined for the trash */ - public function testExpireOldFiles() { + public function testExpireOldFiles(): void { /** @var \OCP\AppFramework\Utility\ITimeFactory $time */ $time = \OC::$server->query(\OCP\AppFramework\Utility\ITimeFactory::class); @@ -198,7 +198,7 @@ class TrashbinTest extends \Test\TestCase { * the owner of the file and the one from the user who deleted the file get expired * correctly */ - public function testExpireOldFilesShared() { + public function testExpireOldFilesShared(): void { $currentTime = time(); $folder = 'trashTest-' . $currentTime . '/'; $expiredDate = $currentTime - 3 * 24 * 60 * 60; @@ -316,7 +316,7 @@ class TrashbinTest extends \Test\TestCase { * test expiration of old files in the trash bin until the max size * of the trash bin is met again */ - public function testExpireOldFilesUtilLimitsAreMet() { + public function testExpireOldFilesUtilLimitsAreMet(): void { // create some files \OC\Files\Filesystem::file_put_contents('file1.txt', 'file1'); @@ -349,7 +349,7 @@ class TrashbinTest extends \Test\TestCase { /** * Test restoring a file */ - public function testRestoreFileInRoot() { + public function testRestoreFileInRoot(): void { $userFolder = \OC::$server->getUserFolder(); $file = $userFolder->newFile('file1.txt'); $file->putContent('foo'); @@ -381,7 +381,7 @@ class TrashbinTest extends \Test\TestCase { /** * Test restoring a file in subfolder */ - public function testRestoreFileInSubfolder() { + public function testRestoreFileInSubfolder(): void { $userFolder = \OC::$server->getUserFolder(); $folder = $userFolder->newFolder('folder'); $file = $folder->newFile('file1.txt'); @@ -414,7 +414,7 @@ class TrashbinTest extends \Test\TestCase { /** * Test restoring a folder */ - public function testRestoreFolder() { + public function testRestoreFolder(): void { $userFolder = \OC::$server->getUserFolder(); $folder = $userFolder->newFolder('folder'); $file = $folder->newFile('file1.txt'); @@ -447,7 +447,7 @@ class TrashbinTest extends \Test\TestCase { /** * Test restoring a file from inside a trashed folder */ - public function testRestoreFileFromTrashedSubfolder() { + public function testRestoreFileFromTrashedSubfolder(): void { $userFolder = \OC::$server->getUserFolder(); $folder = $userFolder->newFolder('folder'); $file = $folder->newFile('file1.txt'); @@ -481,7 +481,7 @@ class TrashbinTest extends \Test\TestCase { * Test restoring a file whenever the source folder was removed. * The file should then land in the root. */ - public function testRestoreFileWithMissingSourceFolder() { + public function testRestoreFileWithMissingSourceFolder(): void { $userFolder = \OC::$server->getUserFolder(); $folder = $userFolder->newFolder('folder'); $file = $folder->newFile('file1.txt'); @@ -518,7 +518,7 @@ class TrashbinTest extends \Test\TestCase { * Test restoring a file in the root folder whenever there is another file * with the same name in the root folder */ - public function testRestoreFileDoesNotOverwriteExistingInRoot() { + public function testRestoreFileDoesNotOverwriteExistingInRoot(): void { $userFolder = \OC::$server->getUserFolder(); $file = $userFolder->newFile('file1.txt'); $file->putContent('foo'); @@ -558,7 +558,7 @@ class TrashbinTest extends \Test\TestCase { * Test restoring a file whenever there is another file * with the same name in the source folder */ - public function testRestoreFileDoesNotOverwriteExistingInSubfolder() { + public function testRestoreFileDoesNotOverwriteExistingInSubfolder(): void { $userFolder = \OC::$server->getUserFolder(); $folder = $userFolder->newFolder('folder'); $file = $folder->newFile('file1.txt'); @@ -598,7 +598,7 @@ class TrashbinTest extends \Test\TestCase { /** * Test restoring a non-existing file from trashbin, returns false */ - public function testRestoreUnexistingFile() { + public function testRestoreUnexistingFile(): void { $this->assertFalse( OCA\Files_Trashbin\Trashbin::restore( 'unexist.txt.d123456', @@ -612,7 +612,7 @@ class TrashbinTest extends \Test\TestCase { * Test restoring a file into a read-only folder, will restore * the file to root instead */ - public function testRestoreFileIntoReadOnlySourceFolder() { + public function testRestoreFileIntoReadOnlySourceFolder(): void { $userFolder = \OC::$server->getUserFolder(); $folder = $userFolder->newFolder('folder'); $file = $folder->newFile('file1.txt'); diff --git a/apps/files_versions/tests/Command/CleanupTest.php b/apps/files_versions/tests/Command/CleanupTest.php index cd397e4a098..021a47ed08d 100644 --- a/apps/files_versions/tests/Command/CleanupTest.php +++ b/apps/files_versions/tests/Command/CleanupTest.php @@ -52,7 +52,7 @@ class CleanupTest extends TestCase { * @dataProvider dataTestDeleteVersions * @param boolean $nodeExists */ - public function testDeleteVersions($nodeExists) { + public function testDeleteVersions($nodeExists): void { $this->rootFolder->expects($this->once()) ->method('nodeExists') ->with('/testUser/files_versions') @@ -102,7 +102,7 @@ class CleanupTest extends TestCase { /** * test delete versions from users given as parameter */ - public function testExecuteDeleteListOfUsers() { + public function testExecuteDeleteListOfUsers(): void { $userIds = ['user1', 'user2', 'user3']; $instance = $this->getMockBuilder('OCA\Files_Versions\Command\CleanUp') @@ -133,7 +133,7 @@ class CleanupTest extends TestCase { /** * test delete versions of all users */ - public function testExecuteAllUsers() { + public function testExecuteAllUsers(): void { $userIds = []; $backendUsers = ['user1', 'user2']; diff --git a/apps/files_versions/tests/Command/ExpireTest.php b/apps/files_versions/tests/Command/ExpireTest.php index ac1fc4ada7f..11f4eb2e2be 100644 --- a/apps/files_versions/tests/Command/ExpireTest.php +++ b/apps/files_versions/tests/Command/ExpireTest.php @@ -17,7 +17,7 @@ use Test\TestCase; * @package OCA\Files_Versions\Tests\Command */ class ExpireTest extends TestCase { - public function testExpireNonExistingUser() { + public function testExpireNonExistingUser(): void { $command = new Expire($this->getUniqueID('test'), ''); $command->handle(); diff --git a/apps/files_versions/tests/Controller/PreviewControllerTest.php b/apps/files_versions/tests/Controller/PreviewControllerTest.php index 1673a212f89..9899836bb88 100644 --- a/apps/files_versions/tests/Controller/PreviewControllerTest.php +++ b/apps/files_versions/tests/Controller/PreviewControllerTest.php @@ -71,35 +71,35 @@ class PreviewControllerTest extends TestCase { ); } - public function testInvalidFile() { + public function testInvalidFile(): void { $res = $this->controller->getPreview(''); $expected = new DataResponse([], Http::STATUS_BAD_REQUEST); $this->assertEquals($expected, $res); } - public function testInvalidWidth() { + public function testInvalidWidth(): void { $res = $this->controller->getPreview('file', 0); $expected = new DataResponse([], Http::STATUS_BAD_REQUEST); $this->assertEquals($expected, $res); } - public function testInvalidHeight() { + public function testInvalidHeight(): void { $res = $this->controller->getPreview('file', 10, 0); $expected = new DataResponse([], Http::STATUS_BAD_REQUEST); $this->assertEquals($expected, $res); } - public function testInvalidVersion() { + public function testInvalidVersion(): void { $res = $this->controller->getPreview('file', 10, 0); $expected = new DataResponse([], Http::STATUS_BAD_REQUEST); $this->assertEquals($expected, $res); } - public function testValidPreview() { + public function testValidPreview(): void { $userFolder = $this->createMock(Folder::class); $userRoot = $this->createMock(Folder::class); @@ -136,7 +136,7 @@ class PreviewControllerTest extends TestCase { $this->assertEquals($expected, $res); } - public function testVersionNotFound() { + public function testVersionNotFound(): void { $userFolder = $this->createMock(Folder::class); $userRoot = $this->createMock(Folder::class); diff --git a/apps/files_versions/tests/ExpirationTest.php b/apps/files_versions/tests/ExpirationTest.php index a998d3a3e9a..ac8af7c093a 100644 --- a/apps/files_versions/tests/ExpirationTest.php +++ b/apps/files_versions/tests/ExpirationTest.php @@ -88,7 +88,7 @@ class ExpirationTest extends \Test\TestCase { * @param bool $quotaExceeded * @param string $expectedResult */ - public function testExpiration($retentionObligation, $timeNow, $timestamp, $quotaExceeded, $expectedResult) { + public function testExpiration($retentionObligation, $timeNow, $timestamp, $quotaExceeded, $expectedResult): void { $mockedConfig = $this->getMockedConfig($retentionObligation); $mockedTimeFactory = $this->getMockedTimeFactory($timeNow); $mockedLogger = $this->createMock(LoggerInterface::class); diff --git a/apps/files_versions/tests/StorageTest.php b/apps/files_versions/tests/StorageTest.php index ead125e905c..e085729eddd 100644 --- a/apps/files_versions/tests/StorageTest.php +++ b/apps/files_versions/tests/StorageTest.php @@ -55,7 +55,7 @@ class StorageTest extends TestCase { $file->touch($mtime); } - public function testExpireMaxAge() { + public function testExpireMaxAge(): void { $this->userFolder->newFolder('folder1'); $this->userFolder->newFolder('folder1/sub1'); $this->userFolder->newFolder('folder2'); diff --git a/apps/files_versions/tests/VersioningTest.php b/apps/files_versions/tests/VersioningTest.php index 4b6820750a2..3200b5f784b 100644 --- a/apps/files_versions/tests/VersioningTest.php +++ b/apps/files_versions/tests/VersioningTest.php @@ -123,7 +123,7 @@ class VersioningTest extends \Test\TestCase { * test expire logic * @dataProvider versionsProvider */ - public function testGetExpireList($versions, $sizeOfAllDeletedFiles) { + public function testGetExpireList($versions, $sizeOfAllDeletedFiles): void { // last interval end at 2592000 $startTime = 5000000; @@ -269,7 +269,7 @@ class VersioningTest extends \Test\TestCase { ]; } - public function testRename() { + public function testRename(): void { \OC\Files\Filesystem::file_put_contents('test.txt', 'test file'); $t1 = time(); @@ -298,7 +298,7 @@ class VersioningTest extends \Test\TestCase { $this->assertTrue($this->rootView->file_exists($v2Renamed), 'version 2 of renamed file exists'); } - public function testRenameInSharedFolder() { + public function testRenameInSharedFolder(): void { \OC\Files\Filesystem::mkdir('folder1'); \OC\Files\Filesystem::mkdir('folder1/folder2'); \OC\Files\Filesystem::file_put_contents('folder1/test.txt', 'test file'); @@ -348,7 +348,7 @@ class VersioningTest extends \Test\TestCase { \OC::$server->getShareManager()->deleteShare($share); } - public function testMoveFolder() { + public function testMoveFolder(): void { \OC\Files\Filesystem::mkdir('folder1'); \OC\Files\Filesystem::mkdir('folder2'); \OC\Files\Filesystem::file_put_contents('folder1/test.txt', 'test file'); @@ -381,7 +381,7 @@ class VersioningTest extends \Test\TestCase { } - public function testMoveFileIntoSharedFolderAsRecipient() { + public function testMoveFileIntoSharedFolderAsRecipient(): void { \OC\Files\Filesystem::mkdir('folder1'); $fileInfo = \OC\Files\Filesystem::getFileInfo('folder1'); @@ -431,7 +431,7 @@ class VersioningTest extends \Test\TestCase { \OC::$server->getShareManager()->deleteShare($share); } - public function testMoveFolderIntoSharedFolderAsRecipient() { + public function testMoveFolderIntoSharedFolderAsRecipient(): void { \OC\Files\Filesystem::mkdir('folder1'); $node = \OC::$server->getUserFolder(self::TEST_VERSIONS_USER)->get('folder1'); @@ -482,7 +482,7 @@ class VersioningTest extends \Test\TestCase { \OC::$server->getShareManager()->deleteShare($share); } - public function testRenameSharedFile() { + public function testRenameSharedFile(): void { \OC\Files\Filesystem::file_put_contents('test.txt', 'test file'); $t1 = time(); @@ -531,7 +531,7 @@ class VersioningTest extends \Test\TestCase { \OC::$server->getShareManager()->deleteShare($share); } - public function testCopy() { + public function testCopy(): void { \OC\Files\Filesystem::file_put_contents('test.txt', 'test file'); $t1 = time(); @@ -564,7 +564,7 @@ class VersioningTest extends \Test\TestCase { * test if we find all versions and if the versions array contain * the correct 'path' and 'name' */ - public function testGetVersions() { + public function testGetVersions(): void { $t1 = time(); // second version is two weeks older, this way we make sure that no // version will be expired @@ -597,7 +597,7 @@ class VersioningTest extends \Test\TestCase { * test if we find all versions and if the versions array contain * the correct 'path' and 'name' */ - public function testGetVersionsEmptyFile() { + public function testGetVersionsEmptyFile(): void { // execute copy hook of versions app $versions = \OCA\Files_Versions\Storage::getVersions(self::TEST_VERSIONS_USER, ''); $this->assertCount(0, $versions); @@ -606,7 +606,7 @@ class VersioningTest extends \Test\TestCase { $this->assertCount(0, $versions); } - public function testExpireNonexistingFile() { + public function testExpireNonexistingFile(): void { $this->logout(); // needed to have a FS setup (the background job does this) \OC_Util::setupFS(self::TEST_VERSIONS_USER); @@ -615,7 +615,7 @@ class VersioningTest extends \Test\TestCase { } - public function testExpireNonexistingUser() { + public function testExpireNonexistingUser(): void { $this->expectException(\OC\User\NoUserException::class); $this->logout(); @@ -626,19 +626,19 @@ class VersioningTest extends \Test\TestCase { $this->assertFalse(\OCA\Files_Versions\Storage::expire('test.txt', 'unexist')); } - public function testRestoreSameStorage() { + public function testRestoreSameStorage(): void { \OC\Files\Filesystem::mkdir('sub'); $this->doTestRestore(); } - public function testRestoreCrossStorage() { + public function testRestoreCrossStorage(): void { $storage2 = new Temporary([]); \OC\Files\Filesystem::mount($storage2, [], self::TEST_VERSIONS_USER . '/files/sub'); $this->doTestRestore(); } - public function testRestoreNoPermission() { + public function testRestoreNoPermission(): void { $this->loginAsUser(self::TEST_VERSIONS_USER); $userHome = \OC::$server->getUserFolder(self::TEST_VERSIONS_USER); @@ -673,7 +673,7 @@ class VersioningTest extends \Test\TestCase { $this->assertEquals('test file', $file->getContent(), 'File content has not changed'); } - public function testRestoreMovedShare() { + public function testRestoreMovedShare(): void { $this->markTestSkipped('Unreliable test'); $this->loginAsUser(self::TEST_VERSIONS_USER); @@ -864,7 +864,7 @@ class VersioningTest extends \Test\TestCase { /** * Test whether versions are created when overwriting as owner */ - public function testStoreVersionAsOwner() { + public function testStoreVersionAsOwner(): void { $this->loginAsUser(self::TEST_VERSIONS_USER); $this->createAndCheckVersions( @@ -876,7 +876,7 @@ class VersioningTest extends \Test\TestCase { /** * Test whether versions are created when overwriting as share recipient */ - public function testStoreVersionAsRecipient() { + public function testStoreVersionAsRecipient(): void { $this->loginAsUser(self::TEST_VERSIONS_USER); \OC\Files\Filesystem::mkdir('folder'); @@ -909,7 +909,7 @@ class VersioningTest extends \Test\TestCase { * is logged in. File modification must still be able to find * the owner and create versions. */ - public function testStoreVersionAsAnonymous() { + public function testStoreVersionAsAnonymous(): void { $this->logout(); // note: public link upload does this, diff --git a/apps/files_versions/tests/Versions/VersionManagerTest.php b/apps/files_versions/tests/Versions/VersionManagerTest.php index d621d67a6de..a50781b899d 100644 --- a/apps/files_versions/tests/Versions/VersionManagerTest.php +++ b/apps/files_versions/tests/Versions/VersionManagerTest.php @@ -29,7 +29,7 @@ class VersionManagerTest extends TestCase { ->getMock(); } - public function testGetBackendSingle() { + public function testGetBackendSingle(): void { $manager = new VersionManager(); $backend = $this->getBackend(); $manager->registerBackend(IStorage::class, $backend); @@ -37,7 +37,7 @@ class VersionManagerTest extends TestCase { $this->assertEquals($backend, $manager->getBackendForStorage($this->getStorage(Local::class))); } - public function testGetBackendMoreSpecific() { + public function testGetBackendMoreSpecific(): void { $manager = new VersionManager(); $backend1 = $this->getBackend(); $backend2 = $this->getBackend(); @@ -47,7 +47,7 @@ class VersionManagerTest extends TestCase { $this->assertEquals($backend2, $manager->getBackendForStorage($this->getStorage(Local::class))); } - public function testGetBackendNoUse() { + public function testGetBackendNoUse(): void { $manager = new VersionManager(); $backend1 = $this->getBackend(); $backend2 = $this->getBackend(false); @@ -57,7 +57,7 @@ class VersionManagerTest extends TestCase { $this->assertEquals($backend1, $manager->getBackendForStorage($this->getStorage(Local::class))); } - public function testGetBackendMultiple() { + public function testGetBackendMultiple(): void { $manager = new VersionManager(); $backend1 = $this->getBackend(); $backend2 = $this->getBackend(false); diff --git a/apps/oauth2/l10n/de.js b/apps/oauth2/l10n/de.js index 9f860436ebd..27b2b6e3c94 100644 --- a/apps/oauth2/l10n/de.js +++ b/apps/oauth2/l10n/de.js @@ -13,6 +13,7 @@ OC.L10N.register( "Client Identifier" : "Client-Identifikationsmerkmal", "Secret key" : "Geheimer Schlüssel", "Delete client" : "Client löschen", + "Make sure you store the secret key, it cannot be recovered." : "Bewahre den geheimen Schlüssel unbedingt auf, er kann nicht wiederhergestellt werden.", "Add client" : "Client hinzufügen", "Add" : "Hinzufügen", "Delete" : " Löschen", diff --git a/apps/oauth2/l10n/de.json b/apps/oauth2/l10n/de.json index 48b35485a91..684de5de26d 100644 --- a/apps/oauth2/l10n/de.json +++ b/apps/oauth2/l10n/de.json @@ -11,6 +11,7 @@ "Client Identifier" : "Client-Identifikationsmerkmal", "Secret key" : "Geheimer Schlüssel", "Delete client" : "Client löschen", + "Make sure you store the secret key, it cannot be recovered." : "Bewahre den geheimen Schlüssel unbedingt auf, er kann nicht wiederhergestellt werden.", "Add client" : "Client hinzufügen", "Add" : "Hinzufügen", "Delete" : " Löschen", diff --git a/apps/oauth2/tests/Controller/LoginRedirectorControllerTest.php b/apps/oauth2/tests/Controller/LoginRedirectorControllerTest.php index eb8e47a102f..30806854574 100644 --- a/apps/oauth2/tests/Controller/LoginRedirectorControllerTest.php +++ b/apps/oauth2/tests/Controller/LoginRedirectorControllerTest.php @@ -53,7 +53,7 @@ class LoginRedirectorControllerTest extends TestCase { ); } - public function testAuthorize() { + public function testAuthorize(): void { $client = new Client(); $client->setClientIdentifier('MyClientIdentifier'); $this->clientMapper @@ -80,7 +80,7 @@ class LoginRedirectorControllerTest extends TestCase { $this->assertEquals($expected, $this->loginRedirectorController->authorize('MyClientId', 'MyState', 'code')); } - public function testAuthorizeWrongResponseType() { + public function testAuthorizeWrongResponseType(): void { $client = new Client(); $client->setClientIdentifier('MyClientIdentifier'); $client->setRedirectUri('http://foo.bar'); @@ -98,7 +98,7 @@ class LoginRedirectorControllerTest extends TestCase { $this->assertEquals($expected, $this->loginRedirectorController->authorize('MyClientId', 'MyState', 'wrongcode')); } - public function testClientNotFound() { + public function testClientNotFound(): void { $clientNotFound = new ClientNotFoundException('could not find client test123', 0); $this->clientMapper ->expects($this->once()) diff --git a/apps/oauth2/tests/Controller/OauthApiControllerTest.php b/apps/oauth2/tests/Controller/OauthApiControllerTest.php index 803bdce16b1..fa8c90843e6 100644 --- a/apps/oauth2/tests/Controller/OauthApiControllerTest.php +++ b/apps/oauth2/tests/Controller/OauthApiControllerTest.php @@ -84,7 +84,7 @@ class OauthApiControllerTest extends TestCase { ); } - public function testGetTokenInvalidGrantType() { + public function testGetTokenInvalidGrantType(): void { $expected = new JSONResponse([ 'error' => 'invalid_grant', ], Http::STATUS_BAD_REQUEST); @@ -93,7 +93,7 @@ class OauthApiControllerTest extends TestCase { $this->assertEquals($expected, $this->oauthApiController->getToken('foo', null, null, null, null)); } - public function testGetTokenInvalidCode() { + public function testGetTokenInvalidCode(): void { $expected = new JSONResponse([ 'error' => 'invalid_request', ], Http::STATUS_BAD_REQUEST); @@ -106,7 +106,7 @@ class OauthApiControllerTest extends TestCase { $this->assertEquals($expected, $this->oauthApiController->getToken('authorization_code', 'invalidcode', null, null, null)); } - public function testGetTokenExpiredCode() { + public function testGetTokenExpiredCode(): void { $codeCreatedAt = 100; $expiredSince = 123; @@ -131,7 +131,7 @@ class OauthApiControllerTest extends TestCase { $this->assertEquals($expected, $this->oauthApiController->getToken('authorization_code', 'validcode', null, null, null)); } - public function testGetTokenWithCodeForActiveToken() { + public function testGetTokenWithCodeForActiveToken(): void { // if a token has already delivered oauth tokens, // it should not be possible to get a new oauth token from a valid authorization code $codeCreatedAt = 100; @@ -158,7 +158,7 @@ class OauthApiControllerTest extends TestCase { $this->assertEquals($expected, $this->oauthApiController->getToken('authorization_code', 'validcode', null, null, null)); } - public function testGetTokenClientDoesNotExist() { + public function testGetTokenClientDoesNotExist(): void { // In this test, the token's authorization code is valid and has not expired // and we check what happens when the associated Oauth client does not exist $codeCreatedAt = 100; @@ -189,7 +189,7 @@ class OauthApiControllerTest extends TestCase { $this->assertEquals($expected, $this->oauthApiController->getToken('authorization_code', 'validcode', null, null, null)); } - public function testRefreshTokenInvalidRefreshToken() { + public function testRefreshTokenInvalidRefreshToken(): void { $expected = new JSONResponse([ 'error' => 'invalid_request', ], Http::STATUS_BAD_REQUEST); @@ -202,7 +202,7 @@ class OauthApiControllerTest extends TestCase { $this->assertEquals($expected, $this->oauthApiController->getToken('refresh_token', null, 'invalidrefresh', null, null)); } - public function testRefreshTokenClientDoesNotExist() { + public function testRefreshTokenClientDoesNotExist(): void { $expected = new JSONResponse([ 'error' => 'invalid_request', ], Http::STATUS_BAD_REQUEST); @@ -236,7 +236,7 @@ class OauthApiControllerTest extends TestCase { * @param string $clientId * @param string $clientSecret */ - public function testRefreshTokenInvalidClient($clientId, $clientSecret) { + public function testRefreshTokenInvalidClient($clientId, $clientSecret): void { $expected = new JSONResponse([ 'error' => 'invalid_client', ], Http::STATUS_BAD_REQUEST); @@ -270,7 +270,7 @@ class OauthApiControllerTest extends TestCase { $this->assertEquals($expected, $this->oauthApiController->getToken('refresh_token', null, 'validrefresh', $clientId, $clientSecret)); } - public function testRefreshTokenInvalidAppToken() { + public function testRefreshTokenInvalidAppToken(): void { $expected = new JSONResponse([ 'error' => 'invalid_request', ], Http::STATUS_BAD_REQUEST); @@ -313,7 +313,7 @@ class OauthApiControllerTest extends TestCase { $this->assertEquals($expected, $this->oauthApiController->getToken('refresh_token', null, 'validrefresh', 'clientId', 'clientSecret')); } - public function testRefreshTokenValidAppToken() { + public function testRefreshTokenValidAppToken(): void { $accessToken = new AccessToken(); $accessToken->setClientId(42); $accessToken->setTokenId(1337); @@ -409,7 +409,7 @@ class OauthApiControllerTest extends TestCase { $this->assertEquals($expected, $this->oauthApiController->getToken('refresh_token', null, 'validrefresh', 'clientId', 'clientSecret')); } - public function testRefreshTokenValidAppTokenBasicAuth() { + public function testRefreshTokenValidAppTokenBasicAuth(): void { $accessToken = new AccessToken(); $accessToken->setClientId(42); $accessToken->setTokenId(1337); @@ -508,7 +508,7 @@ class OauthApiControllerTest extends TestCase { $this->assertEquals($expected, $this->oauthApiController->getToken('refresh_token', null, 'validrefresh', null, null)); } - public function testRefreshTokenExpiredAppToken() { + public function testRefreshTokenExpiredAppToken(): void { $accessToken = new AccessToken(); $accessToken->setClientId(42); $accessToken->setTokenId(1337); diff --git a/apps/oauth2/tests/Controller/SettingsControllerTest.php b/apps/oauth2/tests/Controller/SettingsControllerTest.php index 1f93a272ee7..0ea23439b89 100644 --- a/apps/oauth2/tests/Controller/SettingsControllerTest.php +++ b/apps/oauth2/tests/Controller/SettingsControllerTest.php @@ -70,7 +70,7 @@ class SettingsControllerTest extends TestCase { } - public function testAddClient() { + public function testAddClient(): void { $this->secureRandom ->expects($this->exactly(2)) ->method('generate') @@ -117,7 +117,7 @@ class SettingsControllerTest extends TestCase { ], $data); } - public function testDeleteClient() { + public function testDeleteClient(): void { $userManager = \OC::$server->getUserManager(); // count other users in the db before adding our own @@ -177,7 +177,7 @@ class SettingsControllerTest extends TestCase { $user1->delete(); } - public function testInvalidRedirectUri() { + public function testInvalidRedirectUri(): void { $result = $this->settingsController->addClient('test', 'invalidurl'); $this->assertEquals(Http::STATUS_BAD_REQUEST, $result->getStatus()); diff --git a/apps/oauth2/tests/Db/AccessTokenMapperTest.php b/apps/oauth2/tests/Db/AccessTokenMapperTest.php index a248c1e0d38..5bb069248f3 100644 --- a/apps/oauth2/tests/Db/AccessTokenMapperTest.php +++ b/apps/oauth2/tests/Db/AccessTokenMapperTest.php @@ -22,7 +22,7 @@ class AccessTokenMapperTest extends TestCase { $this->accessTokenMapper = new AccessTokenMapper(\OC::$server->getDatabaseConnection(), \OC::$server->get(ITimeFactory::class)); } - public function testGetByCode() { + public function testGetByCode(): void { $this->accessTokenMapper->deleteByClientId(1234); $token = new AccessToken(); $token->setClientId(1234); @@ -38,7 +38,7 @@ class AccessTokenMapperTest extends TestCase { } - public function testDeleteByClientId() { + public function testDeleteByClientId(): void { $this->expectException(\OCA\OAuth2\Exceptions\AccessTokenNotFoundException::class); $this->accessTokenMapper->deleteByClientId(1234); diff --git a/apps/oauth2/tests/Db/ClientMapperTest.php b/apps/oauth2/tests/Db/ClientMapperTest.php index 3d8b25acbef..8c00c2e0a21 100644 --- a/apps/oauth2/tests/Db/ClientMapperTest.php +++ b/apps/oauth2/tests/Db/ClientMapperTest.php @@ -28,7 +28,7 @@ class ClientMapperTest extends TestCase { parent::tearDown(); } - public function testGetByIdentifier() { + public function testGetByIdentifier(): void { $client = new Client(); $client->setClientIdentifier('MyAwesomeClientIdentifier'); $client->setName('Client Name'); @@ -39,13 +39,13 @@ class ClientMapperTest extends TestCase { $this->assertEquals($client, $this->clientMapper->getByIdentifier('MyAwesomeClientIdentifier')); } - public function testGetByIdentifierNotExisting() { + public function testGetByIdentifierNotExisting(): void { $this->expectException(\OCA\OAuth2\Exceptions\ClientNotFoundException::class); $this->clientMapper->getByIdentifier('MyTotallyNotExistingClient'); } - public function testGetByUid() { + public function testGetByUid(): void { $client = new Client(); $client->setClientIdentifier('MyNewClient'); $client->setName('Client Name'); @@ -56,13 +56,13 @@ class ClientMapperTest extends TestCase { $this->assertEquals($client, $this->clientMapper->getByUid($client->getId())); } - public function testGetByUidNotExisting() { + public function testGetByUidNotExisting(): void { $this->expectException(\OCA\OAuth2\Exceptions\ClientNotFoundException::class); $this->clientMapper->getByUid(1234); } - public function testGetClients() { + public function testGetClients(): void { $this->assertSame('array', gettype($this->clientMapper->getClients())); } diff --git a/apps/oauth2/tests/Settings/AdminTest.php b/apps/oauth2/tests/Settings/AdminTest.php index 9cbefb74671..ca9100669df 100644 --- a/apps/oauth2/tests/Settings/AdminTest.php +++ b/apps/oauth2/tests/Settings/AdminTest.php @@ -39,7 +39,7 @@ class AdminTest extends TestCase { ); } - public function testGetForm() { + public function testGetForm(): void { $expected = new TemplateResponse( 'oauth2', 'admin', @@ -49,11 +49,11 @@ class AdminTest extends TestCase { $this->assertEquals($expected, $this->admin->getForm()); } - public function testGetSection() { + public function testGetSection(): void { $this->assertSame('security', $this->admin->getSection()); } - public function testGetPriority() { + public function testGetPriority(): void { $this->assertSame(100, $this->admin->getPriority()); } } diff --git a/apps/provisioning_api/lib/Controller/AppConfigController.php b/apps/provisioning_api/lib/Controller/AppConfigController.php index 5061a0ffc8f..bb161f6cb8c 100644 --- a/apps/provisioning_api/lib/Controller/AppConfigController.php +++ b/apps/provisioning_api/lib/Controller/AppConfigController.php @@ -10,6 +10,7 @@ namespace OCA\Provisioning_API\Controller; use OC\AppConfig; use OC\AppFramework\Middleware\Security\Exceptions\NotAdminException; +use OCP\App\IAppManager; use OCP\AppFramework\Http; use OCP\AppFramework\Http\Attribute\NoAdminRequired; use OCP\AppFramework\Http\Attribute\PasswordConfirmationRequired; @@ -35,6 +36,7 @@ class AppConfigController extends OCSController { private IL10N $l10n, private IGroupManager $groupManager, private IManager $settingManager, + private IAppManager $appManager, ) { parent::__construct($appName, $request); } @@ -171,11 +173,10 @@ class AppConfigController extends OCSController { } /** - * @param string $app * @throws \InvalidArgumentException */ - protected function verifyAppId(string $app) { - if (\OC_App::cleanAppId($app) !== $app) { + protected function verifyAppId(string $app): void { + if ($this->appManager->cleanAppId($app) !== $app) { throw new \InvalidArgumentException('Invalid app id given'); } } diff --git a/apps/provisioning_api/tests/CapabilitiesTest.php b/apps/provisioning_api/tests/CapabilitiesTest.php index 8b4215063b7..e3c14f37ed7 100644 --- a/apps/provisioning_api/tests/CapabilitiesTest.php +++ b/apps/provisioning_api/tests/CapabilitiesTest.php @@ -52,7 +52,7 @@ class CapabilitiesTest extends TestCase { /** * @dataProvider getCapabilitiesProvider */ - public function testGetCapabilities($federationAppEnabled, $federatedFileSharingAppEnabled, $lookupServerEnabled, $expectedFederatedScopeEnabled, $expectedPublishedScopeEnabled) { + public function testGetCapabilities($federationAppEnabled, $federatedFileSharingAppEnabled, $lookupServerEnabled, $expectedFederatedScopeEnabled, $expectedPublishedScopeEnabled): void { $this->appManager->expects($this->any()) ->method('isEnabledForUser') ->will($this->returnValueMap([ diff --git a/apps/provisioning_api/tests/Controller/AppConfigControllerTest.php b/apps/provisioning_api/tests/Controller/AppConfigControllerTest.php index 0bdee39cebc..f878b6b73d0 100644 --- a/apps/provisioning_api/tests/Controller/AppConfigControllerTest.php +++ b/apps/provisioning_api/tests/Controller/AppConfigControllerTest.php @@ -7,6 +7,7 @@ namespace OCA\Provisioning_API\Tests\Controller; use OC\AppConfig; use OCA\Provisioning_API\Controller\AppConfigController; +use OCP\App\IAppManager; use OCP\AppFramework\Http; use OCP\AppFramework\Http\DataResponse; use OCP\Exceptions\AppConfigUnknownKeyException; @@ -17,6 +18,7 @@ use OCP\IRequest; use OCP\IUser; use OCP\IUserSession; use OCP\Settings\IManager; +use PHPUnit\Framework\MockObject\MockObject; use Test\TestCase; use function json_decode; use function json_encode; @@ -28,16 +30,12 @@ use function json_encode; */ class AppConfigControllerTest extends TestCase { - /** @var IAppConfig|\PHPUnit\Framework\MockObject\MockObject */ - private $appConfig; - /** @var IUserSession|\PHPUnit\Framework\MockObject\MockObject */ - private $userSession; - /** @var IL10N|\PHPUnit\Framework\MockObject\MockObject */ - private $l10n; - /** @var IManager|\PHPUnit\Framework\MockObject\MockObject */ - private $settingManager; - /** @var IGroupManager|\PHPUnit\Framework\MockObject\MockObject */ - private $groupManager; + private IAppConfig&MockObject $appConfig; + private IUserSession&MockObject $userSession; + private IL10N&MockObject $l10n; + private IManager&MockObject $settingManager; + private IGroupManager&MockObject $groupManager; + private IAppManager $appManager; protected function setUp(): void { parent::setUp(); @@ -45,8 +43,9 @@ class AppConfigControllerTest extends TestCase { $this->appConfig = $this->createMock(AppConfig::class); $this->userSession = $this->createMock(IUserSession::class); $this->l10n = $this->createMock(IL10N::class); - $this->groupManager = $this->createMock(IGroupManager::class); $this->settingManager = $this->createMock(IManager::class); + $this->groupManager = $this->createMock(IGroupManager::class); + $this->appManager = \OCP\Server::get(IAppManager::class); } /** @@ -64,7 +63,8 @@ class AppConfigControllerTest extends TestCase { $this->userSession, $this->l10n, $this->groupManager, - $this->settingManager + $this->settingManager, + $this->appManager, ); } else { return $this->getMockBuilder(AppConfigController::class) @@ -75,14 +75,15 @@ class AppConfigControllerTest extends TestCase { $this->userSession, $this->l10n, $this->groupManager, - $this->settingManager + $this->settingManager, + $this->appManager, ]) ->setMethods($methods) ->getMock(); } } - public function testGetApps() { + public function testGetApps(): void { $this->appConfig->expects($this->once()) ->method('getApps') ->willReturn(['apps']); @@ -107,7 +108,7 @@ class AppConfigControllerTest extends TestCase { * @param \Exception|null $throws * @param int $status */ - public function testGetKeys($app, $keys, $throws, $status) { + public function testGetKeys($app, $keys, $throws, $status): void { $api = $this->getInstance(['verifyAppId']); if ($throws instanceof \Exception) { $api->expects($this->once()) @@ -154,7 +155,7 @@ class AppConfigControllerTest extends TestCase { * @param \Exception|null $throws * @param int $status */ - public function testGetValue($app, $key, $default, $return, $throws, $status) { + public function testGetValue($app, $key, $default, $return, $throws, $status): void { $api = $this->getInstance(['verifyAppId']); if ($throws instanceof \Exception) { $api->expects($this->once()) @@ -206,7 +207,7 @@ class AppConfigControllerTest extends TestCase { * @param \Exception|null $keyThrows * @param int|\Throwable $status */ - public function testSetValue($app, $key, $value, $appThrows, $keyThrows, $status, int|\Throwable $type = IAppConfig::VALUE_MIXED) { + public function testSetValue($app, $key, $value, $appThrows, $keyThrows, $status, int|\Throwable $type = IAppConfig::VALUE_MIXED): void { $adminUser = $this->createMock(IUser::class); $adminUser->expects($this->once()) ->method('getUid') @@ -311,7 +312,7 @@ class AppConfigControllerTest extends TestCase { * @param \Exception|null $keyThrows * @param int $status */ - public function testDeleteValue($app, $key, $appThrows, $keyThrows, $status) { + public function testDeleteValue($app, $key, $appThrows, $keyThrows, $status): void { $api = $this->getInstance(['verifyAppId', 'verifyConfigKey']); if ($appThrows instanceof \Exception) { $api->expects($this->once()) @@ -359,7 +360,7 @@ class AppConfigControllerTest extends TestCase { } } - public function testVerifyAppId() { + public function testVerifyAppId(): void { $api = $this->getInstance(); $this->invokePrivate($api, 'verifyAppId', ['activity']); $this->addToAssertionCount(1); @@ -378,7 +379,7 @@ class AppConfigControllerTest extends TestCase { * @dataProvider dataVerifyAppIdThrows * @param string $app */ - public function testVerifyAppIdThrows($app) { + public function testVerifyAppIdThrows($app): void { $this->expectException(\InvalidArgumentException::class); $api = $this->getInstance(); @@ -400,7 +401,7 @@ class AppConfigControllerTest extends TestCase { * @param string $key * @param string $value */ - public function testVerifyConfigKey($app, $key, $value) { + public function testVerifyConfigKey($app, $key, $value): void { $api = $this->getInstance(); $this->invokePrivate($api, 'verifyConfigKey', [$app, $key, $value]); $this->addToAssertionCount(1); @@ -426,7 +427,7 @@ class AppConfigControllerTest extends TestCase { * @param string $key * @param string $value */ - public function testVerifyConfigKeyThrows($app, $key, $value) { + public function testVerifyConfigKeyThrows($app, $key, $value): void { $this->expectException(\InvalidArgumentException::class); $api = $this->getInstance(); diff --git a/apps/provisioning_api/tests/Controller/AppsControllerTest.php b/apps/provisioning_api/tests/Controller/AppsControllerTest.php index b59433b365f..9c815a52178 100644 --- a/apps/provisioning_api/tests/Controller/AppsControllerTest.php +++ b/apps/provisioning_api/tests/Controller/AppsControllerTest.php @@ -49,21 +49,21 @@ class AppsControllerTest extends \OCA\Provisioning_API\Tests\TestCase { $this->userSession->setUser(null); } - public function testGetAppInfo() { + public function testGetAppInfo(): void { $result = $this->api->getAppInfo('provisioning_api'); $expected = $this->appManager->getAppInfo('provisioning_api'); $this->assertEquals($expected, $result->getData()); } - public function testGetAppInfoOnBadAppID() { + public function testGetAppInfoOnBadAppID(): void { $this->expectException(\OCP\AppFramework\OCS\OCSException::class); $this->expectExceptionCode(998); $this->api->getAppInfo('not_provisioning_api'); } - public function testGetApps() { + public function testGetApps(): void { $user = $this->generateUsers(); $this->groupManager->get('admin')->addUser($user); $this->userSession->setUser($user); @@ -74,13 +74,13 @@ class AppsControllerTest extends \OCA\Provisioning_API\Tests\TestCase { $this->assertEquals(count((new \OC_App())->listAllApps()), count($data['apps'])); } - public function testGetAppsEnabled() { + public function testGetAppsEnabled(): void { $result = $this->api->getApps('enabled'); $data = $result->getData(); $this->assertEquals(count(\OC_App::getEnabledApps()), count($data['apps'])); } - public function testGetAppsDisabled() { + public function testGetAppsDisabled(): void { $result = $this->api->getApps('disabled'); $data = $result->getData(); $apps = (new \OC_App)->listAllApps(); @@ -93,7 +93,7 @@ class AppsControllerTest extends \OCA\Provisioning_API\Tests\TestCase { } - public function testGetAppsInvalidFilter() { + public function testGetAppsInvalidFilter(): void { $this->expectException(\OCP\AppFramework\OCS\OCSException::class); $this->expectExceptionCode(101); diff --git a/apps/provisioning_api/tests/Controller/GroupsControllerTest.php b/apps/provisioning_api/tests/Controller/GroupsControllerTest.php index f0f38bcac9b..8bbc8a29c29 100644 --- a/apps/provisioning_api/tests/Controller/GroupsControllerTest.php +++ b/apps/provisioning_api/tests/Controller/GroupsControllerTest.php @@ -175,7 +175,7 @@ class GroupsControllerTest extends \Test\TestCase { * @param int|null $limit * @param int|null $offset */ - public function testGetGroups($search, $limit, $offset) { + public function testGetGroups($search, $limit, $offset): void { $groups = [$this->createGroup('group1'), $this->createGroup('group2')]; $search = $search === null ? '' : $search; @@ -197,7 +197,7 @@ class GroupsControllerTest extends \Test\TestCase { * @param int|null $limit * @param int|null $offset */ - public function testGetGroupsDetails($search, $limit, $offset) { + public function testGetGroupsDetails($search, $limit, $offset): void { $groups = [$this->createGroup('group1'), $this->createGroup('group2')]; $search = $search === null ? '' : $search; @@ -229,7 +229,7 @@ class GroupsControllerTest extends \Test\TestCase { ]], $result->getData()); } - public function testGetGroupAsSubadmin() { + public function testGetGroupAsSubadmin(): void { $group = $this->createGroup('group'); $this->asSubAdminOfGroup($group); @@ -254,7 +254,7 @@ class GroupsControllerTest extends \Test\TestCase { } - public function testGetGroupAsIrrelevantSubadmin() { + public function testGetGroupAsIrrelevantSubadmin(): void { $this->expectException(\OCP\AppFramework\OCS\OCSException::class); $this->expectExceptionCode(403); @@ -274,7 +274,7 @@ class GroupsControllerTest extends \Test\TestCase { $this->api->getGroup('group'); } - public function testGetGroupAsAdmin() { + public function testGetGroupAsAdmin(): void { $group = $this->createGroup('group'); $this->asAdmin(); @@ -299,7 +299,7 @@ class GroupsControllerTest extends \Test\TestCase { } - public function testGetGroupNonExisting() { + public function testGetGroupNonExisting(): void { $this->expectException(\OCP\AppFramework\OCS\OCSException::class); $this->expectExceptionMessage('The requested group could not be found'); $this->expectExceptionCode(404); @@ -310,7 +310,7 @@ class GroupsControllerTest extends \Test\TestCase { } - public function testGetSubAdminsOfGroupsNotExists() { + public function testGetSubAdminsOfGroupsNotExists(): void { $this->expectException(\OCP\AppFramework\OCS\OCSException::class); $this->expectExceptionMessage('Group does not exist'); $this->expectExceptionCode(101); @@ -318,7 +318,7 @@ class GroupsControllerTest extends \Test\TestCase { $this->api->getSubAdminsOfGroup('NonExistingGroup'); } - public function testGetSubAdminsOfGroup() { + public function testGetSubAdminsOfGroup(): void { $group = $this->createGroup('GroupWithSubAdmins'); $this->groupManager ->method('get') @@ -338,7 +338,7 @@ class GroupsControllerTest extends \Test\TestCase { $this->assertEquals(['SubAdmin1', 'SubAdmin2'], $result->getData()); } - public function testGetSubAdminsOfGroupEmptyList() { + public function testGetSubAdminsOfGroupEmptyList(): void { $group = $this->createGroup('GroupWithOutSubAdmins'); $this->groupManager ->method('get') @@ -357,7 +357,7 @@ class GroupsControllerTest extends \Test\TestCase { } - public function testAddGroupEmptyGroup() { + public function testAddGroupEmptyGroup(): void { $this->expectException(\OCP\AppFramework\OCS\OCSException::class); $this->expectExceptionMessage('Invalid group name'); $this->expectExceptionCode(101); @@ -366,7 +366,7 @@ class GroupsControllerTest extends \Test\TestCase { } - public function testAddGroupExistingGroup() { + public function testAddGroupExistingGroup(): void { $this->expectException(\OCP\AppFramework\OCS\OCSException::class); $this->expectExceptionCode(102); @@ -378,7 +378,7 @@ class GroupsControllerTest extends \Test\TestCase { $this->api->addGroup('ExistingGroup'); } - public function testAddGroup() { + public function testAddGroup(): void { $this->groupManager ->method('groupExists') ->with('NewGroup') @@ -394,7 +394,7 @@ class GroupsControllerTest extends \Test\TestCase { $this->api->addGroup('NewGroup'); } - public function testAddGroupWithSpecialChar() { + public function testAddGroupWithSpecialChar(): void { $this->groupManager ->method('groupExists') ->with('Iñtërnâtiônàlizætiøn') @@ -411,7 +411,7 @@ class GroupsControllerTest extends \Test\TestCase { } - public function testDeleteGroupNonExisting() { + public function testDeleteGroupNonExisting(): void { $this->expectException(\OCP\AppFramework\OCS\OCSException::class); $this->expectExceptionCode(101); @@ -419,7 +419,7 @@ class GroupsControllerTest extends \Test\TestCase { } - public function testDeleteAdminGroup() { + public function testDeleteAdminGroup(): void { $this->expectException(\OCP\AppFramework\OCS\OCSException::class); $this->expectExceptionCode(102); @@ -431,7 +431,7 @@ class GroupsControllerTest extends \Test\TestCase { $this->api->deleteGroup('admin'); } - public function testDeleteGroup() { + public function testDeleteGroup(): void { $this->groupManager ->method('groupExists') ->with('ExistingGroup') @@ -450,7 +450,7 @@ class GroupsControllerTest extends \Test\TestCase { $this->api->deleteGroup('ExistingGroup'); } - public function testDeleteGroupEncoding() { + public function testDeleteGroupEncoding(): void { $this->groupManager ->method('groupExists') ->with('ExistingGroup A/B') @@ -469,7 +469,7 @@ class GroupsControllerTest extends \Test\TestCase { $this->api->deleteGroup(urlencode('ExistingGroup A/B')); } - public function testGetGroupUsersDetails() { + public function testGetGroupUsersDetails(): void { $gid = 'ncg1'; $this->asAdmin(); @@ -514,7 +514,7 @@ class GroupsControllerTest extends \Test\TestCase { $this->api->getGroupUsersDetails($gid); } - public function testGetGroupUsersDetailsEncoded() { + public function testGetGroupUsersDetailsEncoded(): void { $gid = 'Department A/B C/D'; $this->asAdmin(); diff --git a/apps/provisioning_api/tests/Controller/UsersControllerTest.php b/apps/provisioning_api/tests/Controller/UsersControllerTest.php index d2b0a3a4c38..0f82fc53ba6 100644 --- a/apps/provisioning_api/tests/Controller/UsersControllerTest.php +++ b/apps/provisioning_api/tests/Controller/UsersControllerTest.php @@ -122,7 +122,7 @@ class UsersControllerTest extends TestCase { ->getMock(); } - public function testGetUsersAsAdmin() { + public function testGetUsersAsAdmin(): void { $loggedInUser = $this->getMockBuilder(IUser::class) ->disableOriginalConstructor() ->getMock(); @@ -154,7 +154,7 @@ class UsersControllerTest extends TestCase { $this->assertEquals($expected, $this->api->getUsers('MyCustomSearch')->getData()); } - public function testGetUsersAsSubAdmin() { + public function testGetUsersAsSubAdmin(): void { $loggedInUser = $this->getMockBuilder(IUser::class) ->disableOriginalConstructor() ->getMock(); @@ -215,7 +215,7 @@ class UsersControllerTest extends TestCase { } - public function testAddUserAlreadyExisting() { + public function testAddUserAlreadyExisting(): void { $this->expectException(\OCP\AppFramework\OCS\OCSException::class); $this->expectExceptionCode(102); @@ -249,7 +249,7 @@ class UsersControllerTest extends TestCase { } - public function testAddUserNonExistingGroup() { + public function testAddUserNonExistingGroup(): void { $this->expectException(\OCP\AppFramework\OCS\OCSException::class); $this->expectExceptionMessage('Group NonExistingGroup does not exist'); $this->expectExceptionCode(104); @@ -285,7 +285,7 @@ class UsersControllerTest extends TestCase { } - public function testAddUserExistingGroupNonExistingGroup() { + public function testAddUserExistingGroupNonExistingGroup(): void { $this->expectException(\OCP\AppFramework\OCS\OCSException::class); $this->expectExceptionMessage('Group NonExistingGroup does not exist'); $this->expectExceptionCode(104); @@ -326,7 +326,7 @@ class UsersControllerTest extends TestCase { $this->api->addUser('NewUser', 'pass', '', '', ['ExistingGroup', 'NonExistingGroup']); } - public function testAddUserSuccessful() { + public function testAddUserSuccessful(): void { $this->userManager ->expects($this->once()) ->method('userExists') @@ -363,7 +363,7 @@ class UsersControllerTest extends TestCase { )); } - public function testAddUserSuccessfulWithDisplayName() { + public function testAddUserSuccessfulWithDisplayName(): void { /** * @var UserController */ @@ -429,7 +429,7 @@ class UsersControllerTest extends TestCase { )); } - public function testAddUserSuccessfulGenerateUserID() { + public function testAddUserSuccessfulGenerateUserID(): void { $this->config ->expects($this->any()) ->method('getAppValue') @@ -481,7 +481,7 @@ class UsersControllerTest extends TestCase { )); } - public function testAddUserSuccessfulGeneratePassword() { + public function testAddUserSuccessfulGeneratePassword(): void { $this->userManager ->expects($this->once()) ->method('userExists') @@ -526,7 +526,7 @@ class UsersControllerTest extends TestCase { } - public function testAddUserFailedToGenerateUserID() { + public function testAddUserFailedToGenerateUserID(): void { $this->expectException(\OCP\AppFramework\OCS\OCSException::class); $this->expectExceptionMessage('Could not create non-existing user ID'); $this->expectExceptionCode(111); @@ -569,7 +569,7 @@ class UsersControllerTest extends TestCase { } - public function testAddUserEmailRequired() { + public function testAddUserEmailRequired(): void { $this->expectException(\OCP\AppFramework\OCS\OCSException::class); $this->expectExceptionMessage('Required email address was not provided'); $this->expectExceptionCode(110); @@ -614,7 +614,7 @@ class UsersControllerTest extends TestCase { )); } - public function testAddUserExistingGroup() { + public function testAddUserExistingGroup(): void { $this->userManager ->expects($this->once()) ->method('userExists') @@ -676,7 +676,7 @@ class UsersControllerTest extends TestCase { } - public function testAddUserUnsuccessful() { + public function testAddUserUnsuccessful(): void { $this->expectException(\OCP\AppFramework\OCS\OCSException::class); $this->expectExceptionMessage('Bad request'); $this->expectExceptionCode(101); @@ -723,7 +723,7 @@ class UsersControllerTest extends TestCase { } - public function testAddUserAsSubAdminNoGroup() { + public function testAddUserAsSubAdminNoGroup(): void { $this->expectException(\OCP\AppFramework\OCS\OCSException::class); $this->expectExceptionMessage('No group specified (required for sub-admins)'); $this->expectExceptionCode(106); @@ -756,7 +756,7 @@ class UsersControllerTest extends TestCase { } - public function testAddUserAsSubAdminValidGroupNotSubAdmin() { + public function testAddUserAsSubAdminValidGroupNotSubAdmin(): void { $this->expectException(\OCP\AppFramework\OCS\OCSException::class); $this->expectExceptionMessage('Insufficient privileges for group ExistingGroup'); $this->expectExceptionCode(105); @@ -804,7 +804,7 @@ class UsersControllerTest extends TestCase { $this->api->addUser('NewUser', 'PasswordOfTheNewUser', '', '', ['ExistingGroup'])->getData(); } - public function testAddUserAsSubAdminExistingGroups() { + public function testAddUserAsSubAdminExistingGroups(): void { $this->userManager ->expects($this->once()) ->method('userExists') @@ -899,7 +899,7 @@ class UsersControllerTest extends TestCase { } - public function testGetUserTargetDoesNotExist() { + public function testGetUserTargetDoesNotExist(): void { $this->expectException(\OCP\AppFramework\OCS\OCSException::class); $this->expectExceptionMessage('User does not exist'); $this->expectExceptionCode(404); @@ -919,7 +919,7 @@ class UsersControllerTest extends TestCase { $this->api->getUser('UserToGet'); } - public function testGetUserDataAsAdmin() { + public function testGetUserDataAsAdmin(): void { $group0 = $this->createMock(IGroup::class); $group1 = $this->createMock(IGroup::class); $group2 = $this->createMock(IGroup::class); @@ -1072,7 +1072,7 @@ class UsersControllerTest extends TestCase { $this->assertEquals($expected, $this->invokePrivate($this->api, 'getUserData', ['UID'])); } - public function testGetUserDataAsSubAdminAndUserIsAccessible() { + public function testGetUserDataAsSubAdminAndUserIsAccessible(): void { $loggedInUser = $this->getMockBuilder(IUser::class) ->disableOriginalConstructor() ->getMock(); @@ -1215,7 +1215,7 @@ class UsersControllerTest extends TestCase { - public function testGetUserDataAsSubAdminAndUserIsNotAccessible() { + public function testGetUserDataAsSubAdminAndUserIsNotAccessible(): void { $this->expectException(\OCP\AppFramework\OCS\OCSException::class); $this->expectExceptionCode(998); @@ -1258,7 +1258,7 @@ class UsersControllerTest extends TestCase { $this->invokePrivate($this->api, 'getUser', ['UserToGet']); } - public function testGetUserDataAsSubAdminSelfLookup() { + public function testGetUserDataAsSubAdminSelfLookup(): void { $loggedInUser = $this->getMockBuilder(IUser::class) ->disableOriginalConstructor() ->getMock(); @@ -1412,7 +1412,7 @@ class UsersControllerTest extends TestCase { * @param int $status * @param array $expected */ - public function testSearchByPhoneNumbers(string $location, array $search, int $status, ?array $searchUsers, ?array $userMatches, array $expected) { + public function testSearchByPhoneNumbers(string $location, array $search, int $status, ?array $searchUsers, ?array $userMatches, array $expected): void { $knownTo = 'knownTo'; $user = $this->createMock(IUser::class); $user->method('getUID') @@ -1448,7 +1448,7 @@ class UsersControllerTest extends TestCase { self::assertEquals($expected, $response->getData()); } - public function testEditUserRegularUserSelfEditChangeDisplayName() { + public function testEditUserRegularUserSelfEditChangeDisplayName(): void { $loggedInUser = $this->getMockBuilder(IUser::class) ->disableOriginalConstructor() ->getMock(); @@ -1485,7 +1485,7 @@ class UsersControllerTest extends TestCase { $this->assertEquals([], $this->api->editUser('UserToEdit', 'display', 'NewDisplayName')->getData()); } - public function testEditUserRegularUserSelfEditChangeEmailValid() { + public function testEditUserRegularUserSelfEditChangeEmailValid(): void { $loggedInUser = $this->getMockBuilder(IUser::class) ->disableOriginalConstructor() ->getMock(); @@ -1680,7 +1680,7 @@ class UsersControllerTest extends TestCase { $this->api->editUser('UserToEdit', 'additional_mail', 'demo1@nextcloud.com')->getData(); } - public function testEditUserRegularUserSelfEditChangeEmailInvalid() { + public function testEditUserRegularUserSelfEditChangeEmailInvalid(): void { $this->expectException(\OCP\AppFramework\OCS\OCSException::class); $this->expectExceptionCode(102); @@ -1735,7 +1735,7 @@ class UsersControllerTest extends TestCase { /** * @dataProvider selfEditChangePropertyProvider */ - public function testEditUserRegularUserSelfEditChangeProperty($propertyName, $oldValue, $newValue) { + public function testEditUserRegularUserSelfEditChangeProperty($propertyName, $oldValue, $newValue): void { $loggedInUser = $this->getMockBuilder(IUser::class) ->disableOriginalConstructor() ->getMock(); @@ -1812,7 +1812,7 @@ class UsersControllerTest extends TestCase { /** * @dataProvider selfEditChangePropertyProvider */ - public function testEditUserRegularUserSelfEditChangePropertyScope($propertyName, $oldScope, $newScope) { + public function testEditUserRegularUserSelfEditChangePropertyScope($propertyName, $oldScope, $newScope): void { $loggedInUser = $this->getMockBuilder(IUser::class) ->disableOriginalConstructor() ->getMock(); @@ -1868,7 +1868,7 @@ class UsersControllerTest extends TestCase { $this->assertEquals([], $this->api->editUser('UserToEdit', $propertyName . 'Scope', $newScope)->getData()); } - public function testEditUserRegularUserSelfEditChangePassword() { + public function testEditUserRegularUserSelfEditChangePassword(): void { $loggedInUser = $this->getMockBuilder(IUser::class) ->disableOriginalConstructor() ->getMock(); @@ -1912,7 +1912,7 @@ class UsersControllerTest extends TestCase { - public function testEditUserRegularUserSelfEditChangeQuota() { + public function testEditUserRegularUserSelfEditChangeQuota(): void { $this->expectException(\OCP\AppFramework\OCS\OCSException::class); $this->expectExceptionCode(103); @@ -1949,7 +1949,7 @@ class UsersControllerTest extends TestCase { $this->api->editUser('UserToEdit', 'quota', 'NewQuota'); } - public function testEditUserAdminUserSelfEditChangeValidQuota() { + public function testEditUserAdminUserSelfEditChangeValidQuota(): void { $this->config ->expects($this->once()) ->method('getAppValue') @@ -1998,7 +1998,7 @@ class UsersControllerTest extends TestCase { - public function testEditUserAdminUserSelfEditChangeInvalidQuota() { + public function testEditUserAdminUserSelfEditChangeInvalidQuota(): void { $this->expectException(\OCP\AppFramework\OCS\OCSException::class); $this->expectExceptionMessage('Invalid quota value: ABC'); $this->expectExceptionCode(102); @@ -2037,7 +2037,7 @@ class UsersControllerTest extends TestCase { $this->api->editUser('UserToEdit', 'quota', 'ABC'); } - public function testEditUserAdminUserEditChangeValidQuota() { + public function testEditUserAdminUserEditChangeValidQuota(): void { $this->config ->expects($this->once()) ->method('getAppValue') @@ -2091,7 +2091,7 @@ class UsersControllerTest extends TestCase { $this->assertEquals([], $this->api->editUser('UserToEdit', 'quota', '3042824')->getData()); } - public function testEditUserSelfEditChangeLanguage() { + public function testEditUserSelfEditChangeLanguage(): void { $this->l10nFactory->expects($this->once()) ->method('findAvailableLanguages') ->willReturn(['en', 'de', 'sv']); @@ -2149,7 +2149,7 @@ class UsersControllerTest extends TestCase { /** * @dataProvider dataEditUserSelfEditChangeLanguageButForced */ - public function testEditUserSelfEditChangeLanguageButForced($forced) { + public function testEditUserSelfEditChangeLanguageButForced($forced): void { $this->expectException(\OCP\AppFramework\OCS\OCSException::class); $this->config->expects($this->any()) @@ -2195,7 +2195,7 @@ class UsersControllerTest extends TestCase { $this->assertEquals([], $this->api->editUser('UserToEdit', 'language', 'de')->getData()); } - public function testEditUserAdminEditChangeLanguage() { + public function testEditUserAdminEditChangeLanguage(): void { $this->l10nFactory->expects($this->once()) ->method('findAvailableLanguages') ->willReturn(['en', 'de', 'sv']); @@ -2245,7 +2245,7 @@ class UsersControllerTest extends TestCase { /** * @dataProvider dataEditUserSelfEditChangeLanguageButForced */ - public function testEditUserAdminEditChangeLanguageInvalidLanguage() { + public function testEditUserAdminEditChangeLanguageInvalidLanguage(): void { $this->expectException(\OCP\AppFramework\OCS\OCSException::class); @@ -2294,7 +2294,7 @@ class UsersControllerTest extends TestCase { $this->assertEquals([], $this->api->editUser('UserToEdit', 'language', 'ru')->getData()); } - public function testEditUserSubadminUserAccessible() { + public function testEditUserSubadminUserAccessible(): void { $this->config ->expects($this->once()) ->method('getAppValue') @@ -2349,7 +2349,7 @@ class UsersControllerTest extends TestCase { } - public function testEditUserSubadminUserInaccessible() { + public function testEditUserSubadminUserInaccessible(): void { $this->expectException(\OCP\AppFramework\OCS\OCSException::class); $this->expectExceptionCode(998); @@ -2389,7 +2389,7 @@ class UsersControllerTest extends TestCase { } - public function testDeleteUserNotExistingUser() { + public function testDeleteUserNotExistingUser(): void { $this->expectException(\OCP\AppFramework\OCS\OCSException::class); $this->expectExceptionCode(998); @@ -2412,7 +2412,7 @@ class UsersControllerTest extends TestCase { } - public function testDeleteUserSelf() { + public function testDeleteUserSelf(): void { $this->expectException(\OCP\AppFramework\OCS\OCSException::class); $this->expectExceptionCode(101); @@ -2439,7 +2439,7 @@ class UsersControllerTest extends TestCase { $this->api->deleteUser('UserToDelete'); } - public function testDeleteSuccessfulUserAsAdmin() { + public function testDeleteSuccessfulUserAsAdmin(): void { $loggedInUser = $this->getMockBuilder(IUser::class)->disableOriginalConstructor()->getMock(); $loggedInUser ->expects($this->any()) @@ -2473,7 +2473,7 @@ class UsersControllerTest extends TestCase { } - public function testDeleteUnsuccessfulUserAsAdmin() { + public function testDeleteUnsuccessfulUserAsAdmin(): void { $this->expectException(\OCP\AppFramework\OCS\OCSException::class); $this->expectExceptionCode(101); @@ -2509,7 +2509,7 @@ class UsersControllerTest extends TestCase { $this->api->deleteUser('UserToDelete'); } - public function testDeleteSuccessfulUserAsSubadmin() { + public function testDeleteSuccessfulUserAsSubadmin(): void { $loggedInUser = $this->getMockBuilder(IUser::class)->disableOriginalConstructor()->getMock(); $loggedInUser ->expects($this->any()) @@ -2554,7 +2554,7 @@ class UsersControllerTest extends TestCase { } - public function testDeleteUnsuccessfulUserAsSubadmin() { + public function testDeleteUnsuccessfulUserAsSubadmin(): void { $this->expectException(\OCP\AppFramework\OCS\OCSException::class); $this->expectExceptionCode(101); @@ -2602,7 +2602,7 @@ class UsersControllerTest extends TestCase { } - public function testDeleteUserAsSubAdminAndUserIsNotAccessible() { + public function testDeleteUserAsSubAdminAndUserIsNotAccessible(): void { $this->expectException(\OCP\AppFramework\OCS\OCSException::class); $this->expectExceptionCode(998); @@ -2646,7 +2646,7 @@ class UsersControllerTest extends TestCase { } - public function testGetUsersGroupsTargetUserNotExisting() { + public function testGetUsersGroupsTargetUserNotExisting(): void { $this->expectException(\OCP\AppFramework\OCS\OCSException::class); $this->expectExceptionCode(998); @@ -2659,7 +2659,7 @@ class UsersControllerTest extends TestCase { $this->api->getUsersGroups('UserToLookup'); } - public function testGetUsersGroupsSelfTargetted() { + public function testGetUsersGroupsSelfTargetted(): void { $loggedInUser = $this->getMockBuilder(IUser::class)->disableOriginalConstructor()->getMock(); $loggedInUser ->expects($this->exactly(3)) @@ -2688,7 +2688,7 @@ class UsersControllerTest extends TestCase { $this->assertEquals(['groups' => ['DummyValue']], $this->api->getUsersGroups('UserToLookup')->getData()); } - public function testGetUsersGroupsForAdminUser() { + public function testGetUsersGroupsForAdminUser(): void { $loggedInUser = $this->getMockBuilder(IUser::class)->disableOriginalConstructor()->getMock(); $loggedInUser ->expects($this->exactly(3)) @@ -2722,7 +2722,7 @@ class UsersControllerTest extends TestCase { $this->assertEquals(['groups' => ['DummyValue']], $this->api->getUsersGroups('UserToLookup')->getData()); } - public function testGetUsersGroupsForSubAdminUserAndUserIsAccessible() { + public function testGetUsersGroupsForSubAdminUserAndUserIsAccessible(): void { $loggedInUser = $this->getMockBuilder(IUser::class)->disableOriginalConstructor()->getMock(); $loggedInUser ->expects($this->exactly(3)) @@ -2783,7 +2783,7 @@ class UsersControllerTest extends TestCase { } - public function testGetUsersGroupsForSubAdminUserAndUserIsInaccessible() { + public function testGetUsersGroupsForSubAdminUserAndUserIsInaccessible(): void { $this->expectException(\OCP\AppFramework\OCS\OCSException::class); $this->expectExceptionCode(998); @@ -2832,7 +2832,7 @@ class UsersControllerTest extends TestCase { } - public function testAddToGroupWithTargetGroupNotExisting() { + public function testAddToGroupWithTargetGroupNotExisting(): void { $this->expectException(\OCP\AppFramework\OCS\OCSException::class); $this->expectExceptionCode(102); @@ -2845,7 +2845,7 @@ class UsersControllerTest extends TestCase { } - public function testAddToGroupWithNoGroupSpecified() { + public function testAddToGroupWithNoGroupSpecified(): void { $this->expectException(\OCP\AppFramework\OCS\OCSException::class); $this->expectExceptionCode(101); @@ -2853,7 +2853,7 @@ class UsersControllerTest extends TestCase { } - public function testAddToGroupWithTargetUserNotExisting() { + public function testAddToGroupWithTargetUserNotExisting(): void { $this->expectException(\OCP\AppFramework\OCS\OCSException::class); $this->expectExceptionCode(103); @@ -2867,7 +2867,7 @@ class UsersControllerTest extends TestCase { } - public function testAddToGroupNoSubadmin() { + public function testAddToGroupNoSubadmin(): void { $this->expectException(\OCP\AppFramework\OCS\OCSException::class); $this->expectExceptionCode(104); @@ -2914,7 +2914,7 @@ class UsersControllerTest extends TestCase { $this->api->addToGroup('TargetUser', 'GroupToAddTo'); } - public function testAddToGroupSuccessAsSubadmin() { + public function testAddToGroupSuccessAsSubadmin(): void { $targetUser = $this->createMock(IUser::class); $loggedInUser = $this->createMock(IUser::class); $loggedInUser->expects($this->exactly(2)) @@ -2958,7 +2958,7 @@ class UsersControllerTest extends TestCase { $this->assertEquals(new DataResponse(), $this->api->addToGroup('TargetUser', 'GroupToAddTo')); } - public function testAddToGroupSuccessAsAdmin() { + public function testAddToGroupSuccessAsAdmin(): void { $targetUser = $this->createMock(IUser::class); $loggedInUser = $this->createMock(IUser::class); $loggedInUser->expects($this->exactly(2)) @@ -3001,7 +3001,7 @@ class UsersControllerTest extends TestCase { } - public function testRemoveFromGroupWithNoTargetGroup() { + public function testRemoveFromGroupWithNoTargetGroup(): void { $this->expectException(\OCP\AppFramework\OCS\OCSException::class); $this->expectExceptionCode(101); @@ -3015,7 +3015,7 @@ class UsersControllerTest extends TestCase { } - public function testRemoveFromGroupWithEmptyTargetGroup() { + public function testRemoveFromGroupWithEmptyTargetGroup(): void { $this->expectException(\OCP\AppFramework\OCS\OCSException::class); $this->expectExceptionCode(101); @@ -3029,7 +3029,7 @@ class UsersControllerTest extends TestCase { } - public function testRemoveFromGroupWithNotExistingTargetGroup() { + public function testRemoveFromGroupWithNotExistingTargetGroup(): void { $this->expectException(\OCP\AppFramework\OCS\OCSException::class); $this->expectExceptionCode(102); @@ -3048,7 +3048,7 @@ class UsersControllerTest extends TestCase { } - public function testRemoveFromGroupWithNotExistingTargetUser() { + public function testRemoveFromGroupWithNotExistingTargetUser(): void { $this->expectException(\OCP\AppFramework\OCS\OCSException::class); $this->expectExceptionCode(103); @@ -3073,7 +3073,7 @@ class UsersControllerTest extends TestCase { } - public function testRemoveFromGroupWithoutPermission() { + public function testRemoveFromGroupWithoutPermission(): void { $this->expectException(\OCP\AppFramework\OCS\OCSException::class); $this->expectExceptionCode(104); @@ -3114,7 +3114,7 @@ class UsersControllerTest extends TestCase { } - public function testRemoveFromGroupAsAdminFromAdmin() { + public function testRemoveFromGroupAsAdminFromAdmin(): void { $this->expectException(\OCP\AppFramework\OCS\OCSException::class); $this->expectExceptionMessage('Cannot remove yourself from the admin group'); $this->expectExceptionCode(105); @@ -3164,7 +3164,7 @@ class UsersControllerTest extends TestCase { } - public function testRemoveFromGroupAsSubAdminFromSubAdmin() { + public function testRemoveFromGroupAsSubAdminFromSubAdmin(): void { $this->expectException(\OCP\AppFramework\OCS\OCSException::class); $this->expectExceptionMessage('Cannot remove yourself from this group as you are a sub-admin'); $this->expectExceptionCode(105); @@ -3219,7 +3219,7 @@ class UsersControllerTest extends TestCase { } - public function testRemoveFromGroupAsSubAdminFromLastSubAdminGroup() { + public function testRemoveFromGroupAsSubAdminFromLastSubAdminGroup(): void { $this->expectException(\OCP\AppFramework\OCS\OCSException::class); $this->expectExceptionMessage('Not viable to remove user from the last group you are sub-admin of'); $this->expectExceptionCode(105); @@ -3280,7 +3280,7 @@ class UsersControllerTest extends TestCase { $this->api->removeFromGroup('AnotherUser', 'subadmin'); } - public function testRemoveFromGroupSuccessful() { + public function testRemoveFromGroupSuccessful(): void { $loggedInUser = $this->getMockBuilder(IUser::class)->disableOriginalConstructor()->getMock(); $loggedInUser ->expects($this->any()) @@ -3322,7 +3322,7 @@ class UsersControllerTest extends TestCase { } - public function testAddSubAdminWithNotExistingTargetUser() { + public function testAddSubAdminWithNotExistingTargetUser(): void { $this->expectException(\OCP\AppFramework\OCS\OCSException::class); $this->expectExceptionMessage('User does not exist'); $this->expectExceptionCode(101); @@ -3337,7 +3337,7 @@ class UsersControllerTest extends TestCase { } - public function testAddSubAdminWithNotExistingTargetGroup() { + public function testAddSubAdminWithNotExistingTargetGroup(): void { $this->expectException(\OCP\AppFramework\OCS\OCSException::class); $this->expectExceptionMessage('Group does not exist'); $this->expectExceptionCode(102); @@ -3359,7 +3359,7 @@ class UsersControllerTest extends TestCase { } - public function testAddSubAdminToAdminGroup() { + public function testAddSubAdminToAdminGroup(): void { $this->expectException(\OCP\AppFramework\OCS\OCSException::class); $this->expectExceptionMessage('Cannot create sub-admins for admin group'); $this->expectExceptionCode(103); @@ -3384,7 +3384,7 @@ class UsersControllerTest extends TestCase { $this->api->addSubAdmin('ExistingUser', 'ADmiN'); } - public function testAddSubAdminTwice() { + public function testAddSubAdminTwice(): void { $targetUser = $this->getMockBuilder(IUser::class)->disableOriginalConstructor()->getMock(); $targetGroup = $this->getMockBuilder('\OCP\IGroup')->disableOriginalConstructor()->getMock(); $this->userManager @@ -3412,7 +3412,7 @@ class UsersControllerTest extends TestCase { $this->assertEquals([], $this->api->addSubAdmin('ExistingUser', 'TargetGroup')->getData()); } - public function testAddSubAdminSuccessful() { + public function testAddSubAdminSuccessful(): void { $targetUser = $this->getMockBuilder(IUser::class)->disableOriginalConstructor()->getMock(); $targetGroup = $this->getMockBuilder('\OCP\IGroup')->disableOriginalConstructor()->getMock(); $this->userManager @@ -3445,7 +3445,7 @@ class UsersControllerTest extends TestCase { } - public function testRemoveSubAdminNotExistingTargetUser() { + public function testRemoveSubAdminNotExistingTargetUser(): void { $this->expectException(\OCP\AppFramework\OCS\OCSException::class); $this->expectExceptionMessage('User does not exist'); $this->expectExceptionCode(101); @@ -3460,7 +3460,7 @@ class UsersControllerTest extends TestCase { } - public function testRemoveSubAdminNotExistingTargetGroup() { + public function testRemoveSubAdminNotExistingTargetGroup(): void { $this->expectException(\OCP\AppFramework\OCS\OCSException::class); $this->expectExceptionMessage('Group does not exist'); $this->expectExceptionCode(101); @@ -3482,7 +3482,7 @@ class UsersControllerTest extends TestCase { - public function testRemoveSubAdminFromNotASubadmin() { + public function testRemoveSubAdminFromNotASubadmin(): void { $this->expectException(\OCP\AppFramework\OCS\OCSException::class); $this->expectExceptionMessage('User is not a sub-admin of this group'); $this->expectExceptionCode(102); @@ -3514,7 +3514,7 @@ class UsersControllerTest extends TestCase { $this->api->removeSubAdmin('ExistingUser', 'GroupToDeleteFrom'); } - public function testRemoveSubAdminSuccessful() { + public function testRemoveSubAdminSuccessful(): void { $targetUser = $this->getMockBuilder(IUser::class)->disableOriginalConstructor()->getMock(); $targetGroup = $this->getMockBuilder('\OCP\IGroup')->disableOriginalConstructor()->getMock(); $this->userManager @@ -3547,7 +3547,7 @@ class UsersControllerTest extends TestCase { } - public function testGetUserSubAdminGroupsNotExistingTargetUser() { + public function testGetUserSubAdminGroupsNotExistingTargetUser(): void { $this->expectException(\OCP\AppFramework\OCS\OCSException::class); $this->expectExceptionMessage('User does not exist'); $this->expectExceptionCode(404); @@ -3561,7 +3561,7 @@ class UsersControllerTest extends TestCase { $this->api->getUserSubAdminGroups('RequestedUser'); } - public function testGetUserSubAdminGroupsWithGroups() { + public function testGetUserSubAdminGroupsWithGroups(): void { $targetUser = $this->getMockBuilder(IUser::class)->disableOriginalConstructor()->getMock(); $targetGroup = $this->getMockBuilder('\OCP\IGroup')->disableOriginalConstructor()->getMock(); $targetGroup @@ -3588,7 +3588,7 @@ class UsersControllerTest extends TestCase { $this->assertEquals(['TargetGroup'], $this->api->getUserSubAdminGroups('RequestedUser')->getData()); } - public function testEnableUser() { + public function testEnableUser(): void { $targetUser = $this->getMockBuilder(IUser::class)->disableOriginalConstructor()->getMock(); $targetUser->expects($this->once()) ->method('setEnabled') @@ -3615,7 +3615,7 @@ class UsersControllerTest extends TestCase { $this->assertEquals([], $this->api->enableUser('RequestedUser')->getData()); } - public function testDisableUser() { + public function testDisableUser(): void { $targetUser = $this->getMockBuilder(IUser::class)->disableOriginalConstructor()->getMock(); $targetUser->expects($this->once()) ->method('setEnabled') @@ -3642,7 +3642,7 @@ class UsersControllerTest extends TestCase { $this->assertEquals([], $this->api->disableUser('RequestedUser')->getData()); } - public function testGetCurrentUserLoggedIn() { + public function testGetCurrentUserLoggedIn(): void { $user = $this->createMock(IUser::class); $user->expects($this->once())->method('getUID')->willReturn('UID'); @@ -3717,7 +3717,7 @@ class UsersControllerTest extends TestCase { } - public function testGetCurrentUserNotLoggedIn() { + public function testGetCurrentUserNotLoggedIn(): void { $this->expectException(\OCP\AppFramework\OCS\OCSException::class); @@ -3727,7 +3727,7 @@ class UsersControllerTest extends TestCase { $this->api->getCurrentUser(); } - public function testGetUser() { + public function testGetUser(): void { $loggedInUser = $this->createMock(IUser::class); $loggedInUser ->method('getUID') @@ -3792,7 +3792,7 @@ class UsersControllerTest extends TestCase { } - public function testResendWelcomeMessageWithNotExistingTargetUser() { + public function testResendWelcomeMessageWithNotExistingTargetUser(): void { $this->expectException(\OCP\AppFramework\OCS\OCSException::class); $this->expectExceptionCode(998); @@ -3806,7 +3806,7 @@ class UsersControllerTest extends TestCase { } - public function testResendWelcomeMessageAsSubAdminAndUserIsNotAccessible() { + public function testResendWelcomeMessageAsSubAdminAndUserIsNotAccessible(): void { $this->expectException(\OCP\AppFramework\OCS\OCSException::class); $this->expectExceptionCode(998); @@ -3851,7 +3851,7 @@ class UsersControllerTest extends TestCase { } - public function testResendWelcomeMessageNoEmail() { + public function testResendWelcomeMessageNoEmail(): void { $this->expectException(\OCP\AppFramework\OCS\OCSException::class); $this->expectExceptionMessage('Email address not available'); $this->expectExceptionCode(101); @@ -3896,7 +3896,7 @@ class UsersControllerTest extends TestCase { } - public function testResendWelcomeMessageNullEmail() { + public function testResendWelcomeMessageNullEmail(): void { $this->expectException(\OCP\AppFramework\OCS\OCSException::class); $this->expectExceptionMessage('Email address not available'); $this->expectExceptionCode(101); @@ -3940,7 +3940,7 @@ class UsersControllerTest extends TestCase { $this->api->resendWelcomeMessage('UserToGet'); } - public function testResendWelcomeMessageSuccess() { + public function testResendWelcomeMessageSuccess(): void { $loggedInUser = $this->getMockBuilder(IUser::class) ->disableOriginalConstructor() ->getMock(); @@ -3991,7 +3991,7 @@ class UsersControllerTest extends TestCase { $this->api->resendWelcomeMessage('UserToGet'); } - public function testResendWelcomeMessageSuccessWithFallbackLanguage() { + public function testResendWelcomeMessageSuccessWithFallbackLanguage(): void { $loggedInUser = $this->getMockBuilder(IUser::class) ->disableOriginalConstructor() ->getMock(); @@ -4043,7 +4043,7 @@ class UsersControllerTest extends TestCase { } - public function testResendWelcomeMessageFailed() { + public function testResendWelcomeMessageFailed(): void { $this->expectException(\OCP\AppFramework\OCS\OCSException::class); $this->expectExceptionMessage('Sending email failed'); $this->expectExceptionCode(102); @@ -4155,7 +4155,7 @@ class UsersControllerTest extends TestCase { * @param string $userBackend * @param array $expected */ - public function testGetEditableFields(bool $allowedToChangeDisplayName, string $userBackend, array $expected) { + public function testGetEditableFields(bool $allowedToChangeDisplayName, string $userBackend, array $expected): void { $this->config ->method('getSystemValue') ->with( diff --git a/apps/provisioning_api/tests/Middleware/ProvisioningApiMiddlewareTest.php b/apps/provisioning_api/tests/Middleware/ProvisioningApiMiddlewareTest.php index df3ae0bd358..d097febb04f 100644 --- a/apps/provisioning_api/tests/Middleware/ProvisioningApiMiddlewareTest.php +++ b/apps/provisioning_api/tests/Middleware/ProvisioningApiMiddlewareTest.php @@ -51,7 +51,7 @@ class ProvisioningApiMiddlewareTest extends TestCase { * @param bool $isSubAdmin * @param bool $shouldThrowException */ - public function testBeforeController($subadminRequired, $isAdmin, $isSubAdmin, $hasSettingAuthorizationAnnotation, $shouldThrowException) { + public function testBeforeController($subadminRequired, $isAdmin, $isSubAdmin, $hasSettingAuthorizationAnnotation, $shouldThrowException): void { $middleware = new ProvisioningApiMiddleware( $this->reflector, $isAdmin, @@ -93,7 +93,7 @@ class ProvisioningApiMiddlewareTest extends TestCase { * @param \Exception $e * @param bool $forwared */ - public function testAfterException(\Exception $exception, $forwared) { + public function testAfterException(\Exception $exception, $forwared): void { $middleware = new ProvisioningApiMiddleware( $this->reflector, false, diff --git a/apps/settings/l10n/ar.js b/apps/settings/l10n/ar.js index 824fda79935..af16dd8d311 100644 --- a/apps/settings/l10n/ar.js +++ b/apps/settings/l10n/ar.js @@ -881,7 +881,6 @@ OC.L10N.register( "SMTP Username" : "اسم مستخدم الـ SMTP", "To allow this check to run you have to make sure that your webserver can connect to itself. Therefor it must be able to resolve and connect to at least one its `trusted_domains` or the `overwrite.cli.url`." : "للسماح بتشغيل هذا الفحص، عليك التأكد من أن خادوم الويب عندك يمكنه الاتصال بنفسه. ولذلك، يجب أن يكون قادراً على حل المشكلة والاتصال بنطاق واحد على الأقل من \"النطاقات_الموثوقة\" أو 'overwrite.cli.url'.", "Could not check for JavaScript support via any of your `trusted_domains` nor `overwrite.cli.url`. This may be the result of a server-side DNS mismatch or outbound firewall rule. Please check manually if your webserver serves `.mjs` files using the JavaScript MIME type." : "تعذر التحقُّق من دعم JavaScript عبر أيٍّ من \"النطاقات_الموثوقة\" أو \"overwrite.cli.url\". قد يكون هذا نتيجة عدم تطابق DNS من جانب الخادوم أو بسبب إحدى سياسات إدارة الحركة الصادرة في جدار الحماية. يرجى التحقق يدويًا مما إذا كان خادوم الويب عندك يقدم ملفات `.mjs` باستخدام نوع JavaScript MIME.", - "Active accounts" : "حسابات نشطة", - "None of your currently installed apps provide custom Text processing functionality." : "لا أحد من تطبيقاتك المثبتة حاليّاً يوفر وظيفة مخصصة لمعالجة النصوص." + "Active accounts" : "حسابات نشطة" }, "nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 && n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5;"); diff --git a/apps/settings/l10n/ar.json b/apps/settings/l10n/ar.json index a7036aadf27..1028c3aec17 100644 --- a/apps/settings/l10n/ar.json +++ b/apps/settings/l10n/ar.json @@ -879,7 +879,6 @@ "SMTP Username" : "اسم مستخدم الـ SMTP", "To allow this check to run you have to make sure that your webserver can connect to itself. Therefor it must be able to resolve and connect to at least one its `trusted_domains` or the `overwrite.cli.url`." : "للسماح بتشغيل هذا الفحص، عليك التأكد من أن خادوم الويب عندك يمكنه الاتصال بنفسه. ولذلك، يجب أن يكون قادراً على حل المشكلة والاتصال بنطاق واحد على الأقل من \"النطاقات_الموثوقة\" أو 'overwrite.cli.url'.", "Could not check for JavaScript support via any of your `trusted_domains` nor `overwrite.cli.url`. This may be the result of a server-side DNS mismatch or outbound firewall rule. Please check manually if your webserver serves `.mjs` files using the JavaScript MIME type." : "تعذر التحقُّق من دعم JavaScript عبر أيٍّ من \"النطاقات_الموثوقة\" أو \"overwrite.cli.url\". قد يكون هذا نتيجة عدم تطابق DNS من جانب الخادوم أو بسبب إحدى سياسات إدارة الحركة الصادرة في جدار الحماية. يرجى التحقق يدويًا مما إذا كان خادوم الويب عندك يقدم ملفات `.mjs` باستخدام نوع JavaScript MIME.", - "Active accounts" : "حسابات نشطة", - "None of your currently installed apps provide custom Text processing functionality." : "لا أحد من تطبيقاتك المثبتة حاليّاً يوفر وظيفة مخصصة لمعالجة النصوص." + "Active accounts" : "حسابات نشطة" },"pluralForm" :"nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 && n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5;" }
\ No newline at end of file diff --git a/apps/settings/l10n/cs.js b/apps/settings/l10n/cs.js index 9ce82396bec..f3433d18ab4 100644 --- a/apps/settings/l10n/cs.js +++ b/apps/settings/l10n/cs.js @@ -133,7 +133,7 @@ OC.L10N.register( "Brute-force Throttle" : "Přiškrcování útoků hrubou silou", "Your remote address could not be determined." : "Nepodařilo se zjistit vaši vzdálenou adresu.", "Your remote address was identified as \"%s\" and is brute-force throttled at the moment slowing down the performance of various requests. If the remote address is not your address this can be an indication that a proxy is not configured correctly." : "Vaše vzdálená adresa byla identifikována jako „%s“ a rychlost vyřizování požadavků z ní je v tuto chvíli omezována kvůli zamezení přetěžování útokem hádání hesel (bruteforce). Pokud vzdálená adresa není vaše, může se jednat o indikaci, že není správně nastavena proxy.", - "Your remote address \"%s\" is not brute-force throttled." : "Vaše vzdálená adresa „%s“ není omezována co se útoků hrubou silou týče.", + "Your remote address \"%s\" is not brute-force throttled." : "Vaše vzdálená adresa „%s“ není omezena z důvodu ochrany proti útokům hrubou silou.", "Old administration imported certificates" : "Staré správou naimportované certifikáty", "A background job is pending that checks for administration imported SSL certificates. Please check back later." : "Úloha na pozadí čeká na kontrolu správou naimportovaných SSL certifikátů. Zkuste to prosím později.", "There are some administration imported SSL certificates present, that are not used anymore with Nextcloud 21. They can be imported on the command line via \"occ security:certificates:import\" command. Their paths inside the data directory are shown below." : "Nacházejí se zde některé SSL certifikáty, naimportované správou, které se už s Nextcloud 21 nepoužívají. Lze je naimportovat v příkazovém řádku pomocí příkazu „occ security:certificates:import“. Popisy jejich umístění v adresáři s daty jsou uvedeny níže.", @@ -419,7 +419,7 @@ OC.L10N.register( "Could not copy login name. Please copy it manually." : "Přihlašovací jméno se nepodařilo zkopírovat. Zkopírujte ho ručně.", "For the server to work properly, it's important to configure background jobs correctly. Cron is the recommended setting. Please see the documentation for more information." : "Pro správnou funkci serveru je důležité správně nastavit úlohy spouštěné na pozadí. Doporučenou metodou je použití systémového plánovače (cron). Další informace naleznete v dokumentaci.", "Last job execution ran {time}. Something seems wrong." : "Minulé vykonání úlohy bylo {time}. Zdá se, že něco není v pořádku.", - "Last job ran {relativeTime}." : "Úloha minule běžela {relativeTime}.", + "Last job ran {relativeTime}." : "Poslední úloha proběhla {relativeTime}.", "Background job did not run yet!" : "Úloha na pozadí ještě nebyla spuštěná!", "AJAX" : "AJAX", "Webcron" : "Webcron", diff --git a/apps/settings/l10n/cs.json b/apps/settings/l10n/cs.json index d9fb51f4a38..a12b8028438 100644 --- a/apps/settings/l10n/cs.json +++ b/apps/settings/l10n/cs.json @@ -131,7 +131,7 @@ "Brute-force Throttle" : "Přiškrcování útoků hrubou silou", "Your remote address could not be determined." : "Nepodařilo se zjistit vaši vzdálenou adresu.", "Your remote address was identified as \"%s\" and is brute-force throttled at the moment slowing down the performance of various requests. If the remote address is not your address this can be an indication that a proxy is not configured correctly." : "Vaše vzdálená adresa byla identifikována jako „%s“ a rychlost vyřizování požadavků z ní je v tuto chvíli omezována kvůli zamezení přetěžování útokem hádání hesel (bruteforce). Pokud vzdálená adresa není vaše, může se jednat o indikaci, že není správně nastavena proxy.", - "Your remote address \"%s\" is not brute-force throttled." : "Vaše vzdálená adresa „%s“ není omezována co se útoků hrubou silou týče.", + "Your remote address \"%s\" is not brute-force throttled." : "Vaše vzdálená adresa „%s“ není omezena z důvodu ochrany proti útokům hrubou silou.", "Old administration imported certificates" : "Staré správou naimportované certifikáty", "A background job is pending that checks for administration imported SSL certificates. Please check back later." : "Úloha na pozadí čeká na kontrolu správou naimportovaných SSL certifikátů. Zkuste to prosím později.", "There are some administration imported SSL certificates present, that are not used anymore with Nextcloud 21. They can be imported on the command line via \"occ security:certificates:import\" command. Their paths inside the data directory are shown below." : "Nacházejí se zde některé SSL certifikáty, naimportované správou, které se už s Nextcloud 21 nepoužívají. Lze je naimportovat v příkazovém řádku pomocí příkazu „occ security:certificates:import“. Popisy jejich umístění v adresáři s daty jsou uvedeny níže.", @@ -417,7 +417,7 @@ "Could not copy login name. Please copy it manually." : "Přihlašovací jméno se nepodařilo zkopírovat. Zkopírujte ho ručně.", "For the server to work properly, it's important to configure background jobs correctly. Cron is the recommended setting. Please see the documentation for more information." : "Pro správnou funkci serveru je důležité správně nastavit úlohy spouštěné na pozadí. Doporučenou metodou je použití systémového plánovače (cron). Další informace naleznete v dokumentaci.", "Last job execution ran {time}. Something seems wrong." : "Minulé vykonání úlohy bylo {time}. Zdá se, že něco není v pořádku.", - "Last job ran {relativeTime}." : "Úloha minule běžela {relativeTime}.", + "Last job ran {relativeTime}." : "Poslední úloha proběhla {relativeTime}.", "Background job did not run yet!" : "Úloha na pozadí ještě nebyla spuštěná!", "AJAX" : "AJAX", "Webcron" : "Webcron", diff --git a/apps/settings/l10n/de.js b/apps/settings/l10n/de.js index 35c3d9b1419..87eef7d9297 100644 --- a/apps/settings/l10n/de.js +++ b/apps/settings/l10n/de.js @@ -221,6 +221,9 @@ OC.L10N.register( "The \"overwrite.cli.url\" option in your config.php is correctly set to \"%s\"." : "Die Option \"overwrite.cli.url\" in deiner config.php ist korrekt auf \"%s\" festgelegt.", "The \"overwrite.cli.url\" option in your config.php is set to \"%s\" which is a correct URL. Suggested URL is \"%s\"." : "Die Option \"overwrite.cli.url\" in deiner config.php ist auf \"%s\" festgelegt. Dies ist eine gültige URL. Die vorgeschlagene URL lautet \"%s\".", "Please make sure to set the \"overwrite.cli.url\" option in your config.php file to the URL that your users mainly use to access this Nextcloud. Suggestion: \"%s\". Otherwise there might be problems with the URL generation via cron. (It is possible though that the suggested URL is not the URL that your users mainly use to access this Nextcloud. Best is to double check this in any case.)" : "Bitte stelle sicher, dass du die Option \"overwrite.cli.url\" in deiner config.php-Datei auf die URL setzt, die deine Benutzenden hauptsächlich verwenden, um auf diese Nextcloud zuzugreifen. Vorschlag: \"%s\". Andernfalls kann es Probleme bei der URL-Generierung über Cron geben. (Es ist jedoch möglich, dass die vorgeschlagene URL nicht die URL ist, die Ihre Benutzer hauptsächlich verwenden, um auf diese Nextcloud zuzugreifen. Am besten überprüfst du dies in jedem Fall.)", + "PHP APCu configuration" : "PHP APCu-Konfiguration", + "Your APCu cache has been running full, consider increasing the apc.shm_size php setting." : "Dein APCu-Cache ist voll. Erwäge, die PHP-Einstellung apc.shm_size zu erhöhen.", + "Your APCu cache is almost full at %s%%, consider increasing the apc.shm_size php setting." : " Dein APCu-Cache ist mit %s%% fast voll. Ziehe in Erwägung, die PHP-Einstellung apc.shm_size zu erhöhen.", "PHP default charset" : "PHP-Standardzeichensatz", "PHP configuration option \"default_charset\" should be UTF-8" : "Die PHP-Konfigurationsoption \"default_charset\" sollte UTF-8 sein", "PHP set_time_limit" : "PHP set_time_limit", @@ -251,6 +254,7 @@ OC.L10N.register( "The OPcache interned strings buffer is nearly full. To assure that repeating strings can be effectively cached, it is recommended to apply \"opcache.interned_strings_buffer\" to your PHP configuration with a value higher than \"%s\"." : "Der \"OPcache interned strings\"-Puffer ist fast voll. Um sicherzustellen, dass sich wiederholende Strings effektiv zwischengespeichert werden können, wird empfohlen, \"opcache.interned_strings_buffer\" mit einem Wert größer als \"%s\" in der PHP-Konfiguration zu setzen.", "OPcache is configured to remove code comments. With OPcache enabled, \"opcache.save_comments=1\" must be set for Nextcloud to function." : "OPcache ist so konfiguriert, dass Code-Kommentare entfernt werden Mit aktiviertem OPcache muss \"opcache.save_comments=1\" gesetzt werden, damit die Nextcloud funktioniert.", "Nextcloud is not allowed to use the OPcache API. With OPcache enabled, it is highly recommended to include all Nextcloud directories with \"opcache.restrict_api\" or unset this setting to disable OPcache API restrictions, to prevent errors during Nextcloud core or app upgrades." : "Nextcloud darf die OPcache-API nicht verwenden. Mit aktiviertem OPcache wird empfohlen, alle Nextcloud-Verzeichnisse mit \"opcache.restrict_api\" einzuschließen oder diese Einstellung zu deaktivieren, um OPcache API-Beschränkungen zu deaktivieren und Fehler während Nextcloud-Core- oder App-Aktualisierungen zu vermeiden.", + "Checking from CLI, OPcache checks have been skipped." : "Bei der Überprüfung über die Komandozeile wurden OPcache-Überprüfungen übersprungen.", "The PHP OPcache module is not properly configured. %s." : "Das PHP OPcache-Modul ist nicht ordnungsgemäß konfiguriert. %s.", "Correctly configured" : "Korrekt konfiguriert", "PHP version" : "PHP-Version", @@ -327,6 +331,7 @@ OC.L10N.register( "None of your currently installed apps provide image generation functionality" : "Keine deiner derzeit installierten Apps bietet Funktionen zur Bilderstellung.", "Text processing" : "Textverarbeitung", "Text processing tasks can be implemented by different apps. Here you can set which app should be used for which task." : "Textverarbeitungsaufgaben können mittels verschiedener Apps umgesetzt werden. Hier kannst du einstellen, welche App für welche Aufgabe verwendet werden soll.", + "None of your currently installed apps provide text processing functionality using the Text Processing API." : "Keine deiner derzeit installierten Apps bietet Funktionalität zur Textverarbeitung durch Nutzung der Text-Processing-API.", "Here you can decide which group can access certain sections of the administration settings." : "Hier kannst du festlegen, welche Gruppe auf bestimmte Bereiche der Verwaltungseinstellungen zugreifen kann.", "None" : "Keine", "Unable to modify setting" : "Einstellung konnte nicht geändert werden", @@ -361,6 +366,8 @@ OC.L10N.register( "Privacy settings for sharing" : "Datenschutzeinstellungen bezüglich des Teilens", "Allow account name autocompletion in share dialog and allow access to the system address book" : "Automatische Vervollständigung des Kontonamens im Freigabedialog und Zugriff auf das Systemadressbuch zulassen", "If autocompletion \"same group\" and \"phone number integration\" are enabled a match in either is enough to show the user." : "Wenn die Autovervollständigung \"gleiche Gruppe\" und \"Rufnummernintegration\" aktiviert ist, reicht eine Übereinstimmung in einem der beiden Bereiche aus, um den Benutzer anzuzeigen.", + "Restrict account name autocompletion and system address book access to users within the same groups" : "Die automatische Vervollständigung von Kontonamen und den Zugriff auf das Systemadressbuch auf Benutzer innerhalb derselben Gruppen beschränken", + "Restrict account name autocompletion to users based on phone number integration" : "Die automatische Vervollständigung des Kontonamens auf Benutzer beschränken, die auf der Integration von Telefonnummern basieren.", "Allow autocompletion when entering the full name or email address (ignoring missing phonebook match and being in the same group)" : "Ermöglicht die automatische Vervollständigung, wenn der vollständigen Namen oder die E-Mail-Adresse eingeben wird (ignoriert fehlende Telefonbuchübereinstimmungen und bei gleicher Gruppenzugehörigkeit)", "Show disclaimer text on the public link upload page (only shown when the file list is hidden)" : "Zeige Haftungsausschluss auf der öffentlichen Upload-Seite (Wird nur gezeigt, wenn die Dateiliste nicht angezeigt wird.) ", "Disclaimer text" : "Haftungsausschlusstext", diff --git a/apps/settings/l10n/de.json b/apps/settings/l10n/de.json index b1ad9658266..df0a11efcf3 100644 --- a/apps/settings/l10n/de.json +++ b/apps/settings/l10n/de.json @@ -219,6 +219,9 @@ "The \"overwrite.cli.url\" option in your config.php is correctly set to \"%s\"." : "Die Option \"overwrite.cli.url\" in deiner config.php ist korrekt auf \"%s\" festgelegt.", "The \"overwrite.cli.url\" option in your config.php is set to \"%s\" which is a correct URL. Suggested URL is \"%s\"." : "Die Option \"overwrite.cli.url\" in deiner config.php ist auf \"%s\" festgelegt. Dies ist eine gültige URL. Die vorgeschlagene URL lautet \"%s\".", "Please make sure to set the \"overwrite.cli.url\" option in your config.php file to the URL that your users mainly use to access this Nextcloud. Suggestion: \"%s\". Otherwise there might be problems with the URL generation via cron. (It is possible though that the suggested URL is not the URL that your users mainly use to access this Nextcloud. Best is to double check this in any case.)" : "Bitte stelle sicher, dass du die Option \"overwrite.cli.url\" in deiner config.php-Datei auf die URL setzt, die deine Benutzenden hauptsächlich verwenden, um auf diese Nextcloud zuzugreifen. Vorschlag: \"%s\". Andernfalls kann es Probleme bei der URL-Generierung über Cron geben. (Es ist jedoch möglich, dass die vorgeschlagene URL nicht die URL ist, die Ihre Benutzer hauptsächlich verwenden, um auf diese Nextcloud zuzugreifen. Am besten überprüfst du dies in jedem Fall.)", + "PHP APCu configuration" : "PHP APCu-Konfiguration", + "Your APCu cache has been running full, consider increasing the apc.shm_size php setting." : "Dein APCu-Cache ist voll. Erwäge, die PHP-Einstellung apc.shm_size zu erhöhen.", + "Your APCu cache is almost full at %s%%, consider increasing the apc.shm_size php setting." : " Dein APCu-Cache ist mit %s%% fast voll. Ziehe in Erwägung, die PHP-Einstellung apc.shm_size zu erhöhen.", "PHP default charset" : "PHP-Standardzeichensatz", "PHP configuration option \"default_charset\" should be UTF-8" : "Die PHP-Konfigurationsoption \"default_charset\" sollte UTF-8 sein", "PHP set_time_limit" : "PHP set_time_limit", @@ -249,6 +252,7 @@ "The OPcache interned strings buffer is nearly full. To assure that repeating strings can be effectively cached, it is recommended to apply \"opcache.interned_strings_buffer\" to your PHP configuration with a value higher than \"%s\"." : "Der \"OPcache interned strings\"-Puffer ist fast voll. Um sicherzustellen, dass sich wiederholende Strings effektiv zwischengespeichert werden können, wird empfohlen, \"opcache.interned_strings_buffer\" mit einem Wert größer als \"%s\" in der PHP-Konfiguration zu setzen.", "OPcache is configured to remove code comments. With OPcache enabled, \"opcache.save_comments=1\" must be set for Nextcloud to function." : "OPcache ist so konfiguriert, dass Code-Kommentare entfernt werden Mit aktiviertem OPcache muss \"opcache.save_comments=1\" gesetzt werden, damit die Nextcloud funktioniert.", "Nextcloud is not allowed to use the OPcache API. With OPcache enabled, it is highly recommended to include all Nextcloud directories with \"opcache.restrict_api\" or unset this setting to disable OPcache API restrictions, to prevent errors during Nextcloud core or app upgrades." : "Nextcloud darf die OPcache-API nicht verwenden. Mit aktiviertem OPcache wird empfohlen, alle Nextcloud-Verzeichnisse mit \"opcache.restrict_api\" einzuschließen oder diese Einstellung zu deaktivieren, um OPcache API-Beschränkungen zu deaktivieren und Fehler während Nextcloud-Core- oder App-Aktualisierungen zu vermeiden.", + "Checking from CLI, OPcache checks have been skipped." : "Bei der Überprüfung über die Komandozeile wurden OPcache-Überprüfungen übersprungen.", "The PHP OPcache module is not properly configured. %s." : "Das PHP OPcache-Modul ist nicht ordnungsgemäß konfiguriert. %s.", "Correctly configured" : "Korrekt konfiguriert", "PHP version" : "PHP-Version", @@ -325,6 +329,7 @@ "None of your currently installed apps provide image generation functionality" : "Keine deiner derzeit installierten Apps bietet Funktionen zur Bilderstellung.", "Text processing" : "Textverarbeitung", "Text processing tasks can be implemented by different apps. Here you can set which app should be used for which task." : "Textverarbeitungsaufgaben können mittels verschiedener Apps umgesetzt werden. Hier kannst du einstellen, welche App für welche Aufgabe verwendet werden soll.", + "None of your currently installed apps provide text processing functionality using the Text Processing API." : "Keine deiner derzeit installierten Apps bietet Funktionalität zur Textverarbeitung durch Nutzung der Text-Processing-API.", "Here you can decide which group can access certain sections of the administration settings." : "Hier kannst du festlegen, welche Gruppe auf bestimmte Bereiche der Verwaltungseinstellungen zugreifen kann.", "None" : "Keine", "Unable to modify setting" : "Einstellung konnte nicht geändert werden", @@ -359,6 +364,8 @@ "Privacy settings for sharing" : "Datenschutzeinstellungen bezüglich des Teilens", "Allow account name autocompletion in share dialog and allow access to the system address book" : "Automatische Vervollständigung des Kontonamens im Freigabedialog und Zugriff auf das Systemadressbuch zulassen", "If autocompletion \"same group\" and \"phone number integration\" are enabled a match in either is enough to show the user." : "Wenn die Autovervollständigung \"gleiche Gruppe\" und \"Rufnummernintegration\" aktiviert ist, reicht eine Übereinstimmung in einem der beiden Bereiche aus, um den Benutzer anzuzeigen.", + "Restrict account name autocompletion and system address book access to users within the same groups" : "Die automatische Vervollständigung von Kontonamen und den Zugriff auf das Systemadressbuch auf Benutzer innerhalb derselben Gruppen beschränken", + "Restrict account name autocompletion to users based on phone number integration" : "Die automatische Vervollständigung des Kontonamens auf Benutzer beschränken, die auf der Integration von Telefonnummern basieren.", "Allow autocompletion when entering the full name or email address (ignoring missing phonebook match and being in the same group)" : "Ermöglicht die automatische Vervollständigung, wenn der vollständigen Namen oder die E-Mail-Adresse eingeben wird (ignoriert fehlende Telefonbuchübereinstimmungen und bei gleicher Gruppenzugehörigkeit)", "Show disclaimer text on the public link upload page (only shown when the file list is hidden)" : "Zeige Haftungsausschluss auf der öffentlichen Upload-Seite (Wird nur gezeigt, wenn die Dateiliste nicht angezeigt wird.) ", "Disclaimer text" : "Haftungsausschlusstext", diff --git a/apps/settings/l10n/de_DE.js b/apps/settings/l10n/de_DE.js index daff4b98710..c83a24bbaab 100644 --- a/apps/settings/l10n/de_DE.js +++ b/apps/settings/l10n/de_DE.js @@ -881,7 +881,6 @@ OC.L10N.register( "SMTP Username" : "SMTP-Kontenname", "To allow this check to run you have to make sure that your webserver can connect to itself. Therefor it must be able to resolve and connect to at least one its `trusted_domains` or the `overwrite.cli.url`." : "Um diese Prüfung auszuführen, müssen Sie sicherstellen, dass Ihr Webserver eine Verbindung zu sich selbst herstellen kann. Dafür muss er in der Lage sein, sich mit mindestens einer seiner \"trusted_domains\" oder der \"overwrite.cli.url\" zu verbinden und diese aufzulösen.", "Could not check for JavaScript support via any of your `trusted_domains` nor `overwrite.cli.url`. This may be the result of a server-side DNS mismatch or outbound firewall rule. Please check manually if your webserver serves `.mjs` files using the JavaScript MIME type." : "Es konnte weder über Ihre `trusted_domains` noch über `overwrite.cli.url` nach JavaScript-Unterstützung gesucht werden. Dies kann auf eine serverseitige DNS-Nichtübereinstimmung oder eine ausgehende Firewall-Regel zurückzuführen sein. Bitte überprüfen Sie manuell, ob Ihr Webserver `.mjs`-Dateien mit dem JavaScript-MIME-Typ bereitstellt.", - "Active accounts" : "Aktive Konten", - "None of your currently installed apps provide custom Text processing functionality." : "Keine Ihrer aktuell installierten Apps bietet benutzerdefinierte Textverarbeitungsfunktionen." + "Active accounts" : "Aktive Konten" }, "nplurals=2; plural=(n != 1);"); diff --git a/apps/settings/l10n/de_DE.json b/apps/settings/l10n/de_DE.json index dd88f31e626..0f370cb1e04 100644 --- a/apps/settings/l10n/de_DE.json +++ b/apps/settings/l10n/de_DE.json @@ -879,7 +879,6 @@ "SMTP Username" : "SMTP-Kontenname", "To allow this check to run you have to make sure that your webserver can connect to itself. Therefor it must be able to resolve and connect to at least one its `trusted_domains` or the `overwrite.cli.url`." : "Um diese Prüfung auszuführen, müssen Sie sicherstellen, dass Ihr Webserver eine Verbindung zu sich selbst herstellen kann. Dafür muss er in der Lage sein, sich mit mindestens einer seiner \"trusted_domains\" oder der \"overwrite.cli.url\" zu verbinden und diese aufzulösen.", "Could not check for JavaScript support via any of your `trusted_domains` nor `overwrite.cli.url`. This may be the result of a server-side DNS mismatch or outbound firewall rule. Please check manually if your webserver serves `.mjs` files using the JavaScript MIME type." : "Es konnte weder über Ihre `trusted_domains` noch über `overwrite.cli.url` nach JavaScript-Unterstützung gesucht werden. Dies kann auf eine serverseitige DNS-Nichtübereinstimmung oder eine ausgehende Firewall-Regel zurückzuführen sein. Bitte überprüfen Sie manuell, ob Ihr Webserver `.mjs`-Dateien mit dem JavaScript-MIME-Typ bereitstellt.", - "Active accounts" : "Aktive Konten", - "None of your currently installed apps provide custom Text processing functionality." : "Keine Ihrer aktuell installierten Apps bietet benutzerdefinierte Textverarbeitungsfunktionen." + "Active accounts" : "Aktive Konten" },"pluralForm" :"nplurals=2; plural=(n != 1);" }
\ No newline at end of file diff --git a/apps/settings/l10n/en_GB.js b/apps/settings/l10n/en_GB.js index 670f9c2a39e..83611953a30 100644 --- a/apps/settings/l10n/en_GB.js +++ b/apps/settings/l10n/en_GB.js @@ -881,7 +881,6 @@ OC.L10N.register( "SMTP Username" : "SMTP Username", "To allow this check to run you have to make sure that your webserver can connect to itself. Therefor it must be able to resolve and connect to at least one its `trusted_domains` or the `overwrite.cli.url`." : "To allow this check to run you have to make sure that your webserver can connect to itself. Therefor it must be able to resolve and connect to at least one its `trusted_domains` or the `overwrite.cli.url`.", "Could not check for JavaScript support via any of your `trusted_domains` nor `overwrite.cli.url`. This may be the result of a server-side DNS mismatch or outbound firewall rule. Please check manually if your webserver serves `.mjs` files using the JavaScript MIME type." : "Could not check for JavaScript support via any of your `trusted_domains` nor `overwrite.cli.url`. This may be the result of a server-side DNS mismatch or outbound firewall rule. Please check manually if your webserver serves `.mjs` files using the JavaScript MIME type.", - "Active accounts" : "Active accounts", - "None of your currently installed apps provide custom Text processing functionality." : "None of your currently installed apps provide custom Text processing functionality." + "Active accounts" : "Active accounts" }, "nplurals=2; plural=(n != 1);"); diff --git a/apps/settings/l10n/en_GB.json b/apps/settings/l10n/en_GB.json index 4194e435ea5..2915d208a02 100644 --- a/apps/settings/l10n/en_GB.json +++ b/apps/settings/l10n/en_GB.json @@ -879,7 +879,6 @@ "SMTP Username" : "SMTP Username", "To allow this check to run you have to make sure that your webserver can connect to itself. Therefor it must be able to resolve and connect to at least one its `trusted_domains` or the `overwrite.cli.url`." : "To allow this check to run you have to make sure that your webserver can connect to itself. Therefor it must be able to resolve and connect to at least one its `trusted_domains` or the `overwrite.cli.url`.", "Could not check for JavaScript support via any of your `trusted_domains` nor `overwrite.cli.url`. This may be the result of a server-side DNS mismatch or outbound firewall rule. Please check manually if your webserver serves `.mjs` files using the JavaScript MIME type." : "Could not check for JavaScript support via any of your `trusted_domains` nor `overwrite.cli.url`. This may be the result of a server-side DNS mismatch or outbound firewall rule. Please check manually if your webserver serves `.mjs` files using the JavaScript MIME type.", - "Active accounts" : "Active accounts", - "None of your currently installed apps provide custom Text processing functionality." : "None of your currently installed apps provide custom Text processing functionality." + "Active accounts" : "Active accounts" },"pluralForm" :"nplurals=2; plural=(n != 1);" }
\ No newline at end of file diff --git a/apps/settings/l10n/es.js b/apps/settings/l10n/es.js index ead74bdb2b9..080fa1f2042 100644 --- a/apps/settings/l10n/es.js +++ b/apps/settings/l10n/es.js @@ -72,6 +72,7 @@ OC.L10N.register( "Email could not be sent. Check your mail server log" : "No se ha podido enviar el correo. Compruebe el registro del servidor de correo", "A problem occurred while sending the email. Please revise your settings. (Error: %s)" : "Ha ocurrido un problema al enviar el mensaje de correo electrónico. Revisa tu configuración. (Error: %s)", "You need to set your account email before being able to send test emails. Go to %s for that." : "Necesita establecer el correo electrónico de su cuenta antes de poder enviar correos de prueba. Vaya a %s para hacerlo.", + "Recently active" : "Activos recientemente", "Disabled accounts" : "Cuentas deshabilitadas", "Invalid account" : "Cuenta inválida", "Invalid mail address" : "Dirección de correo no válido", @@ -124,6 +125,11 @@ OC.L10N.register( "Background jobs" : "Trabajos en segundo plano", "Unlimited" : "Ilimitado", "Verifying" : "Verificar", + "Allowed admin IP ranges" : "Rangos de IP permitidos para administración", + "Admin IP filtering isn’t applied." : "No se ha aplicado ningún filtrado de IPs para administración.", + "Configuration key \"%1$s\" expects an array (%2$s found). Admin IP range validation will not be applied." : "El parámetro de configuración \"%1$s\" espera un arreglo (se encontró %2$s). No se aplicará la validación de rangos de IP para administración.", + "Configuration key \"%1$s\" contains invalid IP range(s): \"%2$s\"" : "El parámetro de configuración \"%1$s\" contiene rangos de IP inválido(as): \"%2$s\"", + "Admin IP filtering is correctly configured." : "El filtrado de rangos de IP para administración está correctamente configurado.", "App directories owner" : "Propietario de los directorios de aplicaciones", "Some app directories are owned by a different user than the web server one. This may be the case if apps have been installed manually. Check the permissions of the following app directories:\n%s" : "Algunos directorios de aplicaciones son propiedad de un usuario diferente al del servidor web. Esto puede ocurrir si las aplicaciones se han instalado manualmente. Compruebe los permisos de los siguientes directorios de aplicaciones:\n%s", "App directories have the correct owner \"%s\"" : "Los directorios de aplicaciones tienen al propietario correcto \"%s\"", @@ -131,6 +137,7 @@ OC.L10N.register( "Your remote address could not be determined." : "No se pudo determinar su dirección remota.", "Your remote address was identified as \"%s\" and is brute-force throttled at the moment slowing down the performance of various requests. If the remote address is not your address this can be an indication that a proxy is not configured correctly." : "Su dirección remota se ha identificado como \"%s\" y está siendo ralentizada mediante fuerza bruta, disminuyendo el rendimiento de varias solicitudes. Si la dirección remota no es su dirección, esto puede ser una señal de que un proxy no se ha configurado correctamente.", "Your remote address \"%s\" is not brute-force throttled." : "Su dirección remota \"%s\" no está limitada por fuerza bruta.", + "To allow this check to run you have to make sure that your Web server can connect to itself. Therefore it must be able to resolve and connect to at least one of its `trusted_domains` or the `overwrite.cli.url`. This failure may be the result of a server-side DNS mismatch or outbound firewall rule." : "Para permitir que este chequeo se lleve a cabo, debe asegurarse que su servidor pueda conectarse a sí mismo. Por tanto, este debe poder resolver y conectarse a alguno de sus `trusted_domains` o al url definido en `overwrite.cli.url`. Este fallo puede ser resultado de una inconsistencia DNS del lado del servidor o una regla de salida del cortafuegos.", "Old administration imported certificates" : "Certificados de administración antiguos importados", "A background job is pending that checks for administration imported SSL certificates. Please check back later." : "Está pendiente una tarea en segundo plano que comprueba los certificados SSL de administración importados. Por favor, vuelva a verificar más tarde.", "There are some administration imported SSL certificates present, that are not used anymore with Nextcloud 21. They can be imported on the command line via \"occ security:certificates:import\" command. Their paths inside the data directory are shown below." : "Están presentes algunos certificados SSL de administración importados, que, ya no se utilizan con Nextcloud 21. Pueden ser importados usando la línea de comandos con \"occ security:certificates:import\". Sus rutas dentro del directorio de datos se muestran a continuación.", @@ -151,6 +158,9 @@ OC.L10N.register( "Missing optional column \"%s\" in table \"%s\"." : "Falta la columna opcional \"%s\" en la tabla \"%s\".", "The database is missing some optional columns. Due to the fact that adding columns on big tables could take some time they were not added automatically when they can be optional. By running \"occ db:add-missing-columns\" those missing columns could be added manually while the instance keeps running. Once the columns are added some features might improve responsiveness or usability." : "A la base de datos le faltan algunas columnas opcionales. Debido al hecho de que agregar columnas en tablas grandes podría llevar mucho tiempo, estas no se agregaron automáticamente cuando pueden ser opcionales. Al ejecutar \"occ db:add-missing-columns\", estas columnas faltantes se pueden agregar manualmente mientras la instancia sigue en ejecución. Una vez que se agreguen las columnas, algunas características podrían mejorar su capacidad de respuesta o la usabilidad.", "Database missing indices" : "Faltan índices en la base de datos", + "Missing indices:" : "Índices faltantes:", + "\"%s\" in table \"%s\"" : "\"%s\" en tabla \"%s\"", + "Detected some missing optional indices. Occasionally new indices are added (by Nextcloud or installed applications) to improve database performance. Adding indices can sometimes take awhile and temporarily hurt performance so this is not done automatically during upgrades. Once the indices are added, queries to those tables should be faster. Use the command `occ db:add-missing-indices` to add them. " : "Se detectaron algunos índices opcionales faltantes. Ocasionalmente, se añaden nuevos índices (bien sea por Nextcloud o por las aplicaciones instaladas) para mejorar el rendimiento de la base de datos. Añadir índices algunas veces puede tomar un tiempo, y, afectar el rendimiento temporalmente, así que esto no se hace de manera automática durante las actualizaciones. Una vez que los índices son añadidos, las consultas a esas tablas deben ser más rápidas. Use el comando `occ db:add-missing-indices` para añadirlos.", "Database missing primary keys" : "Faltan claves primarias en la base de datos", "Missing primary key on table \"%s\"." : "Falta la clave primaria en la tabla \"%s\".", "The database is missing some primary keys. Due to the fact that adding primary keys on big tables could take some time they were not added automatically. By running \"occ db:add-missing-primary-keys\" those missing primary keys could be added manually while the instance keeps running." : "A la base de datos le faltan algunas claves primarias. Debido a que añadir claves primarias en tablas grandes podría llevar mucho tiempo, no se añadieron automáticamente. Al ejecutar \"occ db:add-missing-primary-keys\" esas claves primarias faltantes podrían ser añadidas manualmente mientras la instancia sigue funcionando.", @@ -176,11 +186,14 @@ OC.L10N.register( "HTTPS access and URLs" : "Acceso HTTPS y URLs", "Accessing site insecurely via HTTP. You are strongly advised to set up your server to require HTTPS instead. Without it some important web functionality like \"copy to clipboard\" or \"service workers\" will not work!" : "Se está accediendo al sitio de manera insegura mediante HTTP. Se recomienda encarecidamente que configure su servidor para que requiera HTTP. ¡Sin ello, algunas funciones importantes de la web como \"copiar al portapapeles\" o \"service workers\" no funcionarán!", "Accessing site insecurely via HTTP." : "Accediendo al sitio de manera insegura mediante HTTP.", + "You are accessing your instance over a secure connection, however your instance is generating insecure URLs. This likely means that your instance is behind a reverse proxy and the Nextcloud `overwrite*` config values are not set correctly." : "Está accediendo a su instancia a través de una conexión segura, sin embargo, su instancia está generando URLs inseguras. Esto suele significar que está tras un proxy inverso y que los valores de configuración `overwrite*` no están bien configurados.", + "Your instance is generating insecure URLs. If you access your instance over HTTPS, this likely means that your instance is behind a reverse proxy and the Nextcloud `overwrite*` config values are not set correctly." : "Su instancia está generando URLs inseguras, Si accede a su instancia a través de HTTPS, esto podría significar que su instancia está tras un proxy inverso y que los valores de configuración Nexcloud `overwrite*` no están bien configurados.", "You are accessing your instance over a secure connection, and your instance is generating secure URLs." : "Está accediendo a su instancia mediante una conexión segura, y su instancia está generando URLs seguros.", "Internet connectivity" : "Conexión a Internet", "Internet connectivity is disabled in configuration file." : "La conexión a Internet está deshabilitada en el archivo de configuración.", "This server has no working internet connection: Multiple endpoints could not be reached. This means that some of the features like mounting external storage, notifications about updates or installation of third-party apps will not work. Accessing files remotely and sending of notification emails might not work, either. Establish a connection from this server to the internet to enjoy all features." : "Este servidor no tiene una conexión a Internet que funcione: No se pudieron alcanzar varios endpoints. Esto significa que algunas de las funciones, como montar almacenamiento externo, notificaciones sobre actualizaciones o instalación de aplicaciones de terceros no funcionarán. Es posible que el acceso a archivos de forma remota y el envío de emails de notificación tampoco funcionen. Establezca una conexión desde este servidor a Internet para disfrutar de todas las funciones.", "JavaScript modules support" : "Soporte a módulos JavaScript", + "Unable to run check for JavaScript support. Please remedy or confirm manually if your webserver serves `.mjs` files using the JavaScript MIME type." : "No se pudo hacer el chequeo del soporte JavaScript. Por favor remedie el problema, o, confirme manualmente si su servidor web sirve archivos `.mjs` utilizando el tipo MIME JavaScript.", "Your webserver does not serve `.mjs` files using the JavaScript MIME type. This will break some apps by preventing browsers from executing the JavaScript files. You should configure your webserver to serve `.mjs` files with either the `text/javascript` or `application/javascript` MIME type." : "Su servidor web no sirve archivos `.mjs` utilizando el tipo MIME JavaScript. Esto causará problemas con algunas apps, impidiendo que los navegadores ejecuten los archivos JavaScript. Debe configurar su servidor web para servir archivos `.mjs` bien sea con el tipo MIME `text/javascript`, o, `application/javascript`.", "JavaScript source map support" : "Soporte de mapa fuente de JavaScript", "Your webserver is not set up to serve `.js.map` files. Without these files, JavaScript Source Maps won't function properly, making it more challenging to troubleshoot and debug any issues that may arise." : "Su servidor web no está configurado para servir archivos `.js.map`. Sin estos archivos, los mapas de fuente JavaScript no funcionarán apropiadamente, haciendo más difícil la resolución y depuración de problemas que puedan surgir.", @@ -191,8 +204,12 @@ OC.L10N.register( "Server has no maintenance window start time configured. This means resource intensive daily background jobs will also be executed during your main usage time. We recommend to set it to a time of low usage, so users are less impacted by the load caused from these heavy tasks." : "El servidor no tiene un tiempo de inicio de la ventana de mantenimiento configurado. Esto significa que los trabajos en segundo plano diarios que consumen recursos de manera intensiva serán ejecutados durante el tiempo regular de uso. Recomendamos establecerlo a una franja horaria de poco uso, de manera que el impacto a los usuarios disminuya por la carga causada a raíz estas tareas intensivas.", "Maintenance window to execute heavy background jobs is between {start}:00 UTC and {end}:00 UTC" : "La ventana de mantenimiento para ejecutar trabajos en segundo plano intensivos está entre {start}:00 UTC y {end}:00 UTC", "Memcache" : "Memcache", + "Memcached is configured as distributed cache, but the wrong PHP module (\"memcache\") is installed. Please install the PHP module \"memcached\"." : "Memcached está configurado como un caché distribuido, pero el módulo PHP incorrecto (memcache) está instalado. Por favor, instale el módulo PHP \"memcached\".", + "Memcached is configured as distributed cache, but the PHP module \"memcached\" is not installed. Please install the PHP module \"memcached\"." : "Memcached está configurado como un caché distribuido, pero el módulo PHP \"memcached\" no está instalado. Por favor, instale el módulo PHP \"memcached\".", "No memory cache has been configured. To enhance performance, please configure a memcache, if available." : "No hay un caché en memoria configurado. Para mejorar el rendimiento, configura memcache, si está disponible.", "Configured" : "Configurado", + "Mimetype migrations available" : "Están disponibles las migraciones del tipo MIME", + "One or more mimetype migrations are available. Occasionally new mimetypes are added to better handle certain file types. Migrating the mimetypes take a long time on larger instances so this is not done automatically during upgrades. Use the command `occ maintenance:repair --include-expensive` to perform the migrations." : "Una o más migraciones del tipo MIME están disponibles. Ocasionalmente, nuevos tipos MIME se añaden para manejar de una manera más adecuada ciertos tipos de archivo. Migrar los tipos MIME puede tomar un tiempo considerable en instancias grandes así que esto no se hace de manera automática durante las actualizaciones. Use el comando `occ maintenance:repair --include-expensive` para realizar las migraciones.", "MySQL Unicode support" : "Soporte Unicode de MySQL", "You are not using MySQL" : "No está usando MySQL", "MySQL is used as database and does support 4-byte characters" : "MySQL se está utilizando como base de datos y soportar caracteres de 4 bytes", @@ -204,6 +221,9 @@ OC.L10N.register( "The \"overwrite.cli.url\" option in your config.php is correctly set to \"%s\"." : "La opción \"overwrite.cli.url\" en su config.php está correctamente establecida como \"%s\".", "The \"overwrite.cli.url\" option in your config.php is set to \"%s\" which is a correct URL. Suggested URL is \"%s\"." : "La opción \"overwrite.cli.url\" en su config.php está establecida como \"%s\". que es una URL correcta. La URL sugerida es \"%s\",", "Please make sure to set the \"overwrite.cli.url\" option in your config.php file to the URL that your users mainly use to access this Nextcloud. Suggestion: \"%s\". Otherwise there might be problems with the URL generation via cron. (It is possible though that the suggested URL is not the URL that your users mainly use to access this Nextcloud. Best is to double check this in any case.)" : "Asegúrese de establecer la opción \"overwrite.cli.url\" en su archivo config.php con la URL que sus usuarios suelen utilizar para acceder a Nextcloud. Sugerencia: \"%s\". De lo contrario, podría haber problemas con la generación de URLs a través de cron. (Sin embargo, es posible que la URL sugerida no sea la que sus usuarios suelen utilizar para acceder a Nextcloud. Lo mejor es verificar esto en cualquier caso.)", + "PHP APCu configuration" : "Configuración de PHP APCu", + "Your APCu cache has been running full, consider increasing the apc.shm_size php setting." : "Su caché APCu ha estado cache ha estado funcionando a máxima capacidad, considere incrementar el ajuste apc.shm_size de php.", + "Your APCu cache is almost full at %s%%, consider increasing the apc.shm_size php setting." : "Su caché APCu está casi al máximo a %s%%, considere incrementar el ajuste apc.shm_size de php.", "PHP default charset" : "Conjunto de caracteres predeterminado de PHP", "PHP configuration option \"default_charset\" should be UTF-8" : "La opción de configuración PHP \"default_charset\" debería ser UTF-8", "PHP set_time_limit" : "set_time_limit en PHP", @@ -234,6 +254,7 @@ OC.L10N.register( "The OPcache interned strings buffer is nearly full. To assure that repeating strings can be effectively cached, it is recommended to apply \"opcache.interned_strings_buffer\" to your PHP configuration with a value higher than \"%s\"." : "El búfer de cadenas internadas de OPcache está casi lleno. Para asegurarse de que las cadenas repetidas puedan ser almacenadas en caché de manera efectiva, se recomienda añadir \"opcache.interned_strings_buffer\" a la configuración de PHP con un valor superior a \"%s\".", "OPcache is configured to remove code comments. With OPcache enabled, \"opcache.save_comments=1\" must be set for Nextcloud to function." : "OPcache está configurado para eliminar comentarios en el código. Con OPcache activado, se debe establecer \"opcache.save_comments=1\" para que Nextcloud funcione.", "Nextcloud is not allowed to use the OPcache API. With OPcache enabled, it is highly recommended to include all Nextcloud directories with \"opcache.restrict_api\" or unset this setting to disable OPcache API restrictions, to prevent errors during Nextcloud core or app upgrades." : "Nextcloud no tiene permiso para utilizar la API de OPcache. Con OPcache habilitado, es altamente recomendado incluir todos los directorios de Nextcloud con \"opcache.restrict_api\" o deshabilitar este ajuste para desactivar las restricciones de la API de OPcache, para prevenir errores durante las actualizaciones base de Nextcloud o de las aplicaciones.", + "Checking from CLI, OPcache checks have been skipped." : "Haciendo el chequeo desde línea de comandos, los chequeos de OPcache han sido omitidos.", "The PHP OPcache module is not properly configured. %s." : "El módulo PHP OPcache no está configurado correctamente %s.", "Correctly configured" : "Correctamente configurado", "PHP version" : "Versión PHP", @@ -251,6 +272,9 @@ OC.L10N.register( "Configuration file access rights" : "Configuración de permisos de archivos", "The read-only config has been enabled. This prevents setting some configurations via the web-interface. Furthermore, the file needs to be made writable manually for every update." : "Se ha activado la configuración de solo lectura. Esto evita cambiar ciertas configuraciones vía la interfaz web. Además, el archivo debe hacerse escribible de manera manual para cada actualización.", "Nextcloud configuration file is writable" : "Se puede escribir al archivo de configuración de Nextcloud", + "Scheduling objects table size" : "Tamaño de tabla para objetos de calendario", + "You have more than %s rows in the scheduling objects table. Please run the expensive repair jobs via occ maintenance:repair --include-expensive." : "Tiene más de %s filas en la tabla de objetos de calendario. Por favor, ejecute los trabajos de reparación complejos a través del comando occ maintenance:repair --include-expensive.", + "Scheduling objects table size is within acceptable range." : "El tamaño de la tabla para objetos de calendario está dentro de un rango aceptable.", "HTTP headers" : "Encabezados HTTP", "- The `%1$s` HTTP header is not set to `%2$s`. Some features might not work correctly, as it is recommended to adjust this setting accordingly." : "- El encabezado HTTP `%1$s` no está configurado a `%2$s`. Algunas características podrían no funcionar correctamente, por lo que se recomienda ajustar esta configuración adecuadamente.", "- The `%1$s` HTTP header is not set to `%2$s`. This is a potential security or privacy risk, as it is recommended to adjust this setting accordingly." : "- El encabezado HTTP `%1$s` no está configurado a `%2$s`. Este es un riesgo potencial de seguridad o privacidad, por lo que se recomienda ajustar esta configuración adecuadamente.", @@ -264,6 +288,8 @@ OC.L10N.register( "Could not check that your web server serves security headers correctly, unable to query `%s`" : "No se pudo verificar que su servidor web sirve los encabezados de seguridad correctamente, no fue posible consultar `%s`", "Your server is correctly configured to send security headers." : "Su servidor está correctamente configurado para enviar los encabezados de seguridad.", "Database version" : "Versión de base de datos", + "MariaDB version 10.3 detected, this version is end-of-life and only supported as part of Ubuntu 20.04. MariaDB >=%1$s and <=%2$s is suggested for best performance, stability and functionality with this version of Nextcloud." : "Se detectó la version 10.3 de MariaDB, esta versión ya está en end-of-life y sólo está soportada por Ubuntu 20.04. Se sugiere utilizar MariaDB >=%1$s and <=%2$s para un mejor rendimiento, estabilidad y funcionalidad con esta versión de Nextcloud.", + "MariaDB version \"%1$s\" detected. MariaDB >=%2$s and <=%3$s is suggested for best performance, stability and functionality with this version of Nextcloud." : "Se detectó la versión \"%1$s\" de MariaDB. Se sugiere utilizar una versión de MariaDB entre >=%2$s y <=%3$s para un mejor rendimiento, estabilidad y funcionalidad con esta versión de Nextcloud.", "SQLite is currently being used as the backend database. For larger installations we recommend that you switch to a different database backend. This is particularly recommended when using the desktop client for file synchronisation. To migrate to another database use the command line tool: \"occ db:convert-type\"." : "SQLite se está utilizando actualmente como la base de datos principal. Para instalaciones más grandes, recomendamos que cambie a una base de datos principal diferente. Esto es particularmente recomendado cuando se utiliza el cliente de escritorio para la sincronización de archivos. Para migrar a otra base de datos, utilice la herramienta de línea de comandos: \"occ db:convert-type\".", "Unknown database platform" : "Plataforma de base de datos desconocida", "Architecture" : "Arquitectura", diff --git a/apps/settings/l10n/es.json b/apps/settings/l10n/es.json index 12032ed6981..2d931e5b67a 100644 --- a/apps/settings/l10n/es.json +++ b/apps/settings/l10n/es.json @@ -70,6 +70,7 @@ "Email could not be sent. Check your mail server log" : "No se ha podido enviar el correo. Compruebe el registro del servidor de correo", "A problem occurred while sending the email. Please revise your settings. (Error: %s)" : "Ha ocurrido un problema al enviar el mensaje de correo electrónico. Revisa tu configuración. (Error: %s)", "You need to set your account email before being able to send test emails. Go to %s for that." : "Necesita establecer el correo electrónico de su cuenta antes de poder enviar correos de prueba. Vaya a %s para hacerlo.", + "Recently active" : "Activos recientemente", "Disabled accounts" : "Cuentas deshabilitadas", "Invalid account" : "Cuenta inválida", "Invalid mail address" : "Dirección de correo no válido", @@ -122,6 +123,11 @@ "Background jobs" : "Trabajos en segundo plano", "Unlimited" : "Ilimitado", "Verifying" : "Verificar", + "Allowed admin IP ranges" : "Rangos de IP permitidos para administración", + "Admin IP filtering isn’t applied." : "No se ha aplicado ningún filtrado de IPs para administración.", + "Configuration key \"%1$s\" expects an array (%2$s found). Admin IP range validation will not be applied." : "El parámetro de configuración \"%1$s\" espera un arreglo (se encontró %2$s). No se aplicará la validación de rangos de IP para administración.", + "Configuration key \"%1$s\" contains invalid IP range(s): \"%2$s\"" : "El parámetro de configuración \"%1$s\" contiene rangos de IP inválido(as): \"%2$s\"", + "Admin IP filtering is correctly configured." : "El filtrado de rangos de IP para administración está correctamente configurado.", "App directories owner" : "Propietario de los directorios de aplicaciones", "Some app directories are owned by a different user than the web server one. This may be the case if apps have been installed manually. Check the permissions of the following app directories:\n%s" : "Algunos directorios de aplicaciones son propiedad de un usuario diferente al del servidor web. Esto puede ocurrir si las aplicaciones se han instalado manualmente. Compruebe los permisos de los siguientes directorios de aplicaciones:\n%s", "App directories have the correct owner \"%s\"" : "Los directorios de aplicaciones tienen al propietario correcto \"%s\"", @@ -129,6 +135,7 @@ "Your remote address could not be determined." : "No se pudo determinar su dirección remota.", "Your remote address was identified as \"%s\" and is brute-force throttled at the moment slowing down the performance of various requests. If the remote address is not your address this can be an indication that a proxy is not configured correctly." : "Su dirección remota se ha identificado como \"%s\" y está siendo ralentizada mediante fuerza bruta, disminuyendo el rendimiento de varias solicitudes. Si la dirección remota no es su dirección, esto puede ser una señal de que un proxy no se ha configurado correctamente.", "Your remote address \"%s\" is not brute-force throttled." : "Su dirección remota \"%s\" no está limitada por fuerza bruta.", + "To allow this check to run you have to make sure that your Web server can connect to itself. Therefore it must be able to resolve and connect to at least one of its `trusted_domains` or the `overwrite.cli.url`. This failure may be the result of a server-side DNS mismatch or outbound firewall rule." : "Para permitir que este chequeo se lleve a cabo, debe asegurarse que su servidor pueda conectarse a sí mismo. Por tanto, este debe poder resolver y conectarse a alguno de sus `trusted_domains` o al url definido en `overwrite.cli.url`. Este fallo puede ser resultado de una inconsistencia DNS del lado del servidor o una regla de salida del cortafuegos.", "Old administration imported certificates" : "Certificados de administración antiguos importados", "A background job is pending that checks for administration imported SSL certificates. Please check back later." : "Está pendiente una tarea en segundo plano que comprueba los certificados SSL de administración importados. Por favor, vuelva a verificar más tarde.", "There are some administration imported SSL certificates present, that are not used anymore with Nextcloud 21. They can be imported on the command line via \"occ security:certificates:import\" command. Their paths inside the data directory are shown below." : "Están presentes algunos certificados SSL de administración importados, que, ya no se utilizan con Nextcloud 21. Pueden ser importados usando la línea de comandos con \"occ security:certificates:import\". Sus rutas dentro del directorio de datos se muestran a continuación.", @@ -149,6 +156,9 @@ "Missing optional column \"%s\" in table \"%s\"." : "Falta la columna opcional \"%s\" en la tabla \"%s\".", "The database is missing some optional columns. Due to the fact that adding columns on big tables could take some time they were not added automatically when they can be optional. By running \"occ db:add-missing-columns\" those missing columns could be added manually while the instance keeps running. Once the columns are added some features might improve responsiveness or usability." : "A la base de datos le faltan algunas columnas opcionales. Debido al hecho de que agregar columnas en tablas grandes podría llevar mucho tiempo, estas no se agregaron automáticamente cuando pueden ser opcionales. Al ejecutar \"occ db:add-missing-columns\", estas columnas faltantes se pueden agregar manualmente mientras la instancia sigue en ejecución. Una vez que se agreguen las columnas, algunas características podrían mejorar su capacidad de respuesta o la usabilidad.", "Database missing indices" : "Faltan índices en la base de datos", + "Missing indices:" : "Índices faltantes:", + "\"%s\" in table \"%s\"" : "\"%s\" en tabla \"%s\"", + "Detected some missing optional indices. Occasionally new indices are added (by Nextcloud or installed applications) to improve database performance. Adding indices can sometimes take awhile and temporarily hurt performance so this is not done automatically during upgrades. Once the indices are added, queries to those tables should be faster. Use the command `occ db:add-missing-indices` to add them. " : "Se detectaron algunos índices opcionales faltantes. Ocasionalmente, se añaden nuevos índices (bien sea por Nextcloud o por las aplicaciones instaladas) para mejorar el rendimiento de la base de datos. Añadir índices algunas veces puede tomar un tiempo, y, afectar el rendimiento temporalmente, así que esto no se hace de manera automática durante las actualizaciones. Una vez que los índices son añadidos, las consultas a esas tablas deben ser más rápidas. Use el comando `occ db:add-missing-indices` para añadirlos.", "Database missing primary keys" : "Faltan claves primarias en la base de datos", "Missing primary key on table \"%s\"." : "Falta la clave primaria en la tabla \"%s\".", "The database is missing some primary keys. Due to the fact that adding primary keys on big tables could take some time they were not added automatically. By running \"occ db:add-missing-primary-keys\" those missing primary keys could be added manually while the instance keeps running." : "A la base de datos le faltan algunas claves primarias. Debido a que añadir claves primarias en tablas grandes podría llevar mucho tiempo, no se añadieron automáticamente. Al ejecutar \"occ db:add-missing-primary-keys\" esas claves primarias faltantes podrían ser añadidas manualmente mientras la instancia sigue funcionando.", @@ -174,11 +184,14 @@ "HTTPS access and URLs" : "Acceso HTTPS y URLs", "Accessing site insecurely via HTTP. You are strongly advised to set up your server to require HTTPS instead. Without it some important web functionality like \"copy to clipboard\" or \"service workers\" will not work!" : "Se está accediendo al sitio de manera insegura mediante HTTP. Se recomienda encarecidamente que configure su servidor para que requiera HTTP. ¡Sin ello, algunas funciones importantes de la web como \"copiar al portapapeles\" o \"service workers\" no funcionarán!", "Accessing site insecurely via HTTP." : "Accediendo al sitio de manera insegura mediante HTTP.", + "You are accessing your instance over a secure connection, however your instance is generating insecure URLs. This likely means that your instance is behind a reverse proxy and the Nextcloud `overwrite*` config values are not set correctly." : "Está accediendo a su instancia a través de una conexión segura, sin embargo, su instancia está generando URLs inseguras. Esto suele significar que está tras un proxy inverso y que los valores de configuración `overwrite*` no están bien configurados.", + "Your instance is generating insecure URLs. If you access your instance over HTTPS, this likely means that your instance is behind a reverse proxy and the Nextcloud `overwrite*` config values are not set correctly." : "Su instancia está generando URLs inseguras, Si accede a su instancia a través de HTTPS, esto podría significar que su instancia está tras un proxy inverso y que los valores de configuración Nexcloud `overwrite*` no están bien configurados.", "You are accessing your instance over a secure connection, and your instance is generating secure URLs." : "Está accediendo a su instancia mediante una conexión segura, y su instancia está generando URLs seguros.", "Internet connectivity" : "Conexión a Internet", "Internet connectivity is disabled in configuration file." : "La conexión a Internet está deshabilitada en el archivo de configuración.", "This server has no working internet connection: Multiple endpoints could not be reached. This means that some of the features like mounting external storage, notifications about updates or installation of third-party apps will not work. Accessing files remotely and sending of notification emails might not work, either. Establish a connection from this server to the internet to enjoy all features." : "Este servidor no tiene una conexión a Internet que funcione: No se pudieron alcanzar varios endpoints. Esto significa que algunas de las funciones, como montar almacenamiento externo, notificaciones sobre actualizaciones o instalación de aplicaciones de terceros no funcionarán. Es posible que el acceso a archivos de forma remota y el envío de emails de notificación tampoco funcionen. Establezca una conexión desde este servidor a Internet para disfrutar de todas las funciones.", "JavaScript modules support" : "Soporte a módulos JavaScript", + "Unable to run check for JavaScript support. Please remedy or confirm manually if your webserver serves `.mjs` files using the JavaScript MIME type." : "No se pudo hacer el chequeo del soporte JavaScript. Por favor remedie el problema, o, confirme manualmente si su servidor web sirve archivos `.mjs` utilizando el tipo MIME JavaScript.", "Your webserver does not serve `.mjs` files using the JavaScript MIME type. This will break some apps by preventing browsers from executing the JavaScript files. You should configure your webserver to serve `.mjs` files with either the `text/javascript` or `application/javascript` MIME type." : "Su servidor web no sirve archivos `.mjs` utilizando el tipo MIME JavaScript. Esto causará problemas con algunas apps, impidiendo que los navegadores ejecuten los archivos JavaScript. Debe configurar su servidor web para servir archivos `.mjs` bien sea con el tipo MIME `text/javascript`, o, `application/javascript`.", "JavaScript source map support" : "Soporte de mapa fuente de JavaScript", "Your webserver is not set up to serve `.js.map` files. Without these files, JavaScript Source Maps won't function properly, making it more challenging to troubleshoot and debug any issues that may arise." : "Su servidor web no está configurado para servir archivos `.js.map`. Sin estos archivos, los mapas de fuente JavaScript no funcionarán apropiadamente, haciendo más difícil la resolución y depuración de problemas que puedan surgir.", @@ -189,8 +202,12 @@ "Server has no maintenance window start time configured. This means resource intensive daily background jobs will also be executed during your main usage time. We recommend to set it to a time of low usage, so users are less impacted by the load caused from these heavy tasks." : "El servidor no tiene un tiempo de inicio de la ventana de mantenimiento configurado. Esto significa que los trabajos en segundo plano diarios que consumen recursos de manera intensiva serán ejecutados durante el tiempo regular de uso. Recomendamos establecerlo a una franja horaria de poco uso, de manera que el impacto a los usuarios disminuya por la carga causada a raíz estas tareas intensivas.", "Maintenance window to execute heavy background jobs is between {start}:00 UTC and {end}:00 UTC" : "La ventana de mantenimiento para ejecutar trabajos en segundo plano intensivos está entre {start}:00 UTC y {end}:00 UTC", "Memcache" : "Memcache", + "Memcached is configured as distributed cache, but the wrong PHP module (\"memcache\") is installed. Please install the PHP module \"memcached\"." : "Memcached está configurado como un caché distribuido, pero el módulo PHP incorrecto (memcache) está instalado. Por favor, instale el módulo PHP \"memcached\".", + "Memcached is configured as distributed cache, but the PHP module \"memcached\" is not installed. Please install the PHP module \"memcached\"." : "Memcached está configurado como un caché distribuido, pero el módulo PHP \"memcached\" no está instalado. Por favor, instale el módulo PHP \"memcached\".", "No memory cache has been configured. To enhance performance, please configure a memcache, if available." : "No hay un caché en memoria configurado. Para mejorar el rendimiento, configura memcache, si está disponible.", "Configured" : "Configurado", + "Mimetype migrations available" : "Están disponibles las migraciones del tipo MIME", + "One or more mimetype migrations are available. Occasionally new mimetypes are added to better handle certain file types. Migrating the mimetypes take a long time on larger instances so this is not done automatically during upgrades. Use the command `occ maintenance:repair --include-expensive` to perform the migrations." : "Una o más migraciones del tipo MIME están disponibles. Ocasionalmente, nuevos tipos MIME se añaden para manejar de una manera más adecuada ciertos tipos de archivo. Migrar los tipos MIME puede tomar un tiempo considerable en instancias grandes así que esto no se hace de manera automática durante las actualizaciones. Use el comando `occ maintenance:repair --include-expensive` para realizar las migraciones.", "MySQL Unicode support" : "Soporte Unicode de MySQL", "You are not using MySQL" : "No está usando MySQL", "MySQL is used as database and does support 4-byte characters" : "MySQL se está utilizando como base de datos y soportar caracteres de 4 bytes", @@ -202,6 +219,9 @@ "The \"overwrite.cli.url\" option in your config.php is correctly set to \"%s\"." : "La opción \"overwrite.cli.url\" en su config.php está correctamente establecida como \"%s\".", "The \"overwrite.cli.url\" option in your config.php is set to \"%s\" which is a correct URL. Suggested URL is \"%s\"." : "La opción \"overwrite.cli.url\" en su config.php está establecida como \"%s\". que es una URL correcta. La URL sugerida es \"%s\",", "Please make sure to set the \"overwrite.cli.url\" option in your config.php file to the URL that your users mainly use to access this Nextcloud. Suggestion: \"%s\". Otherwise there might be problems with the URL generation via cron. (It is possible though that the suggested URL is not the URL that your users mainly use to access this Nextcloud. Best is to double check this in any case.)" : "Asegúrese de establecer la opción \"overwrite.cli.url\" en su archivo config.php con la URL que sus usuarios suelen utilizar para acceder a Nextcloud. Sugerencia: \"%s\". De lo contrario, podría haber problemas con la generación de URLs a través de cron. (Sin embargo, es posible que la URL sugerida no sea la que sus usuarios suelen utilizar para acceder a Nextcloud. Lo mejor es verificar esto en cualquier caso.)", + "PHP APCu configuration" : "Configuración de PHP APCu", + "Your APCu cache has been running full, consider increasing the apc.shm_size php setting." : "Su caché APCu ha estado cache ha estado funcionando a máxima capacidad, considere incrementar el ajuste apc.shm_size de php.", + "Your APCu cache is almost full at %s%%, consider increasing the apc.shm_size php setting." : "Su caché APCu está casi al máximo a %s%%, considere incrementar el ajuste apc.shm_size de php.", "PHP default charset" : "Conjunto de caracteres predeterminado de PHP", "PHP configuration option \"default_charset\" should be UTF-8" : "La opción de configuración PHP \"default_charset\" debería ser UTF-8", "PHP set_time_limit" : "set_time_limit en PHP", @@ -232,6 +252,7 @@ "The OPcache interned strings buffer is nearly full. To assure that repeating strings can be effectively cached, it is recommended to apply \"opcache.interned_strings_buffer\" to your PHP configuration with a value higher than \"%s\"." : "El búfer de cadenas internadas de OPcache está casi lleno. Para asegurarse de que las cadenas repetidas puedan ser almacenadas en caché de manera efectiva, se recomienda añadir \"opcache.interned_strings_buffer\" a la configuración de PHP con un valor superior a \"%s\".", "OPcache is configured to remove code comments. With OPcache enabled, \"opcache.save_comments=1\" must be set for Nextcloud to function." : "OPcache está configurado para eliminar comentarios en el código. Con OPcache activado, se debe establecer \"opcache.save_comments=1\" para que Nextcloud funcione.", "Nextcloud is not allowed to use the OPcache API. With OPcache enabled, it is highly recommended to include all Nextcloud directories with \"opcache.restrict_api\" or unset this setting to disable OPcache API restrictions, to prevent errors during Nextcloud core or app upgrades." : "Nextcloud no tiene permiso para utilizar la API de OPcache. Con OPcache habilitado, es altamente recomendado incluir todos los directorios de Nextcloud con \"opcache.restrict_api\" o deshabilitar este ajuste para desactivar las restricciones de la API de OPcache, para prevenir errores durante las actualizaciones base de Nextcloud o de las aplicaciones.", + "Checking from CLI, OPcache checks have been skipped." : "Haciendo el chequeo desde línea de comandos, los chequeos de OPcache han sido omitidos.", "The PHP OPcache module is not properly configured. %s." : "El módulo PHP OPcache no está configurado correctamente %s.", "Correctly configured" : "Correctamente configurado", "PHP version" : "Versión PHP", @@ -249,6 +270,9 @@ "Configuration file access rights" : "Configuración de permisos de archivos", "The read-only config has been enabled. This prevents setting some configurations via the web-interface. Furthermore, the file needs to be made writable manually for every update." : "Se ha activado la configuración de solo lectura. Esto evita cambiar ciertas configuraciones vía la interfaz web. Además, el archivo debe hacerse escribible de manera manual para cada actualización.", "Nextcloud configuration file is writable" : "Se puede escribir al archivo de configuración de Nextcloud", + "Scheduling objects table size" : "Tamaño de tabla para objetos de calendario", + "You have more than %s rows in the scheduling objects table. Please run the expensive repair jobs via occ maintenance:repair --include-expensive." : "Tiene más de %s filas en la tabla de objetos de calendario. Por favor, ejecute los trabajos de reparación complejos a través del comando occ maintenance:repair --include-expensive.", + "Scheduling objects table size is within acceptable range." : "El tamaño de la tabla para objetos de calendario está dentro de un rango aceptable.", "HTTP headers" : "Encabezados HTTP", "- The `%1$s` HTTP header is not set to `%2$s`. Some features might not work correctly, as it is recommended to adjust this setting accordingly." : "- El encabezado HTTP `%1$s` no está configurado a `%2$s`. Algunas características podrían no funcionar correctamente, por lo que se recomienda ajustar esta configuración adecuadamente.", "- The `%1$s` HTTP header is not set to `%2$s`. This is a potential security or privacy risk, as it is recommended to adjust this setting accordingly." : "- El encabezado HTTP `%1$s` no está configurado a `%2$s`. Este es un riesgo potencial de seguridad o privacidad, por lo que se recomienda ajustar esta configuración adecuadamente.", @@ -262,6 +286,8 @@ "Could not check that your web server serves security headers correctly, unable to query `%s`" : "No se pudo verificar que su servidor web sirve los encabezados de seguridad correctamente, no fue posible consultar `%s`", "Your server is correctly configured to send security headers." : "Su servidor está correctamente configurado para enviar los encabezados de seguridad.", "Database version" : "Versión de base de datos", + "MariaDB version 10.3 detected, this version is end-of-life and only supported as part of Ubuntu 20.04. MariaDB >=%1$s and <=%2$s is suggested for best performance, stability and functionality with this version of Nextcloud." : "Se detectó la version 10.3 de MariaDB, esta versión ya está en end-of-life y sólo está soportada por Ubuntu 20.04. Se sugiere utilizar MariaDB >=%1$s and <=%2$s para un mejor rendimiento, estabilidad y funcionalidad con esta versión de Nextcloud.", + "MariaDB version \"%1$s\" detected. MariaDB >=%2$s and <=%3$s is suggested for best performance, stability and functionality with this version of Nextcloud." : "Se detectó la versión \"%1$s\" de MariaDB. Se sugiere utilizar una versión de MariaDB entre >=%2$s y <=%3$s para un mejor rendimiento, estabilidad y funcionalidad con esta versión de Nextcloud.", "SQLite is currently being used as the backend database. For larger installations we recommend that you switch to a different database backend. This is particularly recommended when using the desktop client for file synchronisation. To migrate to another database use the command line tool: \"occ db:convert-type\"." : "SQLite se está utilizando actualmente como la base de datos principal. Para instalaciones más grandes, recomendamos que cambie a una base de datos principal diferente. Esto es particularmente recomendado cuando se utiliza el cliente de escritorio para la sincronización de archivos. Para migrar a otra base de datos, utilice la herramienta de línea de comandos: \"occ db:convert-type\".", "Unknown database platform" : "Plataforma de base de datos desconocida", "Architecture" : "Arquitectura", diff --git a/apps/settings/l10n/fr.js b/apps/settings/l10n/fr.js index 81d7284b66c..817ca3cdbdf 100644 --- a/apps/settings/l10n/fr.js +++ b/apps/settings/l10n/fr.js @@ -623,7 +623,7 @@ OC.L10N.register( "In case of lost device or exiting the organization, this can remotely wipe the Nextcloud data from all devices associated with {userid}. Only works if the devices are connected to the internet." : "En cas de perte d'appareil ou si vous quittez un groupe ou une organisation, cela pourra supprimer les données de tous les appareils associés à {userid}. Ne fonctionne que si les appareils associés sont connectés à internet.", "Remote wipe of devices" : "Effacer les appareils à distance", "Wipe {userid}'s devices" : "Effacer les appareils de {userid}", - "Wiped {userid}'s devices" : "L'appareil de {userid}'s a été effacé", + "Wiped {userid}'s devices" : "Les appareils de {userid} ont été effacés", "Failed to update line manager" : "Échec de la mise à jour du responsable hiérarchique", "Fully delete {userid}'s account including all their personal files, app data, etc." : "Supprime totalement le compte de {userid} et toutes ses données associées (fichiers personnels, données des applications, etc.)", "Account deletion" : "Suppression de compte", diff --git a/apps/settings/l10n/fr.json b/apps/settings/l10n/fr.json index 36c5b4a4d4a..5afc164135f 100644 --- a/apps/settings/l10n/fr.json +++ b/apps/settings/l10n/fr.json @@ -621,7 +621,7 @@ "In case of lost device or exiting the organization, this can remotely wipe the Nextcloud data from all devices associated with {userid}. Only works if the devices are connected to the internet." : "En cas de perte d'appareil ou si vous quittez un groupe ou une organisation, cela pourra supprimer les données de tous les appareils associés à {userid}. Ne fonctionne que si les appareils associés sont connectés à internet.", "Remote wipe of devices" : "Effacer les appareils à distance", "Wipe {userid}'s devices" : "Effacer les appareils de {userid}", - "Wiped {userid}'s devices" : "L'appareil de {userid}'s a été effacé", + "Wiped {userid}'s devices" : "Les appareils de {userid} ont été effacés", "Failed to update line manager" : "Échec de la mise à jour du responsable hiérarchique", "Fully delete {userid}'s account including all their personal files, app data, etc." : "Supprime totalement le compte de {userid} et toutes ses données associées (fichiers personnels, données des applications, etc.)", "Account deletion" : "Suppression de compte", diff --git a/apps/settings/l10n/ga.js b/apps/settings/l10n/ga.js index 5a599857abb..ca059d828a7 100644 --- a/apps/settings/l10n/ga.js +++ b/apps/settings/l10n/ga.js @@ -331,6 +331,7 @@ OC.L10N.register( "None of your currently installed apps provide image generation functionality" : "Ní sholáthraíonn aon cheann de na haipeanna atá suiteáilte agat faoi láthair feidhmiúlacht giniúna íomhá", "Text processing" : "Próiseáil téacs", "Text processing tasks can be implemented by different apps. Here you can set which app should be used for which task." : "Is féidir le feidhmchláir éagsúla tascanna próiseála téacs a chur i bhfeidhm. Anseo is féidir leat a shocrú cén aip ba chóir a úsáid le haghaidh an tasc.", + "None of your currently installed apps provide text processing functionality using the Text Processing API." : "Ní sholáthraíonn aon cheann de na haipeanna atá suiteáilte agat faoi láthair feidhmiúlacht próiseála téacs ag baint úsáide as an API Próiseála Téacs.", "Here you can decide which group can access certain sections of the administration settings." : "Anseo is féidir leat cinneadh a dhéanamh maidir le cén grúpa a fhéadfaidh rochtain a fháil ar ranna áirithe de na socruithe riaracháin.", "None" : "aon cheann", "Unable to modify setting" : "Ní féidir an socrú a mhodhnú", @@ -880,7 +881,6 @@ OC.L10N.register( "SMTP Username" : "Ainm Úsáideora SMTP", "To allow this check to run you have to make sure that your webserver can connect to itself. Therefor it must be able to resolve and connect to at least one its `trusted_domains` or the `overwrite.cli.url`." : "Le gur féidir an tseiceáil seo a rith caithfidh tú a chinntiú gur féidir le do fhreastalaí gréasáin nascadh leis féin. Mar sin caithfidh sé a bheith in ann réiteach agus ceangal a dhéanamh le ceann amháin ar a laghad dá `fearainn_iontaofa` nó don `overwrite.cli.url`.", "Could not check for JavaScript support via any of your `trusted_domains` nor `overwrite.cli.url`. This may be the result of a server-side DNS mismatch or outbound firewall rule. Please check manually if your webserver serves `.mjs` files using the JavaScript MIME type." : "Níorbh fhéidir tacaíocht JavaScript a fháil trí aon cheann de na `fearainn_ iontaofa` ná `overwrite.cli.url`. D'fhéadfadh sé seo a bheith mar thoradh ar mhímheaitseáil DNS ar thaobh an fhreastalaí nó riail balla dóiteáin amach. Seiceáil le do thoil de láimh an bhfreastalaíonn do fhreastalaí gréasáin ar chomhaid `.mjs` ag baint úsáide as an gcineál JavaScript MIME.", - "Active accounts" : "Cuntais ghníomhacha", - "None of your currently installed apps provide custom Text processing functionality." : "Ní sholáthraíonn aon cheann de na haipeanna atá suiteáilte agat faoi láthair feidhmiúlacht próiseála Téacs saincheaptha." + "Active accounts" : "Cuntais ghníomhacha" }, "nplurals=5; plural=(n==1 ? 0 : n==2 ? 1 : n<7 ? 2 : n<11 ? 3 : 4);"); diff --git a/apps/settings/l10n/ga.json b/apps/settings/l10n/ga.json index 940d09d0f2b..e7bda19cacc 100644 --- a/apps/settings/l10n/ga.json +++ b/apps/settings/l10n/ga.json @@ -329,6 +329,7 @@ "None of your currently installed apps provide image generation functionality" : "Ní sholáthraíonn aon cheann de na haipeanna atá suiteáilte agat faoi láthair feidhmiúlacht giniúna íomhá", "Text processing" : "Próiseáil téacs", "Text processing tasks can be implemented by different apps. Here you can set which app should be used for which task." : "Is féidir le feidhmchláir éagsúla tascanna próiseála téacs a chur i bhfeidhm. Anseo is féidir leat a shocrú cén aip ba chóir a úsáid le haghaidh an tasc.", + "None of your currently installed apps provide text processing functionality using the Text Processing API." : "Ní sholáthraíonn aon cheann de na haipeanna atá suiteáilte agat faoi láthair feidhmiúlacht próiseála téacs ag baint úsáide as an API Próiseála Téacs.", "Here you can decide which group can access certain sections of the administration settings." : "Anseo is féidir leat cinneadh a dhéanamh maidir le cén grúpa a fhéadfaidh rochtain a fháil ar ranna áirithe de na socruithe riaracháin.", "None" : "aon cheann", "Unable to modify setting" : "Ní féidir an socrú a mhodhnú", @@ -878,7 +879,6 @@ "SMTP Username" : "Ainm Úsáideora SMTP", "To allow this check to run you have to make sure that your webserver can connect to itself. Therefor it must be able to resolve and connect to at least one its `trusted_domains` or the `overwrite.cli.url`." : "Le gur féidir an tseiceáil seo a rith caithfidh tú a chinntiú gur féidir le do fhreastalaí gréasáin nascadh leis féin. Mar sin caithfidh sé a bheith in ann réiteach agus ceangal a dhéanamh le ceann amháin ar a laghad dá `fearainn_iontaofa` nó don `overwrite.cli.url`.", "Could not check for JavaScript support via any of your `trusted_domains` nor `overwrite.cli.url`. This may be the result of a server-side DNS mismatch or outbound firewall rule. Please check manually if your webserver serves `.mjs` files using the JavaScript MIME type." : "Níorbh fhéidir tacaíocht JavaScript a fháil trí aon cheann de na `fearainn_ iontaofa` ná `overwrite.cli.url`. D'fhéadfadh sé seo a bheith mar thoradh ar mhímheaitseáil DNS ar thaobh an fhreastalaí nó riail balla dóiteáin amach. Seiceáil le do thoil de láimh an bhfreastalaíonn do fhreastalaí gréasáin ar chomhaid `.mjs` ag baint úsáide as an gcineál JavaScript MIME.", - "Active accounts" : "Cuntais ghníomhacha", - "None of your currently installed apps provide custom Text processing functionality." : "Ní sholáthraíonn aon cheann de na haipeanna atá suiteáilte agat faoi láthair feidhmiúlacht próiseála Téacs saincheaptha." + "Active accounts" : "Cuntais ghníomhacha" },"pluralForm" :"nplurals=5; plural=(n==1 ? 0 : n==2 ? 1 : n<7 ? 2 : n<11 ? 3 : 4);" }
\ No newline at end of file diff --git a/apps/settings/l10n/gl.js b/apps/settings/l10n/gl.js index 08502a9a4b2..9132d9f0247 100644 --- a/apps/settings/l10n/gl.js +++ b/apps/settings/l10n/gl.js @@ -443,7 +443,7 @@ OC.L10N.register( "Usage documentation" : "Documentación de utilización", "Admin documentation" : "Documentación da administración da instancia", "Developer documentation" : "Documentación para desenvolvedores", - "Changelog" : "Rexistro de cambios", + "Changelog" : "Notas da versión", "Device name" : "Nome do dispositivo", "Cancel renaming" : "Cancelar o cambio de nome", "Save new name" : "Gardar o novo nome", @@ -881,7 +881,6 @@ OC.L10N.register( "SMTP Username" : "Nome de usuario SMTP", "To allow this check to run you have to make sure that your webserver can connect to itself. Therefor it must be able to resolve and connect to at least one its `trusted_domains` or the `overwrite.cli.url`." : "Para permitir que esta comprobación se execute, debe asegurarse de que o seu servidor web poida conectarse a si mesmo. Por tanto, debe ser quen de resolver e conectarse a polo menos un dos seus «trusted_domains» ou ao «overwrite.cli.url».", "Could not check for JavaScript support via any of your `trusted_domains` nor `overwrite.cli.url`. This may be the result of a server-side DNS mismatch or outbound firewall rule. Please check manually if your webserver serves `.mjs` files using the JavaScript MIME type." : "Non foi posíbel comprobar a compatibilidade de JavaScript a través de ningún dos seus «trusted_domains» nin «overwrite.cli.url». Isto pode ser o resultado dunha falta de coincidencia de DNS do servidor ou dunha regra da devasa de saída. Comprobe manualmente se o seu servidor web serve ficheiros «.mjs» usando o tipo MIME JavaScript.", - "Active accounts" : "Contas activas", - "None of your currently installed apps provide custom Text processing functionality." : "Ningunha das aplicacións instaladas neste momento ofrece funcións de procesamento de texto personalizadas." + "Active accounts" : "Contas activas" }, "nplurals=2; plural=(n != 1);"); diff --git a/apps/settings/l10n/gl.json b/apps/settings/l10n/gl.json index 00d0d9040c0..028a9f58de8 100644 --- a/apps/settings/l10n/gl.json +++ b/apps/settings/l10n/gl.json @@ -441,7 +441,7 @@ "Usage documentation" : "Documentación de utilización", "Admin documentation" : "Documentación da administración da instancia", "Developer documentation" : "Documentación para desenvolvedores", - "Changelog" : "Rexistro de cambios", + "Changelog" : "Notas da versión", "Device name" : "Nome do dispositivo", "Cancel renaming" : "Cancelar o cambio de nome", "Save new name" : "Gardar o novo nome", @@ -879,7 +879,6 @@ "SMTP Username" : "Nome de usuario SMTP", "To allow this check to run you have to make sure that your webserver can connect to itself. Therefor it must be able to resolve and connect to at least one its `trusted_domains` or the `overwrite.cli.url`." : "Para permitir que esta comprobación se execute, debe asegurarse de que o seu servidor web poida conectarse a si mesmo. Por tanto, debe ser quen de resolver e conectarse a polo menos un dos seus «trusted_domains» ou ao «overwrite.cli.url».", "Could not check for JavaScript support via any of your `trusted_domains` nor `overwrite.cli.url`. This may be the result of a server-side DNS mismatch or outbound firewall rule. Please check manually if your webserver serves `.mjs` files using the JavaScript MIME type." : "Non foi posíbel comprobar a compatibilidade de JavaScript a través de ningún dos seus «trusted_domains» nin «overwrite.cli.url». Isto pode ser o resultado dunha falta de coincidencia de DNS do servidor ou dunha regra da devasa de saída. Comprobe manualmente se o seu servidor web serve ficheiros «.mjs» usando o tipo MIME JavaScript.", - "Active accounts" : "Contas activas", - "None of your currently installed apps provide custom Text processing functionality." : "Ningunha das aplicacións instaladas neste momento ofrece funcións de procesamento de texto personalizadas." + "Active accounts" : "Contas activas" },"pluralForm" :"nplurals=2; plural=(n != 1);" }
\ No newline at end of file diff --git a/apps/settings/l10n/ja.js b/apps/settings/l10n/ja.js index f63e5e3d64b..41f8a25976c 100644 --- a/apps/settings/l10n/ja.js +++ b/apps/settings/l10n/ja.js @@ -331,6 +331,7 @@ OC.L10N.register( "None of your currently installed apps provide image generation functionality" : "現在インストールされているどのアプリも、画像生成機能を提供していません。", "Text processing" : "テキスト処理", "Text processing tasks can be implemented by different apps. Here you can set which app should be used for which task." : "テキスト処理タスクは、異なるアプリで実装することができます。ここでは、どのタスクにどのアプリを使うかを設定できます。", + "None of your currently installed apps provide text processing functionality using the Text Processing API." : "現在インストールされているどのアプリも、テキスト処理APIを使用したテキスト処理機能を提供していません。", "Here you can decide which group can access certain sections of the administration settings." : "ここではどのグループが、どの管理設定項目にアクセスできるか決めることができます。", "None" : "なし", "Unable to modify setting" : "設定を変更できません", @@ -880,7 +881,6 @@ OC.L10N.register( "SMTP Username" : "SMTPユーザー名", "To allow this check to run you have to make sure that your webserver can connect to itself. Therefor it must be able to resolve and connect to at least one its `trusted_domains` or the `overwrite.cli.url`." : "このチェックを実行させるには、ウェブサーバが自分自身に接続できることを確認する必要があります。したがって、少なくとも `trusted_domains` または `overwrite.cli.url` を解決して接続できなければなりません。", "Could not check for JavaScript support via any of your `trusted_domains` nor `overwrite.cli.url`. This may be the result of a server-side DNS mismatch or outbound firewall rule. Please check manually if your webserver serves `.mjs` files using the JavaScript MIME type." : "`trusted_domains` または `overwrite.cli.url` で JavaScript のサポートを確認できませんでした。これはサーバ側の DNS の不一致か、アウトバウンドファイアウォールルールの結果である可能性があります。お使いのウェブサーバーが JavaScript MIMEタイプを使用して `.mjs` ファイルを提供しているかどうかを手動で確認してください。", - "Active accounts" : "アクティブなアカウント", - "None of your currently installed apps provide custom Text processing functionality." : "現在インストールされているアプリは、カスタムテキスト処理機能を提供していません。" + "Active accounts" : "アクティブなアカウント" }, "nplurals=1; plural=0;"); diff --git a/apps/settings/l10n/ja.json b/apps/settings/l10n/ja.json index e82f9658a87..8bd71fa4015 100644 --- a/apps/settings/l10n/ja.json +++ b/apps/settings/l10n/ja.json @@ -329,6 +329,7 @@ "None of your currently installed apps provide image generation functionality" : "現在インストールされているどのアプリも、画像生成機能を提供していません。", "Text processing" : "テキスト処理", "Text processing tasks can be implemented by different apps. Here you can set which app should be used for which task." : "テキスト処理タスクは、異なるアプリで実装することができます。ここでは、どのタスクにどのアプリを使うかを設定できます。", + "None of your currently installed apps provide text processing functionality using the Text Processing API." : "現在インストールされているどのアプリも、テキスト処理APIを使用したテキスト処理機能を提供していません。", "Here you can decide which group can access certain sections of the administration settings." : "ここではどのグループが、どの管理設定項目にアクセスできるか決めることができます。", "None" : "なし", "Unable to modify setting" : "設定を変更できません", @@ -878,7 +879,6 @@ "SMTP Username" : "SMTPユーザー名", "To allow this check to run you have to make sure that your webserver can connect to itself. Therefor it must be able to resolve and connect to at least one its `trusted_domains` or the `overwrite.cli.url`." : "このチェックを実行させるには、ウェブサーバが自分自身に接続できることを確認する必要があります。したがって、少なくとも `trusted_domains` または `overwrite.cli.url` を解決して接続できなければなりません。", "Could not check for JavaScript support via any of your `trusted_domains` nor `overwrite.cli.url`. This may be the result of a server-side DNS mismatch or outbound firewall rule. Please check manually if your webserver serves `.mjs` files using the JavaScript MIME type." : "`trusted_domains` または `overwrite.cli.url` で JavaScript のサポートを確認できませんでした。これはサーバ側の DNS の不一致か、アウトバウンドファイアウォールルールの結果である可能性があります。お使いのウェブサーバーが JavaScript MIMEタイプを使用して `.mjs` ファイルを提供しているかどうかを手動で確認してください。", - "Active accounts" : "アクティブなアカウント", - "None of your currently installed apps provide custom Text processing functionality." : "現在インストールされているアプリは、カスタムテキスト処理機能を提供していません。" + "Active accounts" : "アクティブなアカウント" },"pluralForm" :"nplurals=1; plural=0;" }
\ No newline at end of file diff --git a/apps/settings/l10n/pt_BR.js b/apps/settings/l10n/pt_BR.js index e5c3dd71364..ff011f733a0 100644 --- a/apps/settings/l10n/pt_BR.js +++ b/apps/settings/l10n/pt_BR.js @@ -331,6 +331,7 @@ OC.L10N.register( "None of your currently installed apps provide image generation functionality" : "Nenhum dos seus aplicativos instalados atualmente oferece funcionalidade de geração de imagens", "Text processing" : "Processamento de texto", "Text processing tasks can be implemented by different apps. Here you can set which app should be used for which task." : "Tarefas de processamento de texto podem ser implementadas por diferentes aplicativos. Aqui você pode definir qual aplicativo deve ser usado para qual tarefa.", + "None of your currently installed apps provide text processing functionality using the Text Processing API." : "Nenhum dos seus aplicativos instalados oferece funcionalidade de processamento de texto usando a API Processamento de Texto.", "Here you can decide which group can access certain sections of the administration settings." : "Aqui você pode decidir qual grupo pode acessar certas seções das configurações de administração.", "None" : "Nenhuma", "Unable to modify setting" : "Incapaz de modificar a configuração", @@ -604,7 +605,7 @@ OC.L10N.register( "Password change is disabled because the master key is disabled" : "A alteração de senha está desativada porque a chave mestra está desativada", "New account" : "Nova conta", "Display name" : "Nome de exibição", - "Either password or email is required" : "Either password or email is required", + "Either password or email is required" : "É necessário email ou senha", "Password (required)" : "Password (required)", "Email (required)" : "Email (required)", "Email" : "E-mail", diff --git a/apps/settings/l10n/pt_BR.json b/apps/settings/l10n/pt_BR.json index 8ca662b5ebb..c6dbca7bd3d 100644 --- a/apps/settings/l10n/pt_BR.json +++ b/apps/settings/l10n/pt_BR.json @@ -329,6 +329,7 @@ "None of your currently installed apps provide image generation functionality" : "Nenhum dos seus aplicativos instalados atualmente oferece funcionalidade de geração de imagens", "Text processing" : "Processamento de texto", "Text processing tasks can be implemented by different apps. Here you can set which app should be used for which task." : "Tarefas de processamento de texto podem ser implementadas por diferentes aplicativos. Aqui você pode definir qual aplicativo deve ser usado para qual tarefa.", + "None of your currently installed apps provide text processing functionality using the Text Processing API." : "Nenhum dos seus aplicativos instalados oferece funcionalidade de processamento de texto usando a API Processamento de Texto.", "Here you can decide which group can access certain sections of the administration settings." : "Aqui você pode decidir qual grupo pode acessar certas seções das configurações de administração.", "None" : "Nenhuma", "Unable to modify setting" : "Incapaz de modificar a configuração", @@ -602,7 +603,7 @@ "Password change is disabled because the master key is disabled" : "A alteração de senha está desativada porque a chave mestra está desativada", "New account" : "Nova conta", "Display name" : "Nome de exibição", - "Either password or email is required" : "Either password or email is required", + "Either password or email is required" : "É necessário email ou senha", "Password (required)" : "Password (required)", "Email (required)" : "Email (required)", "Email" : "E-mail", diff --git a/apps/settings/l10n/ru.js b/apps/settings/l10n/ru.js index 06c97dc780a..5164443758f 100644 --- a/apps/settings/l10n/ru.js +++ b/apps/settings/l10n/ru.js @@ -880,7 +880,6 @@ OC.L10N.register( "SMTP Username" : "Пользователь SMTP", "To allow this check to run you have to make sure that your webserver can connect to itself. Therefor it must be able to resolve and connect to at least one its `trusted_domains` or the `overwrite.cli.url`." : "Чтобы разрешить выполнение этой проверки, вы должны убедиться, что ваш веб-сервер может подключаться к самому себе. Для этого он должен иметь возможность разрешать и подключаться по крайней мере к одному из своих `trusted_domains\" или \"overwrite.cli.url\".", "Could not check for JavaScript support via any of your `trusted_domains` nor `overwrite.cli.url`. This may be the result of a server-side DNS mismatch or outbound firewall rule. Please check manually if your webserver serves `.mjs` files using the JavaScript MIME type." : "Не удалось проверить поддержку JavaScript ни в одном из ваших `trusted_domains`, ни в `overwrite.cli.url`. Это может быть результатом несоответствия DNS на стороне сервера или правила исходящего брандмауэра. Пожалуйста, проверьте вручную, обслуживает ли ваш веб-сервер файлы `.mjs`, используя MIME-тип JavaScript.", - "Active accounts" : "Активные учётные записи", - "None of your currently installed apps provide custom Text processing functionality." : "Ни одно из установленных на данный момент приложений не предоставляет пользовательских функций обработки текста." + "Active accounts" : "Активные учётные записи" }, "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);"); diff --git a/apps/settings/l10n/ru.json b/apps/settings/l10n/ru.json index 5dee87666d8..c8a19aff24f 100644 --- a/apps/settings/l10n/ru.json +++ b/apps/settings/l10n/ru.json @@ -878,7 +878,6 @@ "SMTP Username" : "Пользователь SMTP", "To allow this check to run you have to make sure that your webserver can connect to itself. Therefor it must be able to resolve and connect to at least one its `trusted_domains` or the `overwrite.cli.url`." : "Чтобы разрешить выполнение этой проверки, вы должны убедиться, что ваш веб-сервер может подключаться к самому себе. Для этого он должен иметь возможность разрешать и подключаться по крайней мере к одному из своих `trusted_domains\" или \"overwrite.cli.url\".", "Could not check for JavaScript support via any of your `trusted_domains` nor `overwrite.cli.url`. This may be the result of a server-side DNS mismatch or outbound firewall rule. Please check manually if your webserver serves `.mjs` files using the JavaScript MIME type." : "Не удалось проверить поддержку JavaScript ни в одном из ваших `trusted_domains`, ни в `overwrite.cli.url`. Это может быть результатом несоответствия DNS на стороне сервера или правила исходящего брандмауэра. Пожалуйста, проверьте вручную, обслуживает ли ваш веб-сервер файлы `.mjs`, используя MIME-тип JavaScript.", - "Active accounts" : "Активные учётные записи", - "None of your currently installed apps provide custom Text processing functionality." : "Ни одно из установленных на данный момент приложений не предоставляет пользовательских функций обработки текста." + "Active accounts" : "Активные учётные записи" },"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);" }
\ No newline at end of file diff --git a/apps/settings/l10n/sk.js b/apps/settings/l10n/sk.js index c6101ea30fc..0d015681076 100644 --- a/apps/settings/l10n/sk.js +++ b/apps/settings/l10n/sk.js @@ -221,6 +221,7 @@ OC.L10N.register( "The \"overwrite.cli.url\" option in your config.php is correctly set to \"%s\"." : "\"Možnosť \"overwrite.cli.url\" vo vašom config.php je správne nastavená na \"%s\".\"", "The \"overwrite.cli.url\" option in your config.php is set to \"%s\" which is a correct URL. Suggested URL is \"%s\"." : "\"Možnosť \"overwrite.cli.url\" vo vašom config.php je nastavená na \"%s\", čo je správna URL. Navrhovaná URL je \"%s\".\"", "Please make sure to set the \"overwrite.cli.url\" option in your config.php file to the URL that your users mainly use to access this Nextcloud. Suggestion: \"%s\". Otherwise there might be problems with the URL generation via cron. (It is possible though that the suggested URL is not the URL that your users mainly use to access this Nextcloud. Best is to double check this in any case.)" : "Uistite sa, že ste v súbore config.php nastavili možnosť „overwrite.cli.url“ na adresu URL, ktorú vaši užívatelia používajú na prístup k tomuto Nextcloudu. Návrh: \"%s\". V opačnom prípade môžu nastať problémy s generovaním URL cez cron. (Je však možné, že navrhovaná adresa URL nie je adresa URL, ktorú vaši používatelia používajú na prístup k tomuto Nextcloudu. Najlepšie je v každom prípade to ešte raz skontrolovať.)", + "PHP APCu configuration" : "Konfigurácia PHP APCu", "PHP default charset" : "Predvolená znaková sada pre PHP ", "PHP configuration option \"default_charset\" should be UTF-8" : "PHP premenná \"default_charset\" by mala byť UTF-8", "PHP set_time_limit" : "PHP set_time_limit", diff --git a/apps/settings/l10n/sk.json b/apps/settings/l10n/sk.json index 899c10fe8f6..4a934d87779 100644 --- a/apps/settings/l10n/sk.json +++ b/apps/settings/l10n/sk.json @@ -219,6 +219,7 @@ "The \"overwrite.cli.url\" option in your config.php is correctly set to \"%s\"." : "\"Možnosť \"overwrite.cli.url\" vo vašom config.php je správne nastavená na \"%s\".\"", "The \"overwrite.cli.url\" option in your config.php is set to \"%s\" which is a correct URL. Suggested URL is \"%s\"." : "\"Možnosť \"overwrite.cli.url\" vo vašom config.php je nastavená na \"%s\", čo je správna URL. Navrhovaná URL je \"%s\".\"", "Please make sure to set the \"overwrite.cli.url\" option in your config.php file to the URL that your users mainly use to access this Nextcloud. Suggestion: \"%s\". Otherwise there might be problems with the URL generation via cron. (It is possible though that the suggested URL is not the URL that your users mainly use to access this Nextcloud. Best is to double check this in any case.)" : "Uistite sa, že ste v súbore config.php nastavili možnosť „overwrite.cli.url“ na adresu URL, ktorú vaši užívatelia používajú na prístup k tomuto Nextcloudu. Návrh: \"%s\". V opačnom prípade môžu nastať problémy s generovaním URL cez cron. (Je však možné, že navrhovaná adresa URL nie je adresa URL, ktorú vaši používatelia používajú na prístup k tomuto Nextcloudu. Najlepšie je v každom prípade to ešte raz skontrolovať.)", + "PHP APCu configuration" : "Konfigurácia PHP APCu", "PHP default charset" : "Predvolená znaková sada pre PHP ", "PHP configuration option \"default_charset\" should be UTF-8" : "PHP premenná \"default_charset\" by mala byť UTF-8", "PHP set_time_limit" : "PHP set_time_limit", diff --git a/apps/settings/l10n/tr.js b/apps/settings/l10n/tr.js index 73bbefecc63..8b3b8f12d7c 100644 --- a/apps/settings/l10n/tr.js +++ b/apps/settings/l10n/tr.js @@ -881,7 +881,6 @@ OC.L10N.register( "SMTP Username" : "SMTP kullanıcı adı", "To allow this check to run you have to make sure that your webserver can connect to itself. Therefor it must be able to resolve and connect to at least one its `trusted_domains` or the `overwrite.cli.url`." : "Bu denetimi çalıştırabilmek için site sunucunuzun kendisine bağlanabildiğinden emin olmanız gerekir. Bu nedenle, `trusted_domains` ya da `overwrite.cli.url` değerlerinden en az birini çözümleyebilmeli ve bunlara bağlanabilmelidir.", "Could not check for JavaScript support via any of your `trusted_domains` nor `overwrite.cli.url`. This may be the result of a server-side DNS mismatch or outbound firewall rule. Please check manually if your webserver serves `.mjs` files using the JavaScript MIME type." : "`trusted_domains` ya da `overwrite.cli.url` değerlerinden biri ile JavaScript desteği olup olmadığ denetlenemedi. Bu durum, sunucu tarafı DNS uyuşmazlığından ya da giden güvenlik duvarı kuralından kaynaklanıyor olabilir. Lütfen site sunucunuzun JavaScript MIME türünü kullanarak `.mjs` dosyalarını sunup sunmadığını el ile denetleyin.", - "Active accounts" : "Etkin hesaplar", - "None of your currently installed apps provide custom Text processing functionality." : "Şu anda kurulu uygulamaların hiç birinde özel metin işleme özelliği yok" + "Active accounts" : "Etkin hesaplar" }, "nplurals=2; plural=(n > 1);"); diff --git a/apps/settings/l10n/tr.json b/apps/settings/l10n/tr.json index 397587e4b9a..eac186592f1 100644 --- a/apps/settings/l10n/tr.json +++ b/apps/settings/l10n/tr.json @@ -879,7 +879,6 @@ "SMTP Username" : "SMTP kullanıcı adı", "To allow this check to run you have to make sure that your webserver can connect to itself. Therefor it must be able to resolve and connect to at least one its `trusted_domains` or the `overwrite.cli.url`." : "Bu denetimi çalıştırabilmek için site sunucunuzun kendisine bağlanabildiğinden emin olmanız gerekir. Bu nedenle, `trusted_domains` ya da `overwrite.cli.url` değerlerinden en az birini çözümleyebilmeli ve bunlara bağlanabilmelidir.", "Could not check for JavaScript support via any of your `trusted_domains` nor `overwrite.cli.url`. This may be the result of a server-side DNS mismatch or outbound firewall rule. Please check manually if your webserver serves `.mjs` files using the JavaScript MIME type." : "`trusted_domains` ya da `overwrite.cli.url` değerlerinden biri ile JavaScript desteği olup olmadığ denetlenemedi. Bu durum, sunucu tarafı DNS uyuşmazlığından ya da giden güvenlik duvarı kuralından kaynaklanıyor olabilir. Lütfen site sunucunuzun JavaScript MIME türünü kullanarak `.mjs` dosyalarını sunup sunmadığını el ile denetleyin.", - "Active accounts" : "Etkin hesaplar", - "None of your currently installed apps provide custom Text processing functionality." : "Şu anda kurulu uygulamaların hiç birinde özel metin işleme özelliği yok" + "Active accounts" : "Etkin hesaplar" },"pluralForm" :"nplurals=2; plural=(n > 1);" }
\ No newline at end of file diff --git a/apps/settings/l10n/zh_HK.js b/apps/settings/l10n/zh_HK.js index bf7ce9b32d0..65c9e3b61f2 100644 --- a/apps/settings/l10n/zh_HK.js +++ b/apps/settings/l10n/zh_HK.js @@ -881,7 +881,6 @@ OC.L10N.register( "SMTP Username" : "SMTP 用戶名稱", "To allow this check to run you have to make sure that your webserver can connect to itself. Therefor it must be able to resolve and connect to at least one its `trusted_domains` or the `overwrite.cli.url`." : "要執行此檢查,您必須確保您的網路伺服器可以連線到其自身。因此,其必須至少能解析並連線至 `trusted_domains` 或 `overwrite.cli.url` 其中一個。", "Could not check for JavaScript support via any of your `trusted_domains` nor `overwrite.cli.url`. This may be the result of a server-side DNS mismatch or outbound firewall rule. Please check manually if your webserver serves `.mjs` files using the JavaScript MIME type." : "無法透過您的任何「trusted_domains」或「overwrite.cli.url」檢查 JavaScript 支援。這可能是伺服器端 DNS 不符或連出防火牆規則造成的。請手動檢查您的網頁伺服器是否使用 JavaScript MIME 類型提供「.mjs」檔案。", - "Active accounts" : "活躍帳戶", - "None of your currently installed apps provide custom Text processing functionality." : "您目前安裝的應用程式均不提供自訂文字處理功能。" + "Active accounts" : "活躍帳戶" }, "nplurals=1; plural=0;"); diff --git a/apps/settings/l10n/zh_HK.json b/apps/settings/l10n/zh_HK.json index 48a2dca4d09..10000e9c032 100644 --- a/apps/settings/l10n/zh_HK.json +++ b/apps/settings/l10n/zh_HK.json @@ -879,7 +879,6 @@ "SMTP Username" : "SMTP 用戶名稱", "To allow this check to run you have to make sure that your webserver can connect to itself. Therefor it must be able to resolve and connect to at least one its `trusted_domains` or the `overwrite.cli.url`." : "要執行此檢查,您必須確保您的網路伺服器可以連線到其自身。因此,其必須至少能解析並連線至 `trusted_domains` 或 `overwrite.cli.url` 其中一個。", "Could not check for JavaScript support via any of your `trusted_domains` nor `overwrite.cli.url`. This may be the result of a server-side DNS mismatch or outbound firewall rule. Please check manually if your webserver serves `.mjs` files using the JavaScript MIME type." : "無法透過您的任何「trusted_domains」或「overwrite.cli.url」檢查 JavaScript 支援。這可能是伺服器端 DNS 不符或連出防火牆規則造成的。請手動檢查您的網頁伺服器是否使用 JavaScript MIME 類型提供「.mjs」檔案。", - "Active accounts" : "活躍帳戶", - "None of your currently installed apps provide custom Text processing functionality." : "您目前安裝的應用程式均不提供自訂文字處理功能。" + "Active accounts" : "活躍帳戶" },"pluralForm" :"nplurals=1; plural=0;" }
\ No newline at end of file diff --git a/apps/settings/l10n/zh_TW.js b/apps/settings/l10n/zh_TW.js index 2ac4ee5f294..e751427112e 100644 --- a/apps/settings/l10n/zh_TW.js +++ b/apps/settings/l10n/zh_TW.js @@ -316,7 +316,7 @@ OC.L10N.register( "Your server is correctly configured to serve `.well-known` URLs." : "您的伺服器已正確設定以提供`.well-known` URL。", "WOFF2 file loading" : "正在載入 WOFF2 檔案", "Could not check for WOFF2 loading support. Please check manually if your webserver serves `.woff2` files." : "無法檢查 WOFF2 載入支援。請手動檢查您的網路伺服器是否可服務 `.woff2` 檔案。", - "Your web server is not properly set up to deliver .woff2 files. This is typically an issue with the Nginx configuration. For Nextcloud 15 it needs an adjustement to also deliver .woff2 files. Compare your Nginx configuration to the recommended configuration in our documentation." : "您的伺服器並未正確的設定,因此無法傳遞 .woff2 的檔案。這通常是因為 Nginx 的設定問題所導致。在 Nextcloud 15 中,需要一些調整才能一並傳遞 .woff2 的檔案。請檢查您的 Nginx 設定,和 Nextcloud 說明文件中提到的建議設定。", + "Your web server is not properly set up to deliver .woff2 files. This is typically an issue with the Nginx configuration. For Nextcloud 15 it needs an adjustement to also deliver .woff2 files. Compare your Nginx configuration to the recommended configuration in our documentation." : "您的伺服器並未正確的設定,因此無法傳遞 .woff2 的檔案。這通常是因為 Nginx 的設定問題所導致。在 Nextcloud 15 中,需要一些調整才能一併傳遞 .woff2 的檔案。請檢查您的 Nginx 設定,和 Nextcloud 說明文件中提到的建議設定。", "Profile information" : "個人檔案資訊", "Profile picture, full name, email, phone number, address, website, Twitter, organisation, role, headline, biography, and whether your profile is enabled" : "個人檔案圖片、全名、電子郵件、電話號碼、地址、網站、Twitter、組織、角色、標題、自傳以及您的個人資料是否已啟用", "Nextcloud settings" : "Nextcloud 設定", @@ -881,7 +881,6 @@ OC.L10N.register( "SMTP Username" : "SMTP 使用者名稱", "To allow this check to run you have to make sure that your webserver can connect to itself. Therefor it must be able to resolve and connect to at least one its `trusted_domains` or the `overwrite.cli.url`." : "要執行此檢查,您必須確保您的網路伺服器可以連線到其自身。因此,其必須至少能解析並連線至 `trusted_domains` 或 `overwrite.cli.url` 其中一個。", "Could not check for JavaScript support via any of your `trusted_domains` nor `overwrite.cli.url`. This may be the result of a server-side DNS mismatch or outbound firewall rule. Please check manually if your webserver serves `.mjs` files using the JavaScript MIME type." : "無法透過您的任何「trusted_domains」或「overwrite.cli.url」檢查 JavaScript 支援。這可能是伺服器端 DNS 不符或連出防火牆規則造成的。請手動檢查您的網頁伺服器是否使用 JavaScript MIME 類型提供「.mjs」檔案。", - "Active accounts" : "活躍帳號", - "None of your currently installed apps provide custom Text processing functionality." : "您目前安裝的應用程式均不提供自訂文字處理功能。" + "Active accounts" : "活躍帳號" }, "nplurals=1; plural=0;"); diff --git a/apps/settings/l10n/zh_TW.json b/apps/settings/l10n/zh_TW.json index a2ddd18f99d..91b5ff49f06 100644 --- a/apps/settings/l10n/zh_TW.json +++ b/apps/settings/l10n/zh_TW.json @@ -314,7 +314,7 @@ "Your server is correctly configured to serve `.well-known` URLs." : "您的伺服器已正確設定以提供`.well-known` URL。", "WOFF2 file loading" : "正在載入 WOFF2 檔案", "Could not check for WOFF2 loading support. Please check manually if your webserver serves `.woff2` files." : "無法檢查 WOFF2 載入支援。請手動檢查您的網路伺服器是否可服務 `.woff2` 檔案。", - "Your web server is not properly set up to deliver .woff2 files. This is typically an issue with the Nginx configuration. For Nextcloud 15 it needs an adjustement to also deliver .woff2 files. Compare your Nginx configuration to the recommended configuration in our documentation." : "您的伺服器並未正確的設定,因此無法傳遞 .woff2 的檔案。這通常是因為 Nginx 的設定問題所導致。在 Nextcloud 15 中,需要一些調整才能一並傳遞 .woff2 的檔案。請檢查您的 Nginx 設定,和 Nextcloud 說明文件中提到的建議設定。", + "Your web server is not properly set up to deliver .woff2 files. This is typically an issue with the Nginx configuration. For Nextcloud 15 it needs an adjustement to also deliver .woff2 files. Compare your Nginx configuration to the recommended configuration in our documentation." : "您的伺服器並未正確的設定,因此無法傳遞 .woff2 的檔案。這通常是因為 Nginx 的設定問題所導致。在 Nextcloud 15 中,需要一些調整才能一併傳遞 .woff2 的檔案。請檢查您的 Nginx 設定,和 Nextcloud 說明文件中提到的建議設定。", "Profile information" : "個人檔案資訊", "Profile picture, full name, email, phone number, address, website, Twitter, organisation, role, headline, biography, and whether your profile is enabled" : "個人檔案圖片、全名、電子郵件、電話號碼、地址、網站、Twitter、組織、角色、標題、自傳以及您的個人資料是否已啟用", "Nextcloud settings" : "Nextcloud 設定", @@ -879,7 +879,6 @@ "SMTP Username" : "SMTP 使用者名稱", "To allow this check to run you have to make sure that your webserver can connect to itself. Therefor it must be able to resolve and connect to at least one its `trusted_domains` or the `overwrite.cli.url`." : "要執行此檢查,您必須確保您的網路伺服器可以連線到其自身。因此,其必須至少能解析並連線至 `trusted_domains` 或 `overwrite.cli.url` 其中一個。", "Could not check for JavaScript support via any of your `trusted_domains` nor `overwrite.cli.url`. This may be the result of a server-side DNS mismatch or outbound firewall rule. Please check manually if your webserver serves `.mjs` files using the JavaScript MIME type." : "無法透過您的任何「trusted_domains」或「overwrite.cli.url」檢查 JavaScript 支援。這可能是伺服器端 DNS 不符或連出防火牆規則造成的。請手動檢查您的網頁伺服器是否使用 JavaScript MIME 類型提供「.mjs」檔案。", - "Active accounts" : "活躍帳號", - "None of your currently installed apps provide custom Text processing functionality." : "您目前安裝的應用程式均不提供自訂文字處理功能。" + "Active accounts" : "活躍帳號" },"pluralForm" :"nplurals=1; plural=0;" }
\ No newline at end of file diff --git a/apps/settings/lib/Controller/AppSettingsController.php b/apps/settings/lib/Controller/AppSettingsController.php index 760584888c0..2c682ac4600 100644 --- a/apps/settings/lib/Controller/AppSettingsController.php +++ b/apps/settings/lib/Controller/AppSettingsController.php @@ -14,7 +14,6 @@ use OC\App\AppStore\Version\VersionParser; use OC\App\DependencyAnalyzer; use OC\App\Platform; use OC\Installer; -use OC_App; use OCP\App\AppPathNotFoundException; use OCP\App\IAppManager; use OCP\AppFramework\Controller; @@ -479,7 +478,7 @@ class AppSettingsController extends Controller { $updateRequired = false; foreach ($appIds as $appId) { - $appId = OC_App::cleanAppId($appId); + $appId = $this->appManager->cleanAppId($appId); // Check if app is already downloaded /** @var Installer $installer */ @@ -537,7 +536,7 @@ class AppSettingsController extends Controller { public function disableApps(array $appIds): JSONResponse { try { foreach ($appIds as $appId) { - $appId = OC_App::cleanAppId($appId); + $appId = $this->appManager->cleanAppId($appId); $this->appManager->disableApp($appId); } return new JSONResponse([]); @@ -553,7 +552,7 @@ class AppSettingsController extends Controller { */ #[PasswordConfirmationRequired] public function uninstallApp(string $appId): JSONResponse { - $appId = OC_App::cleanAppId($appId); + $appId = $this->appManager->cleanAppId($appId); $result = $this->installer->removeApp($appId); if ($result !== false) { $this->appManager->clearAppsCache(); @@ -567,7 +566,7 @@ class AppSettingsController extends Controller { * @return JSONResponse */ public function updateApp(string $appId): JSONResponse { - $appId = OC_App::cleanAppId($appId); + $appId = $this->appManager->cleanAppId($appId); $this->config->setSystemValue('maintenance', true); try { @@ -594,7 +593,7 @@ class AppSettingsController extends Controller { } public function force(string $appId): JSONResponse { - $appId = OC_App::cleanAppId($appId); + $appId = $this->appManager->cleanAppId($appId); $this->appManager->ignoreNextcloudRequirementForApp($appId); return new JSONResponse(); } diff --git a/apps/settings/lib/SetupChecks/CheckServerResponseTrait.php b/apps/settings/lib/SetupChecks/CheckServerResponseTrait.php index 090e1322e2f..3080829cb00 100644 --- a/apps/settings/lib/SetupChecks/CheckServerResponseTrait.php +++ b/apps/settings/lib/SetupChecks/CheckServerResponseTrait.php @@ -37,59 +37,64 @@ trait CheckServerResponseTrait { * Get all possible URLs that need to be checked for a local request test. * This takes all `trusted_domains` and the CLI overwrite URL into account. * - * @param string $url The relative URL to test starting with a / - * @return string[] List of possible absolute URLs + * @param string $url The absolute path (absolute URL without host but with web-root) to test starting with a / + * @param bool $isRootRequest Set to remove the web-root from URL and host (e.g. when requesting a path in the domain root like '/.well-known') + * @return list<string> List of possible absolute URLs */ - protected function getTestUrls(string $url, bool $removeWebroot): array { - $testUrls = []; + protected function getTestUrls(string $url, bool $isRootRequest = false): array { + $url = '/' . ltrim($url, '/'); $webroot = rtrim($this->urlGenerator->getWebroot(), '/'); + if ($isRootRequest === false && $webroot !== '' && str_starts_with($url, $webroot)) { + // The URL contains the web-root but also the base url does so, + // so we need to remove the web-root from the URL. + $url = substr($url, strlen($webroot)); + } - /* Try overwrite.cli.url first, it’s supposed to be how the server contacts itself */ - $cliUrl = $this->config->getSystemValueString('overwrite.cli.url', ''); + // Base URLs to test + $baseUrls = []; + // Try overwrite.cli.url first, it’s supposed to be how the server contacts itself + $cliUrl = $this->config->getSystemValueString('overwrite.cli.url', ''); if ($cliUrl !== '') { - $cliUrl = $this->normalizeUrl( + // The CLI URL already contains the web-root, so we need to normalize it if requested + $baseUrls[] = $this->normalizeUrl( $cliUrl, - $webroot, - $removeWebroot + $isRootRequest ); - - $testUrls[] = $cliUrl . $url; } - /* Try URL generator second */ - $baseUrl = $this->normalizeUrl( + // Try URL generator second + // The base URL also contains the webroot so also normalize it + $baseUrls[] = $this->normalizeUrl( $this->urlGenerator->getBaseUrl(), - $webroot, - $removeWebroot + $isRootRequest ); - if ($baseUrl !== $cliUrl) { - $testUrls[] = $baseUrl . $url; - } - /* Last resort: trusted domains */ - $hosts = $this->config->getSystemValue('trusted_domains', []); - foreach ($hosts as $host) { + $trustedDomains = $this->config->getSystemValue('trusted_domains', []); + foreach ($trustedDomains as $host) { if (str_contains($host, '*')) { /* Ignore domains with a wildcard */ continue; } - $hosts[] = 'https://' . $host . $url; - $hosts[] = 'http://' . $host . $url; + $baseUrls[] = $this->normalizeUrl("https://$host$webroot", $isRootRequest); + $baseUrls[] = $this->normalizeUrl("http://$host$webroot", $isRootRequest); } - return $testUrls; + return array_map(fn (string $host) => $host . $url, array_values(array_unique($baseUrls))); } /** * Strip a trailing slash and remove the webroot if requested. + * @param string $url The URL to normalize. Should be an absolute URL containing scheme, host and optionally web-root. + * @param bool $removeWebroot If set the web-root is removed from the URL and an absolute URL with only the scheme and host (optional port) is returned */ - protected function normalizeUrl(string $url, string $webroot, bool $removeWebroot): string { - $url = rtrim($url, '/'); - if ($removeWebroot && str_ends_with($url, $webroot)) { - $url = substr($url, -strlen($webroot)); + protected function normalizeUrl(string $url, bool $removeWebroot): string { + if ($removeWebroot) { + $segments = parse_url($url); + $port = isset($segments['port']) ? (':' . $segments['port']) : ''; + return $segments['scheme'] . '://' . $segments['host'] . $port; } return rtrim($url, '/'); } @@ -97,25 +102,28 @@ trait CheckServerResponseTrait { /** * Run a HTTP request to check header * @param string $method The HTTP method to use - * @param string $url The relative URL to check - * @param array{ignoreSSL?: bool, httpErrors?: bool, options?: array} $options Additional options, like + * @param string $url The absolute path (URL with webroot but without host) to check, can be the output of `IURLGenerator` + * @param bool $isRootRequest If set the webroot is removed from URLs to make the request target the host's root. Example usage are the /.well-known URLs in the root path. + * @param array{ignoreSSL?: bool, httpErrors?: bool, options?: array} $options HTTP client related options, like * [ * // Ignore invalid SSL certificates (e.g. self signed) * 'ignoreSSL' => true, * // Ignore requests with HTTP errors (will not yield if request has a 4xx or 5xx response) * 'httpErrors' => true, + * // Additional options for the HTTP client (see `IClient`) + * 'options' => [], * ] * * @return Generator<int, IResponse> */ - protected function runRequest(string $method, string $url, array $options = [], bool $removeWebroot = false): Generator { + protected function runRequest(string $method, string $url, array $options = [], bool $isRootRequest = false): Generator { $options = array_merge(['ignoreSSL' => true, 'httpErrors' => true], $options); $client = $this->clientService->newClient(); $requestOptions = $this->getRequestOptions($options['ignoreSSL'], $options['httpErrors']); $requestOptions = array_merge($requestOptions, $options['options'] ?? []); - foreach ($this->getTestUrls($url, $removeWebroot) as $testURL) { + foreach ($this->getTestUrls($url, $isRootRequest) as $testURL) { try { yield $client->request($method, $testURL, $requestOptions); } catch (\Throwable $e) { @@ -126,7 +134,7 @@ trait CheckServerResponseTrait { /** * Run a HEAD request to check header - * @param string $url The relative URL to check + * @param string $url The relative URL to check (e.g. output of IURLGenerator) * @param bool $ignoreSSL Ignore SSL certificates * @param bool $httpErrors Ignore requests with HTTP errors (will not yield if request has a 4xx or 5xx response) * @return Generator<int, IResponse> diff --git a/apps/settings/lib/SetupChecks/DataDirectoryProtected.php b/apps/settings/lib/SetupChecks/DataDirectoryProtected.php index 447c66d5c5d..051494adb62 100644 --- a/apps/settings/lib/SetupChecks/DataDirectoryProtected.php +++ b/apps/settings/lib/SetupChecks/DataDirectoryProtected.php @@ -40,9 +40,8 @@ class DataDirectoryProtected implements ISetupCheck { } public function run(): SetupResult { - $datadir = str_replace(\OC::$SERVERROOT . '/', '', $this->config->getSystemValue('datadirectory', '')); - - $dataUrl = $this->urlGenerator->getWebroot() . '/' . $datadir . '/.ncdata'; + $dataDir = str_replace(\OC::$SERVERROOT . '/', '', $this->config->getSystemValueString('datadirectory', '')); + $dataUrl = $this->urlGenerator->linkTo('', $dataDir . '/.ncdata'); $noResponse = true; foreach ($this->runRequest('GET', $dataUrl, [ 'httpErrors' => false ]) as $response) { diff --git a/apps/settings/lib/SetupChecks/WellKnownUrls.php b/apps/settings/lib/SetupChecks/WellKnownUrls.php index 565544cfdd7..623b9fae90c 100644 --- a/apps/settings/lib/SetupChecks/WellKnownUrls.php +++ b/apps/settings/lib/SetupChecks/WellKnownUrls.php @@ -50,9 +50,10 @@ class WellKnownUrls implements ISetupCheck { ['propfind', '/.well-known/carddav', [207], false], ]; + $requestOptions = ['httpErrors' => false, 'options' => ['allow_redirects' => ['track_redirects' => true]]]; foreach ($urls as [$verb,$url,$validStatuses,$checkCustomHeader]) { $works = null; - foreach ($this->runRequest($verb, $url, ['httpErrors' => false, 'options' => ['allow_redirects' => ['track_redirects' => true]]], removeWebroot: true) as $response) { + foreach ($this->runRequest($verb, $url, $requestOptions, isRootRequest: true) as $response) { // Check that the response status matches $works = in_array($response->getStatusCode(), $validStatuses); // and (if needed) the custom Nextcloud header is set diff --git a/apps/settings/lib/SetupChecks/Woff2Loading.php b/apps/settings/lib/SetupChecks/Woff2Loading.php index 5d8f23338e3..769653c4618 100644 --- a/apps/settings/lib/SetupChecks/Woff2Loading.php +++ b/apps/settings/lib/SetupChecks/Woff2Loading.php @@ -17,7 +17,7 @@ use OCP\SetupCheck\SetupResult; use Psr\Log\LoggerInterface; /** - * Check whether the WOFF2 URLs works + * Check whether the OTF and WOFF2 URLs works */ class Woff2Loading implements ISetupCheck { use CheckServerResponseTrait; @@ -36,11 +36,18 @@ class Woff2Loading implements ISetupCheck { } public function getName(): string { - return $this->l10n->t('WOFF2 file loading'); + return $this->l10n->t('Font file loading'); } public function run(): SetupResult { - $url = $this->urlGenerator->linkTo('', 'core/fonts/NotoSans-Regular-latin.woff2'); + $result = $this->checkFont('otf', $this->urlGenerator->linkTo('theming', 'fonts/OpenDyslexic-Regular.otf')); + if ($result->getSeverity() !== SetupResult::SUCCESS) { + return $result; + } + return $this->checkFont('woff2', $this->urlGenerator->linkTo('', 'core/fonts/NotoSans-Regular-latin.woff2')); + } + + protected function checkFont(string $fileExtension, string $url): SetupResult { $noResponse = true; $responses = $this->runHEAD($url); foreach ($responses as $response) { @@ -52,14 +59,22 @@ class Woff2Loading implements ISetupCheck { if ($noResponse) { return SetupResult::info( - $this->l10n->t('Could not check for WOFF2 loading support. Please check manually if your webserver serves `.woff2` files.') . "\n" . $this->serverConfigHelp(), + str_replace( + '{extension}', + $fileExtension, + $this->l10n->t('Could not check for {extension} loading support. Please check manually if your webserver serves `.{extension}` files.') . "\n" . $this->serverConfigHelp(), + ), $this->urlGenerator->linkToDocs('admin-nginx'), ); } return SetupResult::warning( - $this->l10n->t('Your web server is not properly set up to deliver .woff2 files. This is typically an issue with the Nginx configuration. For Nextcloud 15 it needs an adjustement to also deliver .woff2 files. Compare your Nginx configuration to the recommended configuration in our documentation.'), + str_replace( + '{extension}', + $fileExtension, + $this->l10n->t('Your web server is not properly set up to deliver .{extension} files. This is typically an issue with the Nginx configuration. For Nextcloud 15 it needs an adjustment to also deliver .{extension} files. Compare your Nginx configuration to the recommended configuration in our documentation.'), + ), $this->urlGenerator->linkToDocs('admin-nginx'), ); - + } } diff --git a/apps/settings/tests/Activity/SecurityFilterTest.php b/apps/settings/tests/Activity/SecurityFilterTest.php index 637c717da02..f3f94df3d21 100644 --- a/apps/settings/tests/Activity/SecurityFilterTest.php +++ b/apps/settings/tests/Activity/SecurityFilterTest.php @@ -31,15 +31,15 @@ class SecurityFilterTest extends TestCase { $this->filter = new SecurityFilter($this->urlGenerator, $this->l10n); } - public function testAllowedApps() { + public function testAllowedApps(): void { $this->assertEquals([], $this->filter->allowedApps()); } - public function testFilterTypes() { + public function testFilterTypes(): void { $this->assertEquals(['security'], $this->filter->filterTypes(['comments', 'security'])); } - public function testGetIcon() { + public function testGetIcon(): void { $this->urlGenerator->expects($this->once()) ->method('imagePath') ->with('core', 'actions/password.svg') @@ -51,11 +51,11 @@ class SecurityFilterTest extends TestCase { $this->assertEquals('abs/path/to/icon.svg', $this->filter->getIcon()); } - public function testGetIdentifier() { + public function testGetIdentifier(): void { $this->assertEquals('security', $this->filter->getIdentifier()); } - public function testGetName() { + public function testGetName(): void { $this->l10n->expects($this->once()) ->method('t') ->with('Security') @@ -63,7 +63,7 @@ class SecurityFilterTest extends TestCase { $this->assertEquals('translated', $this->filter->getName()); } - public function testGetPriority() { + public function testGetPriority(): void { $this->assertEquals(30, $this->filter->getPriority()); } } diff --git a/apps/settings/tests/Activity/SecurityProviderTest.php b/apps/settings/tests/Activity/SecurityProviderTest.php index 9d10b1e596e..b00c62281cc 100644 --- a/apps/settings/tests/Activity/SecurityProviderTest.php +++ b/apps/settings/tests/Activity/SecurityProviderTest.php @@ -39,7 +39,7 @@ class SecurityProviderTest extends TestCase { $this->provider = new SecurityProvider($this->l10n, $this->urlGenerator, $this->activityManager); } - public function testParseUnrelated() { + public function testParseUnrelated(): void { $lang = 'ru'; $event = $this->createMock(IEvent::class); $event->expects($this->once()) @@ -60,7 +60,7 @@ class SecurityProviderTest extends TestCase { /** * @dataProvider subjectData */ - public function testParse($subject) { + public function testParse($subject): void { $lang = 'ru'; $event = $this->createMock(IEvent::class); $l = $this->createMock(IL10N::class); @@ -96,7 +96,7 @@ class SecurityProviderTest extends TestCase { $this->provider->parse($lang, $event); } - public function testParseInvalidSubject() { + public function testParseInvalidSubject(): void { $lang = 'ru'; $l = $this->createMock(IL10N::class); $event = $this->createMock(IEvent::class); diff --git a/apps/settings/tests/Activity/SecuritySettingTest.php b/apps/settings/tests/Activity/SecuritySettingTest.php index dd28d757e72..1b2b0e3361c 100644 --- a/apps/settings/tests/Activity/SecuritySettingTest.php +++ b/apps/settings/tests/Activity/SecuritySettingTest.php @@ -23,19 +23,19 @@ class SecuritySettingTest extends TestCase { $this->setting = new SecuritySetting($this->l10n); } - public function testCanChangeMail() { + public function testCanChangeMail(): void { $this->assertFalse($this->setting->canChangeMail()); } - public function testCanChangeStream() { + public function testCanChangeStream(): void { $this->assertFalse($this->setting->canChangeStream()); } - public function testGetIdentifier() { + public function testGetIdentifier(): void { $this->assertEquals('security', $this->setting->getIdentifier()); } - public function testGetName() { + public function testGetName(): void { $this->l10n->expects($this->once()) ->method('t') ->with('Security') @@ -43,11 +43,11 @@ class SecuritySettingTest extends TestCase { $this->assertEquals('Sicherheit', $this->setting->getName()); } - public function testGetPriority() { + public function testGetPriority(): void { $this->assertEquals(30, $this->setting->getPriority()); } - public function testIsDefaultEnabled() { + public function testIsDefaultEnabled(): void { $this->assertTrue($this->setting->isDefaultEnabledMail()); $this->assertTrue($this->setting->isDefaultEnabledStream()); } diff --git a/apps/settings/tests/AppInfo/ApplicationTest.php b/apps/settings/tests/AppInfo/ApplicationTest.php index 60c37e42015..677efdc64bf 100644 --- a/apps/settings/tests/AppInfo/ApplicationTest.php +++ b/apps/settings/tests/AppInfo/ApplicationTest.php @@ -38,7 +38,7 @@ class ApplicationTest extends TestCase { $this->container = $this->app->getContainer(); } - public function testContainerAppName() { + public function testContainerAppName(): void { $this->app = new Application(); $this->assertEquals('settings', $this->container->getAppName()); } @@ -62,7 +62,7 @@ class ApplicationTest extends TestCase { * @param string $service * @param string $expected */ - public function testContainerQuery($service, $expected) { + public function testContainerQuery($service, $expected): void { $this->assertTrue($this->container->query($service) instanceof $expected); } } diff --git a/apps/settings/tests/Controller/AdminSettingsControllerTest.php b/apps/settings/tests/Controller/AdminSettingsControllerTest.php index 578348a3031..60ba5e0750e 100644 --- a/apps/settings/tests/Controller/AdminSettingsControllerTest.php +++ b/apps/settings/tests/Controller/AdminSettingsControllerTest.php @@ -87,7 +87,7 @@ class AdminSettingsControllerTest extends TestCase { parent::tearDown(); } - public function testIndex() { + public function testIndex(): void { $user = $this->createMock(IUser::class); $this->userSession ->method('getUser') diff --git a/apps/settings/tests/Controller/AppSettingsControllerTest.php b/apps/settings/tests/Controller/AppSettingsControllerTest.php index 71d263ac935..c219ee2fc9f 100644 --- a/apps/settings/tests/Controller/AppSettingsControllerTest.php +++ b/apps/settings/tests/Controller/AppSettingsControllerTest.php @@ -116,7 +116,7 @@ class AppSettingsControllerTest extends TestCase { ); } - public function testListCategories() { + public function testListCategories(): void { $this->installer->expects($this->any()) ->method('isUpdateAvailable') ->willReturn(false); @@ -171,7 +171,7 @@ class AppSettingsControllerTest extends TestCase { $this->assertEquals($expected, $this->appSettingsController->listCategories()); } - public function testViewApps() { + public function testViewApps(): void { $this->bundleFetcher->expects($this->once())->method('getBundles')->willReturn([]); $this->installer->expects($this->any()) ->method('isUpdateAvailable') @@ -204,7 +204,7 @@ class AppSettingsControllerTest extends TestCase { $this->assertEquals($expected, $this->appSettingsController->viewApps()); } - public function testViewAppsAppstoreNotEnabled() { + public function testViewAppsAppstoreNotEnabled(): void { $this->installer->expects($this->any()) ->method('isUpdateAvailable') ->willReturn(false); diff --git a/apps/settings/tests/Controller/AuthSettingsControllerTest.php b/apps/settings/tests/Controller/AuthSettingsControllerTest.php index a054d5e306c..13213992d94 100644 --- a/apps/settings/tests/Controller/AuthSettingsControllerTest.php +++ b/apps/settings/tests/Controller/AuthSettingsControllerTest.php @@ -74,7 +74,7 @@ class AuthSettingsControllerTest extends TestCase { ); } - public function testCreate() { + public function testCreate(): void { $name = 'Nexus 4'; $sessionToken = $this->createMock(IToken::class); $deviceToken = $this->createMock(IToken::class); @@ -123,7 +123,7 @@ class AuthSettingsControllerTest extends TestCase { $this->assertEquals($expected, $response->getData()); } - public function testCreateSessionNotAvailable() { + public function testCreateSessionNotAvailable(): void { $name = 'personal phone'; $this->session->expects($this->once()) @@ -136,7 +136,7 @@ class AuthSettingsControllerTest extends TestCase { $this->assertEquals($expected, $this->controller->create($name)); } - public function testCreateInvalidToken() { + public function testCreateInvalidToken(): void { $name = 'Company IPhone'; $this->session->expects($this->once()) @@ -153,7 +153,7 @@ class AuthSettingsControllerTest extends TestCase { $this->assertEquals($expected, $this->controller->create($name)); } - public function testDestroy() { + public function testDestroy(): void { $tokenId = 124; $token = $this->createMock(PublicKeyToken::class); @@ -175,7 +175,7 @@ class AuthSettingsControllerTest extends TestCase { $this->assertEquals([], $this->controller->destroy($tokenId)); } - public function testDestroyExpired() { + public function testDestroyExpired(): void { $tokenId = 124; $token = $this->createMock(PublicKeyToken::class); @@ -199,7 +199,7 @@ class AuthSettingsControllerTest extends TestCase { $this->assertSame([], $this->controller->destroy($tokenId)); } - public function testDestroyWrongUser() { + public function testDestroyWrongUser(): void { $tokenId = 124; $token = $this->createMock(PublicKeyToken::class); @@ -331,7 +331,7 @@ class AuthSettingsControllerTest extends TestCase { $this->assertSame([], $this->controller->update($tokenId, [IToken::SCOPE_FILESYSTEM => true], 'App password')); } - public function testUpdateExpired() { + public function testUpdateExpired(): void { $tokenId = 42; $token = $this->createMock(PublicKeyToken::class); @@ -351,7 +351,7 @@ class AuthSettingsControllerTest extends TestCase { $this->assertSame([], $this->controller->update($tokenId, [IToken::SCOPE_FILESYSTEM => true], 'App password')); } - public function testUpdateTokenWrongUser() { + public function testUpdateTokenWrongUser(): void { $tokenId = 42; $token = $this->createMock(PublicKeyToken::class); @@ -371,7 +371,7 @@ class AuthSettingsControllerTest extends TestCase { $this->assertSame(\OCP\AppFramework\Http::STATUS_NOT_FOUND, $response->getStatus()); } - public function testUpdateTokenNonExisting() { + public function testUpdateTokenNonExisting(): void { $this->tokenProvider->expects($this->once()) ->method('getTokenById') ->with($this->equalTo(42)) diff --git a/apps/settings/tests/Controller/CheckSetupControllerTest.php b/apps/settings/tests/Controller/CheckSetupControllerTest.php index fde13cfee31..27f7aa1b696 100644 --- a/apps/settings/tests/Controller/CheckSetupControllerTest.php +++ b/apps/settings/tests/Controller/CheckSetupControllerTest.php @@ -84,7 +84,7 @@ class CheckSetupControllerTest extends TestCase { ])->getMock(); } - public function testCheck() { + public function testCheck(): void { $this->config->expects($this->any()) ->method('getAppValue') ->willReturnMap([ @@ -142,7 +142,7 @@ class CheckSetupControllerTest extends TestCase { $this->assertEquals($expected, $this->checkSetupController->check()); } - public function testRescanFailedIntegrityCheck() { + public function testRescanFailedIntegrityCheck(): void { $this->checker ->expects($this->once()) ->method('runInstanceVerification'); @@ -156,7 +156,7 @@ class CheckSetupControllerTest extends TestCase { $this->assertEquals($expected, $this->checkSetupController->rescanFailedIntegrityCheck()); } - public function testGetFailedIntegrityCheckDisabled() { + public function testGetFailedIntegrityCheckDisabled(): void { $this->checker ->expects($this->once()) ->method('isCodeCheckEnforced') @@ -167,7 +167,7 @@ class CheckSetupControllerTest extends TestCase { } - public function testGetFailedIntegrityCheckFilesWithNoErrorsFound() { + public function testGetFailedIntegrityCheckFilesWithNoErrorsFound(): void { $this->checker ->expects($this->once()) ->method('isCodeCheckEnforced') @@ -187,7 +187,7 @@ class CheckSetupControllerTest extends TestCase { $this->assertEquals($expected, $this->checkSetupController->getFailedIntegrityCheckFiles()); } - public function testGetFailedIntegrityCheckFilesWithSomeErrorsFound() { + public function testGetFailedIntegrityCheckFilesWithSomeErrorsFound(): void { $this->checker ->expects($this->once()) ->method('isCodeCheckEnforced') diff --git a/apps/settings/tests/Controller/DelegationControllerTest.php b/apps/settings/tests/Controller/DelegationControllerTest.php index 2d03e316ce9..5994ddf298d 100644 --- a/apps/settings/tests/Controller/DelegationControllerTest.php +++ b/apps/settings/tests/Controller/DelegationControllerTest.php @@ -32,7 +32,7 @@ class DelegationControllerTest extends TestCase { ); } - public function testSaveSettings() { + public function testSaveSettings(): void { $setting = 'MySecretSetting'; $oldGroups = []; $oldGroups[] = AuthorizedGroup::fromParams(['groupId' => 'hello', 'class' => $setting]); diff --git a/apps/settings/tests/Controller/MailSettingsControllerTest.php b/apps/settings/tests/Controller/MailSettingsControllerTest.php index 52642884d23..d4d1e319a8e 100644 --- a/apps/settings/tests/Controller/MailSettingsControllerTest.php +++ b/apps/settings/tests/Controller/MailSettingsControllerTest.php @@ -58,7 +58,7 @@ class MailSettingsControllerTest extends \Test\TestCase { ); } - public function testSetMailSettings() { + public function testSetMailSettings(): void { $this->config->expects($this->exactly(2)) ->method('setSystemValues') ->withConsecutive( @@ -113,7 +113,7 @@ class MailSettingsControllerTest extends \Test\TestCase { $this->assertSame(Http::STATUS_OK, $response->getStatus()); } - public function testStoreCredentials() { + public function testStoreCredentials(): void { $this->config ->expects($this->once()) ->method('setSystemValues') @@ -126,7 +126,7 @@ class MailSettingsControllerTest extends \Test\TestCase { $this->assertSame(Http::STATUS_OK, $response->getStatus()); } - public function testSendTestMail() { + public function testSendTestMail(): void { $user = $this->createMock(User::class); $user->expects($this->any()) ->method('getUID') diff --git a/apps/settings/tests/Controller/TwoFactorSettingsControllerTest.php b/apps/settings/tests/Controller/TwoFactorSettingsControllerTest.php index 91b532b05f8..c34b2907dfd 100644 --- a/apps/settings/tests/Controller/TwoFactorSettingsControllerTest.php +++ b/apps/settings/tests/Controller/TwoFactorSettingsControllerTest.php @@ -37,7 +37,7 @@ class TwoFactorSettingsControllerTest extends TestCase { ); } - public function testIndex() { + public function testIndex(): void { $state = new EnforcementState(true); $this->mandatoryTwoFactor->expects($this->once()) ->method('getState') @@ -49,7 +49,7 @@ class TwoFactorSettingsControllerTest extends TestCase { $this->assertEquals($expected, $resp); } - public function testUpdate() { + public function testUpdate(): void { $state = new EnforcementState(true); $this->mandatoryTwoFactor->expects($this->once()) ->method('setState') diff --git a/apps/settings/tests/Controller/UsersControllerTest.php b/apps/settings/tests/Controller/UsersControllerTest.php index e1407cb1b55..db346ab89f2 100644 --- a/apps/settings/tests/Controller/UsersControllerTest.php +++ b/apps/settings/tests/Controller/UsersControllerTest.php @@ -249,7 +249,7 @@ class UsersControllerTest extends \Test\TestCase { * @param bool $validEmail * @param $expectedStatus */ - public function testSetUserSettings($email, $validEmail, $expectedStatus) { + public function testSetUserSettings($email, $validEmail, $expectedStatus): void { $controller = $this->getController(false, ['saveUserSettings']); $user = $this->createMock(IUser::class); $user->method('getUID')->willReturn('johndoe'); @@ -303,7 +303,7 @@ class UsersControllerTest extends \Test\TestCase { ]; } - public function testSetUserSettingsWhenUserDisplayNameChangeNotAllowed() { + public function testSetUserSettingsWhenUserDisplayNameChangeNotAllowed(): void { $controller = $this->getController(false, ['saveUserSettings']); $avatarScope = IAccountManager::SCOPE_PUBLISHED; @@ -401,7 +401,7 @@ class UsersControllerTest extends \Test\TestCase { ); } - public function testSetUserSettingsWhenFederatedFilesharingNotEnabled() { + public function testSetUserSettingsWhenFederatedFilesharingNotEnabled(): void { $controller = $this->getController(false, ['saveUserSettings']); $user = $this->createMock(IUser::class); $user->method('getUID')->willReturn('johndoe'); @@ -488,7 +488,7 @@ class UsersControllerTest extends \Test\TestCase { * @param string $property * @param string $propertyValue */ - public function testSetUserSettingsSubset($property, $propertyValue) { + public function testSetUserSettingsSubset($property, $propertyValue): void { $controller = $this->getController(false, ['saveUserSettings']); $user = $this->createMock(IUser::class); $user->method('getUID')->willReturn('johndoe'); @@ -619,7 +619,7 @@ class UsersControllerTest extends \Test\TestCase { public function testSaveUserSettings($data, $oldEmailAddress, $oldDisplayName - ) { + ): void { $controller = $this->getController(); $user = $this->createMock(IUser::class); @@ -742,7 +742,7 @@ class UsersControllerTest extends \Test\TestCase { string $oldDisplayName, bool $setDisplayNameResult, bool $canChangeEmail - ) { + ): void { $this->expectException(ForbiddenException::class); $controller = $this->getController(); @@ -826,7 +826,7 @@ class UsersControllerTest extends \Test\TestCase { * * @dataProvider dataTestGetVerificationCode */ - public function testGetVerificationCode($account, $type, $dataBefore, $expectedData, $onlyVerificationCode) { + public function testGetVerificationCode($account, $type, $dataBefore, $expectedData, $onlyVerificationCode): void { $message = 'Use my Federated Cloud ID to share with me: user@nextcloud.com'; $signature = 'theSignature'; @@ -912,7 +912,7 @@ class UsersControllerTest extends \Test\TestCase { /** * test get verification code in case no valid user was given */ - public function testGetVerificationCodeInvalidUser() { + public function testGetVerificationCodeInvalidUser(): void { $controller = $this->getController(); $this->userSession->expects($this->once())->method('getUser')->willReturn(null); $result = $controller->getVerificationCode('account', false); @@ -931,7 +931,7 @@ class UsersControllerTest extends \Test\TestCase { public function testCanAdminChangeUserPasswords($encryptionEnabled, $encryptionModuleLoaded, $masterKeyEnabled, - $expected) { + $expected): void { $controller = $this->getController(); $this->encryptionManager->expects($this->any()) diff --git a/apps/settings/tests/Mailer/NewUserMailHelperTest.php b/apps/settings/tests/Mailer/NewUserMailHelperTest.php index 2f9f7bcba7b..579ab2cdbb0 100644 --- a/apps/settings/tests/Mailer/NewUserMailHelperTest.php +++ b/apps/settings/tests/Mailer/NewUserMailHelperTest.php @@ -102,7 +102,7 @@ class NewUserMailHelperTest extends TestCase { ); } - public function testGenerateTemplateWithPasswordResetToken() { + public function testGenerateTemplateWithPasswordResetToken(): void { $this->secureRandom ->expects($this->once()) ->method('generate') @@ -357,7 +357,7 @@ EOF; $this->assertSame('OC\Mail\EMailTemplate', get_class($result)); } - public function testGenerateTemplateWithoutPasswordResetToken() { + public function testGenerateTemplateWithoutPasswordResetToken(): void { $this->urlGenerator ->expects($this->any()) ->method('getAbsoluteURL') @@ -593,7 +593,7 @@ EOF; $this->assertSame('OC\Mail\EMailTemplate', get_class($result)); } - public function testGenerateTemplateWithoutUserId() { + public function testGenerateTemplateWithoutUserId(): void { $this->urlGenerator ->expects($this->any()) ->method('getAbsoluteURL') @@ -816,7 +816,7 @@ EOF; $this->assertSame('OC\Mail\EMailTemplate', get_class($result)); } - public function testSendMail() { + public function testSendMail(): void { /** @var IUser|\PHPUnit\Framework\MockObject\MockObject $user */ $user = $this->createMock(IUser::class); $user diff --git a/apps/settings/tests/Middleware/SubadminMiddlewareTest.php b/apps/settings/tests/Middleware/SubadminMiddlewareTest.php index 1a832c528bf..c4672a06d49 100644 --- a/apps/settings/tests/Middleware/SubadminMiddlewareTest.php +++ b/apps/settings/tests/Middleware/SubadminMiddlewareTest.php @@ -44,7 +44,7 @@ class SubadminMiddlewareTest extends \Test\TestCase { } - public function testBeforeControllerAsUserWithExemption() { + public function testBeforeControllerAsUserWithExemption(): void { $this->expectException(\OC\AppFramework\Middleware\Security\Exceptions\NotAdminException::class); $this->reflector @@ -58,7 +58,7 @@ class SubadminMiddlewareTest extends \Test\TestCase { } - public function testBeforeControllerAsUserWithoutExemption() { + public function testBeforeControllerAsUserWithoutExemption(): void { $this->reflector ->expects($this->once()) ->method('hasAnnotation') @@ -67,7 +67,7 @@ class SubadminMiddlewareTest extends \Test\TestCase { $this->subadminMiddleware->beforeController($this->controller, 'foo'); } - public function testBeforeControllerAsSubAdminWithoutExemption() { + public function testBeforeControllerAsSubAdminWithoutExemption(): void { $this->reflector ->expects($this->exactly(2)) ->method('hasAnnotation') @@ -78,7 +78,7 @@ class SubadminMiddlewareTest extends \Test\TestCase { $this->subadminMiddlewareAsSubAdmin->beforeController($this->controller, 'foo'); } - public function testBeforeControllerAsSubAdminWithExemption() { + public function testBeforeControllerAsSubAdminWithExemption(): void { $this->reflector ->expects($this->once()) ->method('hasAnnotation') @@ -87,14 +87,14 @@ class SubadminMiddlewareTest extends \Test\TestCase { $this->subadminMiddlewareAsSubAdmin->beforeController($this->controller, 'foo'); } - public function testAfterNotAdminException() { + public function testAfterNotAdminException(): void { $expectedResponse = new TemplateResponse('core', '403', [], 'guest'); $expectedResponse->setStatus(403); $this->assertEquals($expectedResponse, $this->subadminMiddleware->afterException($this->controller, 'foo', new NotAdminException(''))); } - public function testAfterRegularException() { + public function testAfterRegularException(): void { $this->expectException(\Exception::class); $expectedResponse = new TemplateResponse('core', '403', [], 'guest'); diff --git a/apps/settings/tests/Settings/Admin/MailTest.php b/apps/settings/tests/Settings/Admin/MailTest.php index cab0596ad44..021dbac241b 100644 --- a/apps/settings/tests/Settings/Admin/MailTest.php +++ b/apps/settings/tests/Settings/Admin/MailTest.php @@ -30,7 +30,7 @@ class MailTest extends TestCase { ); } - public function testGetForm() { + public function testGetForm(): void { $this->config ->expects($this->any()) ->method('getSystemValue') @@ -69,11 +69,11 @@ class MailTest extends TestCase { $this->assertEquals($expected, $this->admin->getForm()); } - public function testGetSection() { + public function testGetSection(): void { $this->assertSame('server', $this->admin->getSection()); } - public function testGetPriority() { + public function testGetPriority(): void { $this->assertSame(10, $this->admin->getPriority()); } } diff --git a/apps/settings/tests/Settings/Admin/SecurityTest.php b/apps/settings/tests/Settings/Admin/SecurityTest.php index 4af8ad496ce..95b5e988397 100644 --- a/apps/settings/tests/Settings/Admin/SecurityTest.php +++ b/apps/settings/tests/Settings/Admin/SecurityTest.php @@ -57,7 +57,7 @@ class SecurityTest extends TestCase { * @dataProvider encryptionSettingsProvider * @param bool $enabled */ - public function testGetFormWithOnlyOneBackend($enabled) { + public function testGetFormWithOnlyOneBackend($enabled): void { $this->manager ->expects($this->once()) ->method('isEnabled') @@ -87,7 +87,7 @@ class SecurityTest extends TestCase { * @dataProvider encryptionSettingsProvider * @param bool $enabled */ - public function testGetFormWithMultipleBackends($enabled) { + public function testGetFormWithMultipleBackends($enabled): void { $this->manager ->expects($this->once()) ->method('isEnabled') @@ -113,11 +113,11 @@ class SecurityTest extends TestCase { $this->assertEquals($expected, $this->admin->getForm()); } - public function testGetSection() { + public function testGetSection(): void { $this->assertSame('security', $this->admin->getSection()); } - public function testGetPriority() { + public function testGetPriority(): void { $this->assertSame(10, $this->admin->getPriority()); } } diff --git a/apps/settings/tests/Settings/Personal/Security/AuthtokensTest.php b/apps/settings/tests/Settings/Personal/Security/AuthtokensTest.php index d2cd10e34d3..44641ee98b3 100644 --- a/apps/settings/tests/Settings/Personal/Security/AuthtokensTest.php +++ b/apps/settings/tests/Settings/Personal/Security/AuthtokensTest.php @@ -57,7 +57,7 @@ class AuthtokensTest extends TestCase { ); } - public function testGetForm() { + public function testGetForm(): void { $token1 = new PublicKeyToken(); $token1->setId(100); $token2 = new PublicKeyToken(); diff --git a/apps/settings/tests/Settings/Personal/Security/PasswordTest.php b/apps/settings/tests/Settings/Personal/Security/PasswordTest.php index 4ed7583339e..62f2c998943 100644 --- a/apps/settings/tests/Settings/Personal/Security/PasswordTest.php +++ b/apps/settings/tests/Settings/Personal/Security/PasswordTest.php @@ -38,7 +38,7 @@ class PasswordTest extends TestCase { ); } - public function testGetForm() { + public function testGetForm(): void { $user = $this->createMock(IUser::class); $this->userManager->expects($this->once()) ->method('get') diff --git a/apps/settings/tests/SetupChecks/AppDirsWithDifferentOwnerTest.php b/apps/settings/tests/SetupChecks/AppDirsWithDifferentOwnerTest.php index 24fd28c5e9f..db3141e3a26 100644 --- a/apps/settings/tests/SetupChecks/AppDirsWithDifferentOwnerTest.php +++ b/apps/settings/tests/SetupChecks/AppDirsWithDifferentOwnerTest.php @@ -46,7 +46,7 @@ class AppDirsWithDifferentOwnerTest extends TestCase { * * @return void */ - public function testAppDirectoryOwnersOk() { + public function testAppDirectoryOwnersOk(): void { $tempDir = tempnam(sys_get_temp_dir(), 'apps') . 'dir'; mkdir($tempDir); mkdir($tempDir . DIRECTORY_SEPARATOR . 'app1'); @@ -73,7 +73,7 @@ class AppDirsWithDifferentOwnerTest extends TestCase { * * @return void */ - public function testAppDirectoryOwnersNotWritable() { + public function testAppDirectoryOwnersNotWritable(): void { $tempDir = tempnam(sys_get_temp_dir(), 'apps') . 'dir'; \OC::$APPSROOTS = [ [ diff --git a/apps/settings/tests/SetupChecks/CheckServerResponseTraitImplementation.php b/apps/settings/tests/SetupChecks/CheckServerResponseTraitImplementation.php new file mode 100644 index 00000000000..6c8b65855cc --- /dev/null +++ b/apps/settings/tests/SetupChecks/CheckServerResponseTraitImplementation.php @@ -0,0 +1,40 @@ +<?php + +declare(strict_types=1); + +/** + * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors + * SPDX-License-Identifier: AGPL-3.0-or-later + */ +namespace OCA\Settings\Tests\SetupChecks; + +use OCA\Settings\SetupChecks\CheckServerResponseTrait; +use OCP\Http\Client\IClientService; +use OCP\IConfig; +use OCP\IL10N; +use OCP\IURLGenerator; +use Psr\Log\LoggerInterface; + +/** + * Dummy implementation for CheckServerResponseTraitTest + */ +class CheckServerResponseTraitImplementation { + + use CheckServerResponseTrait { + CheckServerResponseTrait::getRequestOptions as public; + CheckServerResponseTrait::runHEAD as public; + CheckServerResponseTrait::runRequest as public; + CheckServerResponseTrait::normalizeUrl as public; + CheckServerResponseTrait::getTestUrls as public; + } + + public function __construct( + protected IL10N $l10n, + protected IConfig $config, + protected IURLGenerator $urlGenerator, + protected IClientService $clientService, + protected LoggerInterface $logger, + ) { + } + +} diff --git a/apps/settings/tests/SetupChecks/CheckServerResponseTraitTest.php b/apps/settings/tests/SetupChecks/CheckServerResponseTraitTest.php new file mode 100644 index 00000000000..e51546c1cf1 --- /dev/null +++ b/apps/settings/tests/SetupChecks/CheckServerResponseTraitTest.php @@ -0,0 +1,213 @@ +<?php + +declare(strict_types=1); + +/** + * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors + * SPDX-License-Identifier: AGPL-3.0-or-later + */ +namespace OCA\Settings\Tests\SetupChecks; + +use OCP\Http\Client\IClientService; +use OCP\IConfig; +use OCP\IL10N; +use OCP\IURLGenerator; +use PHPUnit\Framework\MockObject\MockObject; +use Psr\Log\LoggerInterface; +use Test\TestCase; + +class CheckServerResponseTraitTest extends TestCase { + + protected const BASE_URL = 'https://nextcloud.local'; + + private IL10N&MockObject $l10n; + private IConfig&MockObject $config; + private IURLGenerator&MockObject $urlGenerator; + private IClientService&MockObject $clientService; + private LoggerInterface&MockObject $logger; + + private CheckServerResponseTraitImplementation $trait; + + protected function setUp(): void { + parent::setUp(); + + $this->l10n = $this->createMock(IL10N::class); + $this->l10n->method('t') + ->willReturnArgument(0); + $this->config = $this->createMock(IConfig::class); + $this->urlGenerator = $this->createMock(IURLGenerator::class); + $this->clientService = $this->createMock(IClientService::class); + $this->logger = $this->createMock(LoggerInterface::class); + + $this->trait = new CheckServerResponseTraitImplementation( + $this->l10n, + $this->config, + $this->urlGenerator, + $this->clientService, + $this->logger, + ); + } + + /** + * @dataProvider dataNormalizeUrl + */ + public function testNormalizeUrl(string $url, bool $isRootRequest, string $expected): void { + $this->assertEquals($expected, $this->trait->normalizeUrl($url, $isRootRequest)); + } + + public static function dataNormalizeUrl(): array { + return [ + // untouched web-root + 'valid and nothing to change' => ['http://example.com/root', false, 'http://example.com/root'], + 'valid with port and nothing to change' => ['http://example.com:8081/root', false, 'http://example.com:8081/root'], + 'trailing slash' => ['http://example.com/root/', false, 'http://example.com/root'], + 'deep web root' => ['http://example.com/deep/webroot', false, 'http://example.com/deep/webroot'], + // removal of the web-root + 'remove web root' => ['http://example.com/root/', true, 'http://example.com'], + 'remove web root but empty' => ['http://example.com', true, 'http://example.com'], + 'remove deep web root' => ['http://example.com/deep/webroot', true, 'http://example.com'], + 'remove web root with port' => ['http://example.com:8081/root', true, 'http://example.com:8081'], + 'remove web root with port but empty' => ['http://example.com:8081', true, 'http://example.com:8081'], + 'remove web root from IP' => ['https://127.0.0.1/root', true, 'https://127.0.0.1'], + 'remove web root from IP with port' => ['https://127.0.0.1:8080/root', true, 'https://127.0.0.1:8080'], + 'remove web root from IPv6' => ['https://[ff02::1]/root', true, 'https://[ff02::1]'], + 'remove web root from IPv6 with port' => ['https://[ff02::1]:8080/root', true, 'https://[ff02::1]:8080'], + ]; + } + + /** + * @dataProvider dataGetTestUrls + */ + public function testGetTestUrls( + string $url, + bool $isRootRequest, + string $cliUrl, + string $webRoot, + array $trustedDomains, + array $expected, + ): void { + $this->config->expects(self::atLeastOnce()) + ->method('getSystemValueString') + ->with('overwrite.cli.url', '') + ->willReturn($cliUrl); + + $this->config->expects(self::atLeastOnce()) + ->method('getSystemValue') + ->with('trusted_domains', []) + ->willReturn($trustedDomains); + + $this->urlGenerator->expects(self::atLeastOnce()) + ->method('getWebroot') + ->willReturn($webRoot); + + $this->urlGenerator->expects(self::atLeastOnce()) + ->method('getBaseUrl') + ->willReturn(self::BASE_URL . $webRoot); + + $result = $this->trait->getTestUrls($url, $isRootRequest); + $this->assertEquals($expected, $result); + } + + /** + * @return array<string, list{string, bool, string, string, list<string>, list<string>}> + */ + public static function dataGetTestUrls(): array { + return [ + 'same cli and base URL' => [ + '/apps/files/js/example.js', false, 'https://nextcloud.local', '', ['nextcloud.local'], [ + // from cli url + 'https://nextcloud.local/apps/files/js/example.js', + // http variant from trusted domains + 'http://nextcloud.local/apps/files/js/example.js', + ] + ], + 'different cli and base URL' => [ + '/apps/files/js/example.js', false, 'https://example.com', '', ['nextcloud.local'], [ + // from cli url + 'https://example.com/apps/files/js/example.js', + // from base url + 'https://nextcloud.local/apps/files/js/example.js', + // http variant from trusted domains + 'http://nextcloud.local/apps/files/js/example.js', + ] + ], + 'different cli and base URL and trusted domains' => [ + '/apps/files/js/example.js', false, 'https://example.com', '', ['nextcloud.local', 'example.com', '127.0.0.1'], [ + // from cli url + 'https://example.com/apps/files/js/example.js', + // from base url + 'https://nextcloud.local/apps/files/js/example.js', + // http variant from trusted domains + 'http://nextcloud.local/apps/files/js/example.js', + 'http://example.com/apps/files/js/example.js', + // trusted domains + 'https://127.0.0.1/apps/files/js/example.js', + 'http://127.0.0.1/apps/files/js/example.js', + ] + ], + 'wildcard trusted domains' => [ + '/apps/files/js/example.js', false, '', '', ['nextcloud.local', '*.example.com'], [ + // from base url + 'https://nextcloud.local/apps/files/js/example.js', + // http variant from trusted domains + 'http://nextcloud.local/apps/files/js/example.js', + // trusted domains with wild card are skipped + ] + ], + 'missing leading slash' => [ + 'apps/files/js/example.js', false, 'https://nextcloud.local', '', ['nextcloud.local'], [ + // from cli url + 'https://nextcloud.local/apps/files/js/example.js', + // http variant from trusted domains + 'http://nextcloud.local/apps/files/js/example.js', + ] + ], + 'keep web-root' => [ + '/apps/files/js/example.js', false, 'https://example.com', '/nextcloud', ['nextcloud.local', 'example.com', '192.168.100.1'], [ + // from cli url (note that the CLI url has NO web root) + 'https://example.com/apps/files/js/example.js', + // from base url + 'https://nextcloud.local/nextcloud/apps/files/js/example.js', + // http variant from trusted domains + 'http://nextcloud.local/nextcloud/apps/files/js/example.js', + // trusted domains with web-root + 'https://example.com/nextcloud/apps/files/js/example.js', + 'http://example.com/nextcloud/apps/files/js/example.js', + 'https://192.168.100.1/nextcloud/apps/files/js/example.js', + 'http://192.168.100.1/nextcloud/apps/files/js/example.js', + ] + ], + // example if the URL is generated by the URL generator + 'keep web-root and web root in url' => [ + '/nextcloud/apps/files/js/example.js', false, 'https://example.com', '/nextcloud', ['nextcloud.local', 'example.com', '192.168.100.1'], [ + // from cli url (note that the CLI url has NO web root) + 'https://example.com/apps/files/js/example.js', + // from base url + 'https://nextcloud.local/nextcloud/apps/files/js/example.js', + // http variant from trusted domains + 'http://nextcloud.local/nextcloud/apps/files/js/example.js', + // trusted domains with web-root + 'https://example.com/nextcloud/apps/files/js/example.js', + 'http://example.com/nextcloud/apps/files/js/example.js', + 'https://192.168.100.1/nextcloud/apps/files/js/example.js', + 'http://192.168.100.1/nextcloud/apps/files/js/example.js', + ] + ], + 'remove web-root' => [ + '/.well-known/caldav', true, 'https://example.com', '/nextcloud', ['nextcloud.local', 'example.com', '192.168.100.1'], [ + // from cli url (note that the CLI url has NO web root) + 'https://example.com/.well-known/caldav', + // from base url + 'https://nextcloud.local/.well-known/caldav', + // http variant from trusted domains + 'http://nextcloud.local/.well-known/caldav', + 'http://example.com/.well-known/caldav', + // trusted domains with web-root + 'https://192.168.100.1/.well-known/caldav', + 'http://192.168.100.1/.well-known/caldav', + ] + ], + ]; + } + +} diff --git a/apps/settings/tests/SetupChecks/DataDirectoryProtectedTest.php b/apps/settings/tests/SetupChecks/DataDirectoryProtectedTest.php index fbee52fcf0f..51dffe58787 100644 --- a/apps/settings/tests/SetupChecks/DataDirectoryProtectedTest.php +++ b/apps/settings/tests/SetupChecks/DataDirectoryProtectedTest.php @@ -20,17 +20,17 @@ use Psr\Log\LoggerInterface; use Test\TestCase; class DataDirectoryProtectedTest extends TestCase { - private IL10N|MockObject $l10n; - private IConfig|MockObject $config; - private IURLGenerator|MockObject $urlGenerator; - private IClientService|MockObject $clientService; - private LoggerInterface|MockObject $logger; - private DataDirectoryProtected|MockObject $setupcheck; + private IL10N&MockObject $l10n; + private IConfig&MockObject $config; + private IURLGenerator&MockObject $urlGenerator; + private IClientService&MockObject $clientService; + private LoggerInterface&MockObject $logger; + private DataDirectoryProtected&MockObject $setupcheck; protected function setUp(): void { parent::setUp(); - /** @var IL10N|MockObject */ + /** @var IL10N&MockObject */ $this->l10n = $this->getMockBuilder(IL10N::class) ->disableOriginalConstructor()->getMock(); $this->l10n->expects($this->any()) @@ -74,14 +74,14 @@ class DataDirectoryProtectedTest extends TestCase { $this->config ->expects($this->once()) - ->method('getSystemValue') + ->method('getSystemValueString') ->willReturn(''); $result = $this->setupcheck->run(); $this->assertEquals($expected, $result->getSeverity()); } - public function dataTestStatusCode(): array { + public static function dataTestStatusCode(): array { return [ 'success: forbidden access' => [[403], SetupResult::SUCCESS, true], 'success: forbidden access with redirect' => [[200], SetupResult::SUCCESS, false], @@ -102,7 +102,7 @@ class DataDirectoryProtectedTest extends TestCase { $this->config ->expects($this->once()) - ->method('getSystemValue') + ->method('getSystemValueString') ->willReturn(''); $result = $this->setupcheck->run(); diff --git a/apps/sharebymail/tests/CapabilitiesTest.php b/apps/sharebymail/tests/CapabilitiesTest.php index 3d8aca1a537..d38618650b3 100644 --- a/apps/sharebymail/tests/CapabilitiesTest.php +++ b/apps/sharebymail/tests/CapabilitiesTest.php @@ -34,7 +34,7 @@ class CapabilitiesTest extends TestCase { $this->capabilities = new Capabilities($this->manager, $this->settingsManager, $this->appManager); } - public function testGetCapabilities() { + public function testGetCapabilities(): void { $this->manager->method('shareApiAllowLinks') ->willReturn(true); $this->manager->method('shareApiLinkEnforcePassword') diff --git a/apps/sharebymail/tests/ShareByMailProviderTest.php b/apps/sharebymail/tests/ShareByMailProviderTest.php index cad8dc49e34..c01f5b47632 100644 --- a/apps/sharebymail/tests/ShareByMailProviderTest.php +++ b/apps/sharebymail/tests/ShareByMailProviderTest.php @@ -148,7 +148,7 @@ class ShareByMailProviderTest extends TestCase { parent::tearDown(); } - public function testCreate() { + public function testCreate(): void { $expectedShare = $this->createMock(IShare::class); $share = $this->getMockBuilder(IShare::class)->getMock(); @@ -177,7 +177,7 @@ class ShareByMailProviderTest extends TestCase { $this->assertSame($expectedShare, $instance->create($share)); } - public function testCreateSendPasswordByMailWithoutEnforcedPasswordProtection() { + public function testCreateSendPasswordByMailWithoutEnforcedPasswordProtection(): void { $expectedShare = $this->createMock(IShare::class); $node = $this->getMockBuilder(File::class)->getMock(); @@ -219,7 +219,7 @@ class ShareByMailProviderTest extends TestCase { $instance->sendMailNotification($share); } - public function testCreateSendPasswordByMailWithPasswordAndWithoutEnforcedPasswordProtectionWithPermanentPassword() { + public function testCreateSendPasswordByMailWithPasswordAndWithoutEnforcedPasswordProtectionWithPermanentPassword(): void { $expectedShare = $this->createMock(IShare::class); $node = $this->getMockBuilder(File::class)->getMock(); @@ -265,7 +265,7 @@ class ShareByMailProviderTest extends TestCase { $instance->sendMailNotification($share); } - public function testCreateSendPasswordByMailWithPasswordAndWithoutEnforcedPasswordProtectionWithoutPermanentPassword() { + public function testCreateSendPasswordByMailWithPasswordAndWithoutEnforcedPasswordProtectionWithoutPermanentPassword(): void { $expectedShare = $this->createMock(IShare::class); $node = $this->getMockBuilder(File::class)->getMock(); @@ -318,7 +318,7 @@ class ShareByMailProviderTest extends TestCase { $instance->sendMailNotification($share); } - public function testCreateSendPasswordByMailWithEnforcedPasswordProtectionWithPermanentPassword() { + public function testCreateSendPasswordByMailWithEnforcedPasswordProtectionWithPermanentPassword(): void { $expectedShare = $this->createMock(IShare::class); $node = $this->getMockBuilder(File::class)->getMock(); @@ -399,7 +399,7 @@ class ShareByMailProviderTest extends TestCase { $instance->sendMailNotification($share); } - public function testCreateSendPasswordByMailWithPasswordAndWithEnforcedPasswordProtectionWithPermanentPassword() { + public function testCreateSendPasswordByMailWithPasswordAndWithEnforcedPasswordProtectionWithPermanentPassword(): void { $expectedShare = $this->createMock(IShare::class); $node = $this->getMockBuilder(File::class)->getMock(); @@ -473,7 +473,7 @@ class ShareByMailProviderTest extends TestCase { $instance->sendMailNotification($share); } - public function testCreateSendPasswordByTalkWithEnforcedPasswordProtectionWithPermanentPassword() { + public function testCreateSendPasswordByTalkWithEnforcedPasswordProtectionWithPermanentPassword(): void { $expectedShare = $this->createMock(IShare::class); // The owner of the share. @@ -617,7 +617,7 @@ class ShareByMailProviderTest extends TestCase { $instance->sendMailNotification($share); } - public function testCreateFailed() { + public function testCreateFailed(): void { $this->expectException(\Exception::class); $this->share->expects($this->once())->method('getSharedWith')->willReturn('user1'); @@ -637,7 +637,7 @@ class ShareByMailProviderTest extends TestCase { ); } - public function testCreateMailShare() { + public function testCreateMailShare(): void { $this->share->expects($this->any())->method('getToken')->willReturn('token'); $this->share->expects($this->once())->method('setToken')->with('token'); $this->share->expects($this->any())->method('getSharedBy')->willReturn('validby@valid.com'); @@ -662,7 +662,7 @@ class ShareByMailProviderTest extends TestCase { ); } - public function testGenerateToken() { + public function testGenerateToken(): void { $instance = $this->getInstance(); $this->secureRandom->expects($this->once())->method('generate')->willReturn('token'); @@ -672,7 +672,7 @@ class ShareByMailProviderTest extends TestCase { ); } - public function testAddShareToDB() { + public function testAddShareToDB(): void { $itemSource = 11; $itemType = 'file'; $shareWith = 'user@server.com'; @@ -735,7 +735,7 @@ class ShareByMailProviderTest extends TestCase { $this->assertSame($expiration->getTimestamp(), \DateTime::createFromFormat('Y-m-d H:i:s', $result[0]['expiration'])->getTimestamp()); } - public function testUpdate() { + public function testUpdate(): void { $itemSource = 11; $itemType = 'file'; $shareWith = 'user@server.com'; @@ -803,7 +803,7 @@ class ShareByMailProviderTest extends TestCase { * @param string newSendPasswordByTalk * @param bool sendMail */ - public function testUpdateSendPassword($plainTextPassword, string $originalPassword, string $newPassword, $originalSendPasswordByTalk, $newSendPasswordByTalk, bool $sendMail) { + public function testUpdateSendPassword($plainTextPassword, string $originalPassword, string $newPassword, $originalSendPasswordByTalk, $newSendPasswordByTalk, bool $sendMail): void { $node = $this->createMock(File::class); $node->expects($this->any())->method('getName')->willReturn('filename'); @@ -844,7 +844,7 @@ class ShareByMailProviderTest extends TestCase { ); } - public function testDelete() { + public function testDelete(): void { $instance = $this->getInstance(['removeShareFromTable', 'createShareActivity']); $this->share->expects($this->once())->method('getId')->willReturn(42); $instance->expects($this->once())->method('removeShareFromTable')->with(42); @@ -852,7 +852,7 @@ class ShareByMailProviderTest extends TestCase { $instance->delete($this->share); } - public function testGetShareById() { + public function testGetShareById(): void { $instance = $this->getInstance(['createShareObject']); $itemSource = 11; @@ -882,7 +882,7 @@ class ShareByMailProviderTest extends TestCase { } - public function testGetShareByIdFailed() { + public function testGetShareByIdFailed(): void { $this->expectException(\OCP\Share\Exceptions\ShareNotFound::class); $instance = $this->getInstance(['createShareObject']); @@ -900,7 +900,7 @@ class ShareByMailProviderTest extends TestCase { $instance->getShareById($id + 1); } - public function testGetShareByPath() { + public function testGetShareByPath(): void { $itemSource = 11; $itemType = 'file'; $shareWith = 'user@server.com'; @@ -935,7 +935,7 @@ class ShareByMailProviderTest extends TestCase { $this->assertInstanceOf('OCP\Share\IShare', $result[0]); } - public function testGetShareByToken() { + public function testGetShareByToken(): void { $itemSource = 11; $itemType = 'file'; $shareWith = 'user@server.com'; @@ -965,7 +965,7 @@ class ShareByMailProviderTest extends TestCase { } - public function testGetShareByTokenFailed() { + public function testGetShareByTokenFailed(): void { $this->expectException(\OCP\Share\Exceptions\ShareNotFound::class); @@ -989,7 +989,7 @@ class ShareByMailProviderTest extends TestCase { ); } - public function testRemoveShareFromTable() { + public function testRemoveShareFromTable(): void { $itemSource = 11; $itemType = 'file'; $shareWith = 'user@server.com'; @@ -1027,7 +1027,7 @@ class ShareByMailProviderTest extends TestCase { $this->assertEmpty($after); } - public function testUserDeleted() { + public function testUserDeleted(): void { $itemSource = 11; $itemType = 'file'; $shareWith = 'user@server.com'; @@ -1066,7 +1066,7 @@ class ShareByMailProviderTest extends TestCase { $this->assertSame($id, (int)$after[0]['id']); } - public function testGetRawShare() { + public function testGetRawShare(): void { $itemSource = 11; $itemType = 'file'; $shareWith = 'user@server.com'; @@ -1092,7 +1092,7 @@ class ShareByMailProviderTest extends TestCase { } - public function testGetRawShareFailed() { + public function testGetRawShareFailed(): void { $this->expectException(\OCP\Share\Exceptions\ShareNotFound::class); $itemSource = 11; @@ -1137,7 +1137,7 @@ class ShareByMailProviderTest extends TestCase { return (int)$id; } - public function testGetSharesInFolder() { + public function testGetSharesInFolder(): void { $userManager = \OC::$server->getUserManager(); $rootFolder = \OC::$server->getRootFolder(); @@ -1184,7 +1184,7 @@ class ShareByMailProviderTest extends TestCase { $u2->delete(); } - public function testGetAccessList() { + public function testGetAccessList(): void { $userManager = \OC::$server->getUserManager(); $rootFolder = \OC::$server->getRootFolder(); @@ -1252,7 +1252,7 @@ class ShareByMailProviderTest extends TestCase { $u2->delete(); } - public function testSendMailNotificationWithSameUserAndUserEmail() { + public function testSendMailNotificationWithSameUserAndUserEmail(): void { $provider = $this->getInstance(); $user = $this->createMock(IUser::class); $this->settingsManager->expects($this->any())->method('replyToInitiator')->willReturn(true); @@ -1365,7 +1365,7 @@ class ShareByMailProviderTest extends TestCase { ); } - public function testSendMailNotificationWithSameUserAndUserEmailAndNote() { + public function testSendMailNotificationWithSameUserAndUserEmailAndNote(): void { $provider = $this->getInstance(); $user = $this->createMock(IUser::class); $this->settingsManager->expects($this->any())->method('replyToInitiator')->willReturn(true); @@ -1491,7 +1491,7 @@ class ShareByMailProviderTest extends TestCase { ); } - public function testSendMailNotificationWithSameUserAndUserEmailAndExpiration() { + public function testSendMailNotificationWithSameUserAndUserEmailAndExpiration(): void { $provider = $this->getInstance(); $user = $this->createMock(IUser::class); $this->settingsManager->expects($this->any())->method('replyToInitiator')->willReturn(true); @@ -1623,7 +1623,7 @@ class ShareByMailProviderTest extends TestCase { ); } - public function testSendMailNotificationWithDifferentUserAndNoUserEmail() { + public function testSendMailNotificationWithDifferentUserAndNoUserEmail(): void { $provider = $this->getInstance(); $initiatorUser = $this->createMock(IUser::class); $this->settingsManager->expects($this->any())->method('replyToInitiator')->willReturn(true); @@ -1727,7 +1727,7 @@ class ShareByMailProviderTest extends TestCase { ); } - public function testSendMailNotificationWithSameUserAndUserEmailAndReplyToDesactivate() { + public function testSendMailNotificationWithSameUserAndUserEmailAndReplyToDesactivate(): void { $provider = $this->getInstance(); $user = $this->createMock(IUser::class); $this->settingsManager->expects($this->any())->method('replyToInitiator')->willReturn(false); @@ -1835,7 +1835,7 @@ class ShareByMailProviderTest extends TestCase { ); } - public function testSendMailNotificationWithDifferentUserAndNoUserEmailAndReplyToDesactivate() { + public function testSendMailNotificationWithDifferentUserAndNoUserEmailAndReplyToDesactivate(): void { $provider = $this->getInstance(); $initiatorUser = $this->createMock(IUser::class); $this->settingsManager->expects($this->any())->method('replyToInitiator')->willReturn(false); diff --git a/apps/systemtags/tests/Activity/SettingTest.php b/apps/systemtags/tests/Activity/SettingTest.php index 91aef57aeef..7ef46705e02 100644 --- a/apps/systemtags/tests/Activity/SettingTest.php +++ b/apps/systemtags/tests/Activity/SettingTest.php @@ -22,11 +22,11 @@ class SettingTest extends TestCase { $this->setting = new Setting($this->l); } - public function testGetIdentifier() { + public function testGetIdentifier(): void { $this->assertSame('systemtags', $this->setting->getIdentifier()); } - public function testGetName() { + public function testGetName(): void { $this->l ->expects($this->once()) ->method('t') @@ -36,23 +36,23 @@ class SettingTest extends TestCase { $this->assertSame('<strong>System tags</strong> for a file have been modified', $this->setting->getName()); } - public function testGetPriority() { + public function testGetPriority(): void { $this->assertSame(50, $this->setting->getPriority()); } - public function testCanChangeStream() { + public function testCanChangeStream(): void { $this->assertSame(true, $this->setting->canChangeStream()); } - public function testIsDefaultEnabledStream() { + public function testIsDefaultEnabledStream(): void { $this->assertSame(true, $this->setting->isDefaultEnabledStream()); } - public function testCanChangeMail() { + public function testCanChangeMail(): void { $this->assertSame(true, $this->setting->canChangeMail()); } - public function testIsDefaultEnabledMail() { + public function testIsDefaultEnabledMail(): void { $this->assertSame(false, $this->setting->isDefaultEnabledMail()); } } diff --git a/apps/systemtags/tests/Settings/AdminTest.php b/apps/systemtags/tests/Settings/AdminTest.php index b18019484ef..78f19475fae 100644 --- a/apps/systemtags/tests/Settings/AdminTest.php +++ b/apps/systemtags/tests/Settings/AdminTest.php @@ -19,16 +19,16 @@ class AdminTest extends TestCase { $this->admin = new Admin(); } - public function testGetForm() { + public function testGetForm(): void { $expected = new TemplateResponse('systemtags', 'admin', [], ''); $this->assertEquals($expected, $this->admin->getForm()); } - public function testGetSection() { + public function testGetSection(): void { $this->assertSame('server', $this->admin->getSection()); } - public function testGetPriority() { + public function testGetPriority(): void { $this->assertSame(70, $this->admin->getPriority()); } } diff --git a/apps/theming/fonts/OpenDyslexic-Bold.otf b/apps/theming/fonts/OpenDyslexic-Bold.otf Binary files differindex 7d074cbddee..4c492e2fcc2 100644 --- a/apps/theming/fonts/OpenDyslexic-Bold.otf +++ b/apps/theming/fonts/OpenDyslexic-Bold.otf diff --git a/apps/theming/fonts/OpenDyslexic-Bold.ttf b/apps/theming/fonts/OpenDyslexic-Bold.ttf Binary files differdeleted file mode 100644 index 25cf37f99e2..00000000000 --- a/apps/theming/fonts/OpenDyslexic-Bold.ttf +++ /dev/null diff --git a/apps/theming/fonts/OpenDyslexic-Bold.woff b/apps/theming/fonts/OpenDyslexic-Bold.woff Binary files differdeleted file mode 100644 index 41886ae9dda..00000000000 --- a/apps/theming/fonts/OpenDyslexic-Bold.woff +++ /dev/null diff --git a/apps/theming/fonts/OpenDyslexic-Regular.otf b/apps/theming/fonts/OpenDyslexic-Regular.otf Binary files differindex ebef13c4ce3..1226d2ab281 100644 --- a/apps/theming/fonts/OpenDyslexic-Regular.otf +++ b/apps/theming/fonts/OpenDyslexic-Regular.otf diff --git a/apps/theming/fonts/OpenDyslexic-Regular.ttf b/apps/theming/fonts/OpenDyslexic-Regular.ttf Binary files differdeleted file mode 100644 index 4b0cb8c46b7..00000000000 --- a/apps/theming/fonts/OpenDyslexic-Regular.ttf +++ /dev/null diff --git a/apps/theming/fonts/OpenDyslexic-Regular.woff b/apps/theming/fonts/OpenDyslexic-Regular.woff Binary files differdeleted file mode 100644 index 26a2934d640..00000000000 --- a/apps/theming/fonts/OpenDyslexic-Regular.woff +++ /dev/null diff --git a/apps/theming/l10n/gl.js b/apps/theming/l10n/gl.js index e5daea61b05..6db7c4ba8ca 100644 --- a/apps/theming/l10n/gl.js +++ b/apps/theming/l10n/gl.js @@ -77,7 +77,7 @@ OC.L10N.register( "Although you can select and customize your instance, users can change their background and colors. If you want to enforce your customization, you can toggle this on." : "Aínda que pode seleccionar e personalizar a súa instancia, os usuarios poden cambiar o seu fondo e cores. Se quere impor a súa personalización, pode activar esta opción.", "Appearance and accessibility settings" : "Axustes de aparencia e accesibilidade", "Misc accessibility options" : "Varias opcións de accesibilidade", - "Enable blur background filter (may increase GPU load)" : "Activar o filtro de fondo borroso (pode aumentar a carga da GPU)", + "Enable blur background filter (may increase GPU load)" : "Activar o filtro de fondo esvaído (pode aumentar a carga da GPU)", "Customization has been disabled by your administrator" : "O seu administrador desactivou a personalización", "Set a primary color to highlight important elements. The color used for elements such as primary buttons might differ a bit as it gets adjusted to fulfill accessibility requirements." : "Defina unha cor principal para resaltar elementos importantes. A cor utilizada para elementos como os botóns principais pode diferir un pouco a medida que se axusta para cumprir cos requisitos de accesibilidade.", "Background and color" : "Fondo e cor", diff --git a/apps/theming/l10n/gl.json b/apps/theming/l10n/gl.json index 243d75d849d..9edfa4ad428 100644 --- a/apps/theming/l10n/gl.json +++ b/apps/theming/l10n/gl.json @@ -75,7 +75,7 @@ "Although you can select and customize your instance, users can change their background and colors. If you want to enforce your customization, you can toggle this on." : "Aínda que pode seleccionar e personalizar a súa instancia, os usuarios poden cambiar o seu fondo e cores. Se quere impor a súa personalización, pode activar esta opción.", "Appearance and accessibility settings" : "Axustes de aparencia e accesibilidade", "Misc accessibility options" : "Varias opcións de accesibilidade", - "Enable blur background filter (may increase GPU load)" : "Activar o filtro de fondo borroso (pode aumentar a carga da GPU)", + "Enable blur background filter (may increase GPU load)" : "Activar o filtro de fondo esvaído (pode aumentar a carga da GPU)", "Customization has been disabled by your administrator" : "O seu administrador desactivou a personalización", "Set a primary color to highlight important elements. The color used for elements such as primary buttons might differ a bit as it gets adjusted to fulfill accessibility requirements." : "Defina unha cor principal para resaltar elementos importantes. A cor utilizada para elementos como os botóns principais pode diferir un pouco a medida que se axusta para cumprir cos requisitos de accesibilidade.", "Background and color" : "Fondo e cor", diff --git a/apps/theming/l10n/ru.js b/apps/theming/l10n/ru.js index 5ca6c080218..109af3ec15b 100644 --- a/apps/theming/l10n/ru.js +++ b/apps/theming/l10n/ru.js @@ -12,6 +12,9 @@ OC.L10N.register( "The given color is invalid" : "Задан неправильный цвет", "Disable-user-theming should be true or false" : "Disable-user-theming должен быть true или false", "Saved" : "Сохранено", + "Invalid app given" : "Указано неверное приложение.", + "Invalid type for setting \"defaultApp\" given" : "Указан неверный тип для настройки \"defaultApp\"", + "Invalid setting key" : "Неверный ключ настройки", "The file was uploaded" : "Файл был загружен", "The uploaded file exceeds the upload_max_filesize directive in php.ini" : "Размер переданного файла превышает установленный предел upload_max_filesize в php.ini:", "The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form" : "Размер переданного файла превышает установленный предел MAX_FILE_SIZE в HTML-форме", @@ -26,6 +29,7 @@ OC.L10N.register( "Appearance and accessibility" : "Внешний вид и доступность", "PHP Imagick module" : "PHP модуль Imagick", "The PHP module \"imagick\" is not enabled although the theming app is. For favicon generation to work correctly, you need to install and enable this module." : "Для создания значка favicon приложением «Оформления» необходимо установить и активировать модуль «imagic» подсистемы PHP. ", + "The PHP module \"imagick\" in this instance has no SVG support. For better compatibility it is recommended to install it." : "Модуль PHP \"imagick\" в данном случае не имеет поддержки SVG. Для лучшей совместимости рекомендуется его установить.", "Dark theme with high contrast mode" : "Темная тема с режимом высокой контрастности", "Enable dark high contrast mode" : "Включить темную тему в режиме высокой контрастности", "Similar to the high contrast mode, but with dark colours." : "Аналогично режиму высокой контрастности, но с использованием темных цветов.", @@ -83,6 +87,7 @@ OC.L10N.register( "Disable all keyboard shortcuts" : "Отключить все сочетания клавиш", "Universal access is very important to us. We follow web standards and check to make everything usable also without mouse, and assistive software such as screenreaders. We aim to be compliant with the {guidelines}Web Content Accessibility Guidelines{linkend} 2.1 on AA level, with the high contrast theme even on AAA level." : "Доступная среда очень важна для нас. При разработке мы следуем веб-стандартам, контролируя возможность пользования всем сервисом без помощи мыши и с использованием вспомогательных программ, например, выполняющих чтение с экрана. Мы стремимся к выполнению рекомендаций {guidelines}Руководства доступности Веб-Контента{linkend} 2.1 на уровне АА, а при использовании режима высокой контрастности — даже на уровне ААА.", "If you find any issues, do not hesitate to report them on {issuetracker}our issue tracker{linkend}. And if you want to get involved, come join {designteam}our design team{linkend}!" : "При обнаружении ошибок, не стесняйтесь сообщать о них {issuetracker}на наш форум{linkend}. Если Вы заинтересованы в продвижении проекта присоединяйтесь к {designteam}нашей команде дизайнеров{linkend}!", + "Current selected app: {app}, position {position} of {total}" : "Текущее выбранное приложение: {app}, позиция {position} из {total}", "Move up" : "Переместить выше", "Move down" : "Переместить ниже", "Custom background" : "Пользовательский фон", @@ -104,6 +109,11 @@ OC.L10N.register( "Default app" : "Приложение по умолчанию", "The default app is the app that is e.g. opened after login or when the logo in the menu is clicked." : "Приложение по умолчанию - это приложение, которое открывается, например, после входа в систему или при нажатии на логотип в меню.", "Use custom default app" : "Использовать пользовательское приложение по умолчанию", + "Global default app" : "Глобальное приложение по умолчанию", + "Global default apps" : "Глобальные приложения по умолчанию", + "Default app priority" : "Приоритет приложения по умолчанию", + "If an app is not enabled for a user, the next app with lower priority is used." : "Если приложение не включено для пользователя, используется следующее приложение с более низким приоритетом.", + "Could not set global default apps" : "Не удалось установить глобальные приложения по умолчанию.", "Select a custom color" : "Выберать собственный цвет", "Reset to default" : "Сбросить изменения", "Upload" : "Отправить", diff --git a/apps/theming/l10n/ru.json b/apps/theming/l10n/ru.json index 202f1474c26..212b8ac11ed 100644 --- a/apps/theming/l10n/ru.json +++ b/apps/theming/l10n/ru.json @@ -10,6 +10,9 @@ "The given color is invalid" : "Задан неправильный цвет", "Disable-user-theming should be true or false" : "Disable-user-theming должен быть true или false", "Saved" : "Сохранено", + "Invalid app given" : "Указано неверное приложение.", + "Invalid type for setting \"defaultApp\" given" : "Указан неверный тип для настройки \"defaultApp\"", + "Invalid setting key" : "Неверный ключ настройки", "The file was uploaded" : "Файл был загружен", "The uploaded file exceeds the upload_max_filesize directive in php.ini" : "Размер переданного файла превышает установленный предел upload_max_filesize в php.ini:", "The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form" : "Размер переданного файла превышает установленный предел MAX_FILE_SIZE в HTML-форме", @@ -24,6 +27,7 @@ "Appearance and accessibility" : "Внешний вид и доступность", "PHP Imagick module" : "PHP модуль Imagick", "The PHP module \"imagick\" is not enabled although the theming app is. For favicon generation to work correctly, you need to install and enable this module." : "Для создания значка favicon приложением «Оформления» необходимо установить и активировать модуль «imagic» подсистемы PHP. ", + "The PHP module \"imagick\" in this instance has no SVG support. For better compatibility it is recommended to install it." : "Модуль PHP \"imagick\" в данном случае не имеет поддержки SVG. Для лучшей совместимости рекомендуется его установить.", "Dark theme with high contrast mode" : "Темная тема с режимом высокой контрастности", "Enable dark high contrast mode" : "Включить темную тему в режиме высокой контрастности", "Similar to the high contrast mode, but with dark colours." : "Аналогично режиму высокой контрастности, но с использованием темных цветов.", @@ -81,6 +85,7 @@ "Disable all keyboard shortcuts" : "Отключить все сочетания клавиш", "Universal access is very important to us. We follow web standards and check to make everything usable also without mouse, and assistive software such as screenreaders. We aim to be compliant with the {guidelines}Web Content Accessibility Guidelines{linkend} 2.1 on AA level, with the high contrast theme even on AAA level." : "Доступная среда очень важна для нас. При разработке мы следуем веб-стандартам, контролируя возможность пользования всем сервисом без помощи мыши и с использованием вспомогательных программ, например, выполняющих чтение с экрана. Мы стремимся к выполнению рекомендаций {guidelines}Руководства доступности Веб-Контента{linkend} 2.1 на уровне АА, а при использовании режима высокой контрастности — даже на уровне ААА.", "If you find any issues, do not hesitate to report them on {issuetracker}our issue tracker{linkend}. And if you want to get involved, come join {designteam}our design team{linkend}!" : "При обнаружении ошибок, не стесняйтесь сообщать о них {issuetracker}на наш форум{linkend}. Если Вы заинтересованы в продвижении проекта присоединяйтесь к {designteam}нашей команде дизайнеров{linkend}!", + "Current selected app: {app}, position {position} of {total}" : "Текущее выбранное приложение: {app}, позиция {position} из {total}", "Move up" : "Переместить выше", "Move down" : "Переместить ниже", "Custom background" : "Пользовательский фон", @@ -102,6 +107,11 @@ "Default app" : "Приложение по умолчанию", "The default app is the app that is e.g. opened after login or when the logo in the menu is clicked." : "Приложение по умолчанию - это приложение, которое открывается, например, после входа в систему или при нажатии на логотип в меню.", "Use custom default app" : "Использовать пользовательское приложение по умолчанию", + "Global default app" : "Глобальное приложение по умолчанию", + "Global default apps" : "Глобальные приложения по умолчанию", + "Default app priority" : "Приоритет приложения по умолчанию", + "If an app is not enabled for a user, the next app with lower priority is used." : "Если приложение не включено для пользователя, используется следующее приложение с более низким приоритетом.", + "Could not set global default apps" : "Не удалось установить глобальные приложения по умолчанию.", "Select a custom color" : "Выберать собственный цвет", "Reset to default" : "Сбросить изменения", "Upload" : "Отправить", diff --git a/apps/theming/lib/Themes/DyslexiaFont.php b/apps/theming/lib/Themes/DyslexiaFont.php index 2552fc65724..2448de7b3c8 100644 --- a/apps/theming/lib/Themes/DyslexiaFont.php +++ b/apps/theming/lib/Themes/DyslexiaFont.php @@ -43,30 +43,22 @@ class DyslexiaFont extends DefaultTheme implements ITheme { } public function getCustomCss(): string { - $fontPathWoff = $this->urlGenerator->linkTo('theming', 'fonts/OpenDyslexic-Regular.woff'); $fontPathOtf = $this->urlGenerator->linkTo('theming', 'fonts/OpenDyslexic-Regular.otf'); - $fontPathTtf = $this->urlGenerator->linkTo('theming', 'fonts/OpenDyslexic-Regular.ttf'); - $boldFontPathWoff = $this->urlGenerator->linkTo('theming', 'fonts/OpenDyslexic-Bold.woff'); $boldFontPathOtf = $this->urlGenerator->linkTo('theming', 'fonts/OpenDyslexic-Bold.otf'); - $boldFontPathTtf = $this->urlGenerator->linkTo('theming', 'fonts/OpenDyslexic-Bold.ttf'); return " @font-face { font-family: 'OpenDyslexic'; font-style: normal; font-weight: 400; - src: url('$fontPathWoff') format('woff'), - url('$fontPathOtf') format('opentype'), - url('$fontPathTtf') format('truetype'); + src: url('$fontPathOtf') format('opentype'); } - + @font-face { font-family: 'OpenDyslexic'; font-style: normal; font-weight: 700; - src: url('$boldFontPathWoff') format('woff'), - url('$boldFontPathOtf') format('opentype'), - url('$boldFontPathTtf') format('truetype'); + src: url('$boldFontPathOtf') format('opentype'); } "; } diff --git a/apps/theming/tests/CapabilitiesTest.php b/apps/theming/tests/CapabilitiesTest.php index 5accb30b6a1..277dd5b6a7a 100644 --- a/apps/theming/tests/CapabilitiesTest.php +++ b/apps/theming/tests/CapabilitiesTest.php @@ -143,7 +143,7 @@ class CapabilitiesTest extends TestCase { * @param bool $backgroundThemed * @param string[] $expected */ - public function testGetCapabilities($name, $url, $slogan, $color, $textColor, $logo, $background, $backgroundColor, $backgroundTextColor, $baseUrl, $backgroundThemed, array $expected) { + public function testGetCapabilities($name, $url, $slogan, $color, $textColor, $logo, $background, $backgroundColor, $backgroundTextColor, $baseUrl, $backgroundThemed, array $expected): void { $this->config->expects($this->once()) ->method('getAppValue') ->willReturn($background); diff --git a/apps/theming/tests/Controller/IconControllerTest.php b/apps/theming/tests/Controller/IconControllerTest.php index e0159c03082..18fa7de1cc8 100644 --- a/apps/theming/tests/Controller/IconControllerTest.php +++ b/apps/theming/tests/Controller/IconControllerTest.php @@ -80,7 +80,7 @@ class IconControllerTest extends TestCase { return new SimpleFile($icon); } - public function testGetThemedIcon() { + public function testGetThemedIcon(): void { $file = $this->iconFileMock('icon-core-filetypes_folder.svg', 'filecontent'); $this->imageManager->expects($this->once()) ->method('getCachedImage') @@ -91,7 +91,7 @@ class IconControllerTest extends TestCase { $this->assertEquals($expected, $this->iconController->getThemedIcon('core', 'filetypes/folder.svg')); } - public function testGetFaviconDefault() { + public function testGetFaviconDefault(): void { if (!extension_loaded('imagick')) { $this->markTestSkipped('Imagemagick is required for dynamic icon generation.'); } @@ -123,7 +123,7 @@ class IconControllerTest extends TestCase { $this->assertEquals($expected, $this->iconController->getFavicon()); } - public function testGetFaviconFail() { + public function testGetFaviconFail(): void { $this->imageManager->expects($this->once()) ->method('getImage') ->with('favicon', false) @@ -141,7 +141,7 @@ class IconControllerTest extends TestCase { $this->assertEquals($expected, $this->iconController->getFavicon()); } - public function testGetTouchIconDefault() { + public function testGetTouchIconDefault(): void { if (!extension_loaded('imagick')) { $this->markTestSkipped('Imagemagick is required for dynamic icon generation.'); } @@ -173,7 +173,7 @@ class IconControllerTest extends TestCase { $this->assertEquals($expected, $this->iconController->getTouchIcon()); } - public function testGetTouchIconFail() { + public function testGetTouchIconFail(): void { $this->imageManager->expects($this->once()) ->method('getImage') ->with('favicon') diff --git a/apps/theming/tests/Controller/ThemingControllerTest.php b/apps/theming/tests/Controller/ThemingControllerTest.php index f32f3c790d0..d69ceefa0e5 100644 --- a/apps/theming/tests/Controller/ThemingControllerTest.php +++ b/apps/theming/tests/Controller/ThemingControllerTest.php @@ -96,7 +96,7 @@ class ThemingControllerTest extends TestCase { * @param string $value * @param string $message */ - public function testUpdateStylesheetSuccess($setting, $value, $message) { + public function testUpdateStylesheetSuccess($setting, $value, $message): void { $this->themingDefaults ->expects($this->once()) ->method('set') @@ -147,7 +147,7 @@ class ThemingControllerTest extends TestCase { * @param string $value * @param string $message */ - public function testUpdateStylesheetError($setting, $value, $message) { + public function testUpdateStylesheetError($setting, $value, $message): void { $this->themingDefaults ->expects($this->never()) ->method('set') @@ -172,7 +172,7 @@ class ThemingControllerTest extends TestCase { $this->assertEquals($expected, $this->themingController->updateStylesheet($setting, $value)); } - public function testUpdateLogoNoData() { + public function testUpdateLogoNoData(): void { $this->request ->expects($this->once()) ->method('getParam') @@ -204,7 +204,7 @@ class ThemingControllerTest extends TestCase { $this->assertEquals($expected, $this->themingController->uploadImage()); } - public function testUploadInvalidUploadKey() { + public function testUploadInvalidUploadKey(): void { $this->request ->expects($this->once()) ->method('getParam') @@ -241,7 +241,7 @@ class ThemingControllerTest extends TestCase { * @test * @return void */ - public function testUploadSVGFaviconWithoutImagemagick() { + public function testUploadSVGFaviconWithoutImagemagick(): void { $this->imageManager ->method('shouldReplaceIcons') ->willReturn(false); @@ -286,7 +286,7 @@ class ThemingControllerTest extends TestCase { $this->assertEquals($expected, $this->themingController->uploadImage()); } - public function testUpdateLogoInvalidMimeType() { + public function testUpdateLogoInvalidMimeType(): void { $this->request ->expects($this->once()) ->method('getParam') @@ -339,7 +339,7 @@ class ThemingControllerTest extends TestCase { } /** @dataProvider dataUpdateImages */ - public function testUpdateLogoNormalLogoUpload($mimeType, $folderExists = true) { + public function testUpdateLogoNormalLogoUpload($mimeType, $folderExists = true): void { $tmpLogo = \OC::$server->getTempManager()->getTemporaryFolder() . '/logo.svg'; $destination = \OC::$server->getTempManager()->getTemporaryFolder(); @@ -391,7 +391,7 @@ class ThemingControllerTest extends TestCase { } /** @dataProvider dataUpdateImages */ - public function testUpdateLogoLoginScreenUpload($folderExists) { + public function testUpdateLogoLoginScreenUpload($folderExists): void { $tmpLogo = \OC::$server->getTempManager()->getTemporaryFolder() . 'logo.png'; touch($tmpLogo); @@ -439,7 +439,7 @@ class ThemingControllerTest extends TestCase { $this->assertEquals($expected, $this->themingController->uploadImage()); } - public function testUpdateLogoLoginScreenUploadWithInvalidImage() { + public function testUpdateLogoLoginScreenUploadWithInvalidImage(): void { $tmpLogo = \OC::$server->getTempManager()->getTemporaryFolder() . '/logo.svg'; touch($tmpLogo); @@ -498,7 +498,7 @@ class ThemingControllerTest extends TestCase { /** * @dataProvider dataPhpUploadErrors */ - public function testUpdateLogoLoginScreenUploadWithInvalidImageUpload($error, $expectedErrorMessage) { + public function testUpdateLogoLoginScreenUploadWithInvalidImageUpload($error, $expectedErrorMessage): void { $this->request ->expects($this->once()) ->method('getParam') @@ -537,7 +537,7 @@ class ThemingControllerTest extends TestCase { /** * @dataProvider dataPhpUploadErrors */ - public function testUpdateLogoUploadWithInvalidImageUpload($error, $expectedErrorMessage) { + public function testUpdateLogoUploadWithInvalidImageUpload($error, $expectedErrorMessage): void { $this->request ->expects($this->once()) ->method('getParam') @@ -573,7 +573,7 @@ class ThemingControllerTest extends TestCase { $this->assertEquals($expected, $this->themingController->uploadImage()); } - public function testUndo() { + public function testUndo(): void { $this->l10n ->expects($this->once()) ->method('t') @@ -606,7 +606,7 @@ class ThemingControllerTest extends TestCase { } /** @dataProvider dataUndoDelete */ - public function testUndoDelete($value, $filename) { + public function testUndoDelete($value, $filename): void { $this->l10n ->expects($this->once()) ->method('t') @@ -633,7 +633,7 @@ class ThemingControllerTest extends TestCase { - public function testGetLogoNotExistent() { + public function testGetLogoNotExistent(): void { $this->imageManager->method('getImage') ->with($this->equalTo('logo')) ->willThrowException(new NotFoundException()); @@ -642,7 +642,7 @@ class ThemingControllerTest extends TestCase { $this->assertEquals($expected, $this->themingController->getImage('logo')); } - public function testGetLogo() { + public function testGetLogo(): void { $file = $this->createMock(ISimpleFile::class); $file->method('getName')->willReturn('logo.svg'); $file->method('getMTime')->willReturn(42); @@ -666,7 +666,7 @@ class ThemingControllerTest extends TestCase { } - public function testGetLoginBackgroundNotExistent() { + public function testGetLoginBackgroundNotExistent(): void { $this->imageManager->method('getImage') ->with($this->equalTo('background')) ->willThrowException(new NotFoundException()); @@ -674,7 +674,7 @@ class ThemingControllerTest extends TestCase { $this->assertEquals($expected, $this->themingController->getImage('background')); } - public function testGetLoginBackground() { + public function testGetLoginBackground(): void { $file = $this->createMock(ISimpleFile::class); $file->method('getName')->willReturn('background.png'); $file->method('getMTime')->willReturn(42); @@ -698,7 +698,7 @@ class ThemingControllerTest extends TestCase { @$this->assertEquals($expected, $this->themingController->getImage('background')); } - public function testGetManifest() { + public function testGetManifest(): void { $this->config ->expects($this->once()) ->method('getAppValue') diff --git a/apps/theming/tests/Controller/UserThemeControllerTest.php b/apps/theming/tests/Controller/UserThemeControllerTest.php index 8c3ae7364cd..7d369463c0d 100644 --- a/apps/theming/tests/Controller/UserThemeControllerTest.php +++ b/apps/theming/tests/Controller/UserThemeControllerTest.php @@ -104,7 +104,7 @@ class UserThemeControllerTest extends TestCase { * @param string $themeId * @param string $exception */ - public function testEnableTheme($themeId, ?string $exception = null) { + public function testEnableTheme($themeId, ?string $exception = null): void { $this->themesService ->expects($this->any()) ->method('getThemes') @@ -124,7 +124,7 @@ class UserThemeControllerTest extends TestCase { * @param string $themeId * @param string $exception */ - public function testDisableTheme($themeId, ?string $exception = null) { + public function testDisableTheme($themeId, ?string $exception = null): void { $this->themesService ->expects($this->any()) ->method('getThemes') diff --git a/apps/theming/tests/IconBuilderTest.php b/apps/theming/tests/IconBuilderTest.php index 81ea8a5ead3..942bcf399fa 100644 --- a/apps/theming/tests/IconBuilderTest.php +++ b/apps/theming/tests/IconBuilderTest.php @@ -74,7 +74,7 @@ class IconBuilderTest extends TestCase { * @param $color * @param $file */ - public function testRenderAppIcon($app, $color, $file) { + public function testRenderAppIcon($app, $color, $file): void { $this->checkImagick(); $this->themingDefaults->expects($this->once()) ->method('getColorPrimary') @@ -84,7 +84,7 @@ class IconBuilderTest extends TestCase { ->with('global/images') ->willThrowException(new NotFoundException()); - $expectedIcon = new \Imagick(realpath(dirname(__FILE__)). '/data/' . $file); + $expectedIcon = new \Imagick(realpath(__DIR__). '/data/' . $file); $icon = $this->iconBuilder->renderAppIcon($app, 512); $this->assertEquals(true, $icon->valid()); @@ -103,7 +103,7 @@ class IconBuilderTest extends TestCase { * @param $color * @param $file */ - public function testGetTouchIcon($app, $color, $file) { + public function testGetTouchIcon($app, $color, $file): void { $this->checkImagick(); $this->themingDefaults->expects($this->once()) ->method('getColorPrimary') @@ -113,7 +113,7 @@ class IconBuilderTest extends TestCase { ->with('global/images') ->willThrowException(new NotFoundException()); - $expectedIcon = new \Imagick(realpath(dirname(__FILE__)). '/data/' . $file); + $expectedIcon = new \Imagick(realpath(__DIR__). '/data/' . $file); $icon = new \Imagick(); $icon->readImageBlob($this->iconBuilder->getTouchIcon($app)); @@ -133,7 +133,7 @@ class IconBuilderTest extends TestCase { * @param $color * @param $file */ - public function testGetFavicon($app, $color, $file) { + public function testGetFavicon($app, $color, $file): void { $this->checkImagick(); $this->imageManager->expects($this->once()) ->method('shouldReplaceIcons') @@ -146,7 +146,7 @@ class IconBuilderTest extends TestCase { ->with('global/images') ->willThrowException(new NotFoundException()); - $expectedIcon = new \Imagick(realpath(dirname(__FILE__)). '/data/' . $file); + $expectedIcon = new \Imagick(realpath(__DIR__). '/data/' . $file); $actualIcon = $this->iconBuilder->getFavicon($app); $icon = new \Imagick(); @@ -162,7 +162,7 @@ class IconBuilderTest extends TestCase { // cloud be something like $expectedIcon->compareImages($icon, Imagick::METRIC_MEANABSOLUTEERROR)[1]) } - public function testGetFaviconNotFound() { + public function testGetFaviconNotFound(): void { $this->checkImagick(); $this->expectWarning(Warning::class); $util = $this->getMockBuilder(Util::class)->disableOriginalConstructor()->getMock(); @@ -176,7 +176,7 @@ class IconBuilderTest extends TestCase { $this->assertFalse($iconBuilder->getFavicon('noapp')); } - public function testGetTouchIconNotFound() { + public function testGetTouchIconNotFound(): void { $this->checkImagick(); $this->expectWarning(Warning::class); $util = $this->getMockBuilder(Util::class)->disableOriginalConstructor()->getMock(); @@ -187,7 +187,7 @@ class IconBuilderTest extends TestCase { $this->assertFalse($iconBuilder->getTouchIcon('noapp')); } - public function testColorSvgNotFound() { + public function testColorSvgNotFound(): void { $this->checkImagick(); $this->expectWarning(Warning::class); $util = $this->getMockBuilder(Util::class)->disableOriginalConstructor()->getMock(); diff --git a/apps/theming/tests/ImageManagerTest.php b/apps/theming/tests/ImageManagerTest.php index f3c2156be7e..54e4e2a70ee 100644 --- a/apps/theming/tests/ImageManagerTest.php +++ b/apps/theming/tests/ImageManagerTest.php @@ -117,7 +117,7 @@ class ImageManagerTest extends TestCase { } } - public function testGetImageUrl() { + public function testGetImageUrl(): void { $this->checkImagick(); $file = $this->createMock(ISimpleFile::class); $this->config->expects($this->exactly(2)) @@ -133,7 +133,7 @@ class ImageManagerTest extends TestCase { $this->assertEquals('url-to-image?v=0', $this->imageManager->getImageUrl('logo', false)); } - public function testGetImageUrlDefault() { + public function testGetImageUrlDefault(): void { $this->config->expects($this->exactly(2)) ->method('getAppValue') ->withConsecutive( @@ -148,7 +148,7 @@ class ImageManagerTest extends TestCase { $this->assertEquals('logo/logo.png?v=0', $this->imageManager->getImageUrl('logo')); } - public function testGetImageUrlAbsolute() { + public function testGetImageUrlAbsolute(): void { $this->checkImagick(); $file = $this->createMock(ISimpleFile::class); $this->config->expects($this->exactly(2)) @@ -164,7 +164,7 @@ class ImageManagerTest extends TestCase { $this->assertEquals('url-to-image-absolute?v=0', $this->imageManager->getImageUrlAbsolute('logo', false)); } - public function testGetImage() { + public function testGetImage(): void { $this->checkImagick(); $this->config->expects($this->once()) ->method('getAppValue')->with('theming', 'logoMime', false) @@ -175,7 +175,7 @@ class ImageManagerTest extends TestCase { } - public function testGetImageUnset() { + public function testGetImageUnset(): void { $this->expectException(\OCP\Files\NotFoundException::class); $this->config->expects($this->once()) @@ -184,7 +184,7 @@ class ImageManagerTest extends TestCase { $this->imageManager->getImage('logo'); } - public function testGetCacheFolder() { + public function testGetCacheFolder(): void { $folder = $this->createMock(ISimpleFolder::class); $this->config->expects($this->once()) ->method('getAppValue') @@ -196,7 +196,7 @@ class ImageManagerTest extends TestCase { ->willReturn($folder); $this->assertEquals($folder, $this->imageManager->getCacheFolder()); } - public function testGetCacheFolderCreate() { + public function testGetCacheFolderCreate(): void { $folder = $this->createMock(ISimpleFolder::class); $this->config->expects($this->exactly(2)) ->method('getAppValue') @@ -219,7 +219,7 @@ class ImageManagerTest extends TestCase { $this->assertEquals($folder, $this->imageManager->getCacheFolder()); } - public function testGetCachedImage() { + public function testGetCachedImage(): void { $expected = $this->createMock(ISimpleFile::class); $folder = $this->setupCacheFolder(); $folder->expects($this->once()) @@ -230,7 +230,7 @@ class ImageManagerTest extends TestCase { } - public function testGetCachedImageNotFound() { + public function testGetCachedImageNotFound(): void { $this->expectException(\OCP\Files\NotFoundException::class); $folder = $this->setupCacheFolder(); @@ -241,7 +241,7 @@ class ImageManagerTest extends TestCase { $image = $this->imageManager->getCachedImage('filename'); } - public function testSetCachedImage() { + public function testSetCachedImage(): void { $folder = $this->setupCacheFolder(); $file = $this->createMock(ISimpleFile::class); $folder->expects($this->once()) @@ -258,7 +258,7 @@ class ImageManagerTest extends TestCase { $this->assertEquals($file, $this->imageManager->setCachedImage('filename', 'filecontent')); } - public function testSetCachedImageCreate() { + public function testSetCachedImageCreate(): void { $folder = $this->setupCacheFolder(); $file = $this->createMock(ISimpleFile::class); $folder->expects($this->once()) @@ -288,7 +288,7 @@ class ImageManagerTest extends TestCase { return $folder; } - public function testCleanup() { + public function testCleanup(): void { $folders = [ $this->createMock(ISimpleFolder::class), $this->createMock(ISimpleFolder::class), @@ -332,7 +332,7 @@ class ImageManagerTest extends TestCase { /** * @dataProvider dataUpdateImage */ - public function testUpdateImage($key, $tmpFile, $folderExists, $shouldConvert) { + public function testUpdateImage($key, $tmpFile, $folderExists, $shouldConvert): void { $file = $this->createMock(ISimpleFile::class); $folder = $this->createMock(ISimpleFolder::class); $oldFile = $this->createMock(ISimpleFile::class); diff --git a/apps/theming/tests/Service/ThemesServiceTest.php b/apps/theming/tests/Service/ThemesServiceTest.php index 1644deea4c7..77371cfe34c 100644 --- a/apps/theming/tests/Service/ThemesServiceTest.php +++ b/apps/theming/tests/Service/ThemesServiceTest.php @@ -70,7 +70,7 @@ class ThemesServiceTest extends TestCase { parent::setUp(); } - public function testGetThemes() { + public function testGetThemes(): void { $expected = [ 'default', 'light', @@ -82,7 +82,7 @@ class ThemesServiceTest extends TestCase { $this->assertEquals($expected, array_keys($this->themesService->getThemes())); } - public function testGetThemesEnforced() { + public function testGetThemesEnforced(): void { $this->config->expects($this->once()) ->method('getSystemValueString') ->with('enforce_theme', '') @@ -98,7 +98,7 @@ class ThemesServiceTest extends TestCase { $this->assertEquals($expected, array_keys($this->themesService->getThemes())); } - public function testGetThemesEnforcedInvalid() { + public function testGetThemesEnforcedInvalid(): void { $this->config->expects($this->once()) ->method('getSystemValueString') ->with('enforce_theme', '') @@ -136,7 +136,7 @@ class ThemesServiceTest extends TestCase { * @param string[] $enabledThemes * @param string[] $expectedEnabled */ - public function testEnableTheme(string $toEnable, array $enabledThemes, array $expectedEnabled) { + public function testEnableTheme(string $toEnable, array $enabledThemes, array $expectedEnabled): void { $user = $this->createMock(IUser::class); $this->userSession->expects($this->any()) ->method('getUser') @@ -170,7 +170,7 @@ class ThemesServiceTest extends TestCase { * @param string[] $enabledThemes * @param string[] $expectedEnabled */ - public function testDisableTheme(string $toDisable, array $enabledThemes, array $expectedEnabled) { + public function testDisableTheme(string $toDisable, array $enabledThemes, array $expectedEnabled): void { $user = $this->createMock(IUser::class); $this->userSession->expects($this->any()) ->method('getUser') @@ -204,7 +204,7 @@ class ThemesServiceTest extends TestCase { * @param string $toEnable * @param string[] $enabledThemes */ - public function testIsEnabled(string $themeId, array $enabledThemes, $expected) { + public function testIsEnabled(string $themeId, array $enabledThemes, $expected): void { $user = $this->createMock(IUser::class); $this->userSession->expects($this->any()) ->method('getUser') @@ -222,7 +222,7 @@ class ThemesServiceTest extends TestCase { $this->assertEquals($expected, $this->themesService->isEnabled($this->themes[$themeId])); } - public function testGetEnabledThemes() { + public function testGetEnabledThemes(): void { $user = $this->createMock(IUser::class); $this->userSession->expects($this->any()) ->method('getUser') @@ -244,7 +244,7 @@ class ThemesServiceTest extends TestCase { $this->assertEquals([], $this->themesService->getEnabledThemes()); } - public function testGetEnabledThemesEnforced() { + public function testGetEnabledThemesEnforced(): void { $user = $this->createMock(IUser::class); $this->userSession->expects($this->any()) ->method('getUser') @@ -282,7 +282,7 @@ class ThemesServiceTest extends TestCase { * @param string[] $enabledThemes * @param string[] $expected */ - public function testSetEnabledThemes(array $enabledThemes, array $expected) { + public function testSetEnabledThemes(array $enabledThemes, array $expected): void { $user = $this->createMock(IUser::class); $this->userSession->expects($this->any()) ->method('getUser') diff --git a/apps/theming/tests/ServicesTest.php b/apps/theming/tests/ServicesTest.php index 2e404d6fd43..3223de0a489 100644 --- a/apps/theming/tests/ServicesTest.php +++ b/apps/theming/tests/ServicesTest.php @@ -64,7 +64,7 @@ class ServicesTest extends TestCase { * @param string $service * @param string $expected */ - public function testContainerQuery($service, $expected = null) { + public function testContainerQuery($service, $expected = null): void { if ($expected === null) { $expected = $service; } diff --git a/apps/theming/tests/Settings/AdminSectionTest.php b/apps/theming/tests/Settings/AdminSectionTest.php index 8916313e9a2..a73eca1cc5a 100644 --- a/apps/theming/tests/Settings/AdminSectionTest.php +++ b/apps/theming/tests/Settings/AdminSectionTest.php @@ -31,11 +31,11 @@ class AdminSectionTest extends TestCase { ); } - public function testGetID() { + public function testGetID(): void { $this->assertSame('theming', $this->section->getID()); } - public function testGetName() { + public function testGetName(): void { $this->l ->expects($this->once()) ->method('t') @@ -45,11 +45,11 @@ class AdminSectionTest extends TestCase { $this->assertSame('Theming', $this->section->getName()); } - public function testGetPriority() { + public function testGetPriority(): void { $this->assertSame(30, $this->section->getPriority()); } - public function testGetIcon() { + public function testGetIcon(): void { $this->url->expects($this->once()) ->method('imagePath') ->with('theming', 'app-dark.svg') diff --git a/apps/theming/tests/Settings/AdminTest.php b/apps/theming/tests/Settings/AdminTest.php index d74668f5e6f..189a91bae3a 100644 --- a/apps/theming/tests/Settings/AdminTest.php +++ b/apps/theming/tests/Settings/AdminTest.php @@ -49,7 +49,7 @@ class AdminTest extends TestCase { ); } - public function testGetFormNoErrors() { + public function testGetFormNoErrors(): void { $this->config ->expects($this->once()) ->method('getSystemValue') @@ -84,7 +84,7 @@ class AdminTest extends TestCase { $this->assertEquals($expected, $this->admin->getForm()); } - public function testGetFormWithErrors() { + public function testGetFormWithErrors(): void { $this->config ->expects($this->once()) ->method('getSystemValue') @@ -124,11 +124,11 @@ class AdminTest extends TestCase { $this->assertEquals($expected, $this->admin->getForm()); } - public function testGetSection() { + public function testGetSection(): void { $this->assertSame('theming', $this->admin->getSection()); } - public function testGetPriority() { + public function testGetPriority(): void { $this->assertSame(5, $this->admin->getPriority()); } } diff --git a/apps/theming/tests/Settings/PersonalTest.php b/apps/theming/tests/Settings/PersonalTest.php index 88c5e93d1c7..4630ef48c8a 100644 --- a/apps/theming/tests/Settings/PersonalTest.php +++ b/apps/theming/tests/Settings/PersonalTest.php @@ -91,7 +91,7 @@ class PersonalTest extends TestCase { * @param string $toEnable * @param string[] $enabledThemes */ - public function testGetForm(string $enforcedTheme, $themesState) { + public function testGetForm(string $enforcedTheme, $themesState): void { $this->config->expects($this->once()) ->method('getSystemValueString') ->with('enforce_theme', '') @@ -125,11 +125,11 @@ class PersonalTest extends TestCase { $this->assertEquals($expected, $this->admin->getForm()); } - public function testGetSection() { + public function testGetSection(): void { $this->assertSame('theming', $this->admin->getSection()); } - public function testGetPriority() { + public function testGetPriority(): void { $this->assertSame(40, $this->admin->getPriority()); } diff --git a/apps/theming/tests/Themes/AccessibleThemeTestCase.php b/apps/theming/tests/Themes/AccessibleThemeTestCase.php index 5f13e2259aa..a1327a04f0b 100644 --- a/apps/theming/tests/Themes/AccessibleThemeTestCase.php +++ b/apps/theming/tests/Themes/AccessibleThemeTestCase.php @@ -148,7 +148,7 @@ class AccessibleThemeTestCase extends TestCase { /** * @dataProvider dataAccessibilityPairs */ - public function testAccessibilityOfVariables($mainColors, $backgroundColors, $minContrast) { + public function testAccessibilityOfVariables($mainColors, $backgroundColors, $minContrast): void { if (!isset($this->theme)) { $this->markTestSkipped('You need to setup $this->theme in your setUp function'); } elseif (!isset($this->util)) { diff --git a/apps/theming/tests/Themes/DarkHighContrastThemeTest.php b/apps/theming/tests/Themes/DarkHighContrastThemeTest.php index 30bbc5f110d..63fb2bf414d 100644 --- a/apps/theming/tests/Themes/DarkHighContrastThemeTest.php +++ b/apps/theming/tests/Themes/DarkHighContrastThemeTest.php @@ -108,27 +108,27 @@ class DarkHighContrastThemeTest extends AccessibleThemeTestCase { } - public function testGetId() { + public function testGetId(): void { $this->assertEquals('dark-highcontrast', $this->theme->getId()); } - public function testGetType() { + public function testGetType(): void { $this->assertEquals(ITheme::TYPE_THEME, $this->theme->getType()); } - public function testGetTitle() { + public function testGetTitle(): void { $this->assertEquals('Dark theme with high contrast mode', $this->theme->getTitle()); } - public function testGetEnableLabel() { + public function testGetEnableLabel(): void { $this->assertEquals('Enable dark high contrast mode', $this->theme->getEnableLabel()); } - public function testGetDescription() { + public function testGetDescription(): void { $this->assertEquals('Similar to the high contrast mode, but with dark colours.', $this->theme->getDescription()); } - public function testGetMediaQuery() { + public function testGetMediaQuery(): void { $this->assertEquals('(prefers-color-scheme: dark) and (prefers-contrast: more)', $this->theme->getMediaQuery()); } } diff --git a/apps/theming/tests/Themes/DarkThemeTest.php b/apps/theming/tests/Themes/DarkThemeTest.php index 16a289053ae..f53028d3a63 100644 --- a/apps/theming/tests/Themes/DarkThemeTest.php +++ b/apps/theming/tests/Themes/DarkThemeTest.php @@ -105,31 +105,31 @@ class DarkThemeTest extends AccessibleThemeTestCase { } - public function testGetId() { + public function testGetId(): void { $this->assertEquals('dark', $this->theme->getId()); } - public function testGetType() { + public function testGetType(): void { $this->assertEquals(ITheme::TYPE_THEME, $this->theme->getType()); } - public function testGetTitle() { + public function testGetTitle(): void { $this->assertEquals('Dark theme', $this->theme->getTitle()); } - public function testGetEnableLabel() { + public function testGetEnableLabel(): void { $this->assertEquals('Enable dark theme', $this->theme->getEnableLabel()); } - public function testGetDescription() { + public function testGetDescription(): void { $this->assertEquals('A dark theme to ease your eyes by reducing the overall luminosity and brightness.', $this->theme->getDescription()); } - public function testGetMediaQuery() { + public function testGetMediaQuery(): void { $this->assertEquals('(prefers-color-scheme: dark)', $this->theme->getMediaQuery()); } - public function testGetCustomCss() { + public function testGetCustomCss(): void { $this->assertEquals('', $this->theme->getCustomCss()); } } diff --git a/apps/theming/tests/Themes/DefaultThemeTest.php b/apps/theming/tests/Themes/DefaultThemeTest.php index d11237e774c..db6a5bf1cfc 100644 --- a/apps/theming/tests/Themes/DefaultThemeTest.php +++ b/apps/theming/tests/Themes/DefaultThemeTest.php @@ -109,31 +109,31 @@ class DefaultThemeTest extends AccessibleThemeTestCase { } - public function testGetId() { + public function testGetId(): void { $this->assertEquals('default', $this->theme->getId()); } - public function testGetType() { + public function testGetType(): void { $this->assertEquals(ITheme::TYPE_THEME, $this->theme->getType()); } - public function testGetTitle() { + public function testGetTitle(): void { $this->assertEquals('System default theme', $this->theme->getTitle()); } - public function testGetEnableLabel() { + public function testGetEnableLabel(): void { $this->assertEquals('Enable the system default', $this->theme->getEnableLabel()); } - public function testGetDescription() { + public function testGetDescription(): void { $this->assertEquals('Using the default system appearance.', $this->theme->getDescription()); } - public function testGetMediaQuery() { + public function testGetMediaQuery(): void { $this->assertEquals('', $this->theme->getMediaQuery()); } - public function testGetCustomCss() { + public function testGetCustomCss(): void { $this->assertEquals('', $this->theme->getCustomCss()); } @@ -141,7 +141,7 @@ class DefaultThemeTest extends AccessibleThemeTestCase { * Ensure parity between the default theme and the static generated file * @see ThemingController.php:313 */ - public function testThemindDisabledFallbackCss() { + public function testThemindDisabledFallbackCss(): void { // Generate variables $variables = ''; foreach ($this->theme->getCSSVariables() as $variable => $value) { diff --git a/apps/theming/tests/Themes/DyslexiaFontTest.php b/apps/theming/tests/Themes/DyslexiaFontTest.php index 05f489449b8..53505f4bd03 100644 --- a/apps/theming/tests/Themes/DyslexiaFontTest.php +++ b/apps/theming/tests/Themes/DyslexiaFontTest.php @@ -110,31 +110,31 @@ class DyslexiaFontTest extends TestCase { } - public function testGetId() { + public function testGetId(): void { $this->assertEquals('opendyslexic', $this->dyslexiaFont->getId()); } - public function testGetType() { + public function testGetType(): void { $this->assertEquals(ITheme::TYPE_FONT, $this->dyslexiaFont->getType()); } - public function testGetTitle() { + public function testGetTitle(): void { $this->assertNotEmpty($this->dyslexiaFont->getTitle()); } - public function testGetEnableLabel() { + public function testGetEnableLabel(): void { $this->assertNotEmpty($this->dyslexiaFont->getEnableLabel()); } - public function testGetDescription() { + public function testGetDescription(): void { $this->assertNotEmpty($this->dyslexiaFont->getDescription()); } - public function testGetMediaQuery() { + public function testGetMediaQuery(): void { $this->assertEquals('', $this->dyslexiaFont->getMediaQuery()); } - public function testGetCSSVariables() { + public function testGetCSSVariables(): void { $this->assertStringStartsWith('OpenDyslexic', $this->dyslexiaFont->getCSSVariables()['--font-face']); } @@ -156,14 +156,14 @@ class DyslexiaFontTest extends TestCase { * @param string $webRoot * @param bool $prettyUrlsEnabled */ - public function testGetCustomCss($webRoot, $prettyUrlsEnabled) { + public function testGetCustomCss($webRoot, $prettyUrlsEnabled): void { \OC::$WEBROOT = $webRoot; $this->config->expects($this->any()) ->method('getSystemValue') ->with('htaccess.IgnoreFrontController', false) ->willReturn($prettyUrlsEnabled); - $this->assertStringContainsString("'$webRoot/apps/theming/fonts/OpenDyslexic-Regular.woff'", $this->dyslexiaFont->getCustomCss()); + $this->assertStringContainsString("'$webRoot/apps/theming/fonts/OpenDyslexic-Regular.otf'", $this->dyslexiaFont->getCustomCss()); $this->assertStringNotContainsString('index.php', $this->dyslexiaFont->getCustomCss()); } } diff --git a/apps/theming/tests/Themes/HighContrastThemeTest.php b/apps/theming/tests/Themes/HighContrastThemeTest.php index 47c4b3bb374..603bf08a0ee 100644 --- a/apps/theming/tests/Themes/HighContrastThemeTest.php +++ b/apps/theming/tests/Themes/HighContrastThemeTest.php @@ -108,27 +108,27 @@ class HighContrastThemeTest extends AccessibleThemeTestCase { } - public function testGetId() { + public function testGetId(): void { $this->assertEquals('light-highcontrast', $this->theme->getId()); } - public function testGetType() { + public function testGetType(): void { $this->assertEquals(ITheme::TYPE_THEME, $this->theme->getType()); } - public function testGetTitle() { + public function testGetTitle(): void { $this->assertEquals('High contrast mode', $this->theme->getTitle()); } - public function testGetEnableLabel() { + public function testGetEnableLabel(): void { $this->assertEquals('Enable high contrast mode', $this->theme->getEnableLabel()); } - public function testGetDescription() { + public function testGetDescription(): void { $this->assertEquals('A high contrast mode to ease your navigation. Visual quality will be reduced but clarity will be increased.', $this->theme->getDescription()); } - public function testGetMediaQuery() { + public function testGetMediaQuery(): void { $this->assertEquals('(prefers-contrast: more)', $this->theme->getMediaQuery()); } } diff --git a/apps/theming/tests/ThemingDefaultsTest.php b/apps/theming/tests/ThemingDefaultsTest.php index 8edbcbc53c1..d8f169e7f3d 100644 --- a/apps/theming/tests/ThemingDefaultsTest.php +++ b/apps/theming/tests/ThemingDefaultsTest.php @@ -85,7 +85,7 @@ class ThemingDefaultsTest extends TestCase { ); } - public function testGetNameWithDefault() { + public function testGetNameWithDefault(): void { $this->config ->expects($this->once()) ->method('getAppValue') @@ -95,7 +95,7 @@ class ThemingDefaultsTest extends TestCase { $this->assertEquals('Nextcloud', $this->template->getName()); } - public function testGetNameWithCustom() { + public function testGetNameWithCustom(): void { $this->config ->expects($this->once()) ->method('getAppValue') @@ -105,7 +105,7 @@ class ThemingDefaultsTest extends TestCase { $this->assertEquals('MyCustomCloud', $this->template->getName()); } - public function testGetHTMLNameWithDefault() { + public function testGetHTMLNameWithDefault(): void { $this->config ->expects($this->once()) ->method('getAppValue') @@ -115,7 +115,7 @@ class ThemingDefaultsTest extends TestCase { $this->assertEquals('Nextcloud', $this->template->getHTMLName()); } - public function testGetHTMLNameWithCustom() { + public function testGetHTMLNameWithCustom(): void { $this->config ->expects($this->once()) ->method('getAppValue') @@ -125,7 +125,7 @@ class ThemingDefaultsTest extends TestCase { $this->assertEquals('MyCustomCloud', $this->template->getHTMLName()); } - public function testGetTitleWithDefault() { + public function testGetTitleWithDefault(): void { $this->config ->expects($this->once()) ->method('getAppValue') @@ -135,7 +135,7 @@ class ThemingDefaultsTest extends TestCase { $this->assertEquals('Nextcloud', $this->template->getTitle()); } - public function testGetTitleWithCustom() { + public function testGetTitleWithCustom(): void { $this->config ->expects($this->once()) ->method('getAppValue') @@ -146,7 +146,7 @@ class ThemingDefaultsTest extends TestCase { } - public function testGetEntityWithDefault() { + public function testGetEntityWithDefault(): void { $this->config ->expects($this->once()) ->method('getAppValue') @@ -156,7 +156,7 @@ class ThemingDefaultsTest extends TestCase { $this->assertEquals('Nextcloud', $this->template->getEntity()); } - public function testGetEntityWithCustom() { + public function testGetEntityWithCustom(): void { $this->config ->expects($this->once()) ->method('getAppValue') @@ -166,7 +166,7 @@ class ThemingDefaultsTest extends TestCase { $this->assertEquals('MyCustomCloud', $this->template->getEntity()); } - public function testGetBaseUrlWithDefault() { + public function testGetBaseUrlWithDefault(): void { $this->config ->expects($this->once()) ->method('getAppValue') @@ -176,7 +176,7 @@ class ThemingDefaultsTest extends TestCase { $this->assertEquals($this->defaults->getBaseUrl(), $this->template->getBaseUrl()); } - public function testGetBaseUrlWithCustom() { + public function testGetBaseUrlWithCustom(): void { $this->config ->expects($this->once()) ->method('getAppValue') @@ -197,7 +197,7 @@ class ThemingDefaultsTest extends TestCase { * @param $imprintUrl * @dataProvider legalUrlProvider */ - public function testGetImprintURL($imprintUrl) { + public function testGetImprintURL($imprintUrl): void { $this->config ->expects($this->once()) ->method('getAppValue') @@ -211,7 +211,7 @@ class ThemingDefaultsTest extends TestCase { * @param $privacyUrl * @dataProvider legalUrlProvider */ - public function testGetPrivacyURL($privacyUrl) { + public function testGetPrivacyURL($privacyUrl): void { $this->config ->expects($this->once()) ->method('getAppValue') @@ -221,7 +221,7 @@ class ThemingDefaultsTest extends TestCase { $this->assertEquals($privacyUrl, $this->template->getPrivacyUrl()); } - public function testGetSloganWithDefault() { + public function testGetSloganWithDefault(): void { $this->config ->expects($this->once()) ->method('getAppValue') @@ -231,7 +231,7 @@ class ThemingDefaultsTest extends TestCase { $this->assertEquals($this->defaults->getSlogan(), $this->template->getSlogan()); } - public function testGetSloganWithCustom() { + public function testGetSloganWithCustom(): void { $this->config ->expects($this->once()) ->method('getAppValue') @@ -241,7 +241,7 @@ class ThemingDefaultsTest extends TestCase { $this->assertEquals('My custom Slogan', $this->template->getSlogan()); } - public function testGetShortFooter() { + public function testGetShortFooter(): void { $this->config ->expects($this->exactly(5)) ->method('getAppValue') @@ -256,7 +256,7 @@ class ThemingDefaultsTest extends TestCase { $this->assertEquals('<a href="url" target="_blank" rel="noreferrer noopener" class="entity-name">Name</a> – Slogan', $this->template->getShortFooter()); } - public function testGetShortFooterEmptyUrl() { + public function testGetShortFooterEmptyUrl(): void { $this->navigationManager->expects($this->once())->method('getAll')->with(INavigationManager::TYPE_GUEST)->willReturn([]); $this->config ->expects($this->exactly(5)) @@ -272,7 +272,7 @@ class ThemingDefaultsTest extends TestCase { $this->assertEquals('<span class="entity-name">Name</span> – Slogan', $this->template->getShortFooter()); } - public function testGetShortFooterEmptySlogan() { + public function testGetShortFooterEmptySlogan(): void { $this->navigationManager->expects($this->once())->method('getAll')->with(INavigationManager::TYPE_GUEST)->willReturn([]); $this->config ->expects($this->exactly(5)) @@ -288,7 +288,7 @@ class ThemingDefaultsTest extends TestCase { $this->assertEquals('<a href="url" target="_blank" rel="noreferrer noopener" class="entity-name">Name</a>', $this->template->getShortFooter()); } - public function testGetShortFooterImprint() { + public function testGetShortFooterImprint(): void { $this->navigationManager->expects($this->once())->method('getAll')->with(INavigationManager::TYPE_GUEST)->willReturn([]); $this->config ->expects($this->exactly(5)) @@ -309,7 +309,7 @@ class ThemingDefaultsTest extends TestCase { $this->assertEquals('<a href="url" target="_blank" rel="noreferrer noopener" class="entity-name">Name</a> – Slogan<br/><span class="footer__legal-links"><a href="https://example.com/imprint" class="legal" target="_blank" rel="noreferrer noopener">Legal notice</a></span>', $this->template->getShortFooter()); } - public function testGetShortFooterPrivacy() { + public function testGetShortFooterPrivacy(): void { $this->navigationManager->expects($this->once())->method('getAll')->with(INavigationManager::TYPE_GUEST)->willReturn([]); $this->config ->expects($this->exactly(5)) @@ -330,7 +330,7 @@ class ThemingDefaultsTest extends TestCase { $this->assertEquals('<a href="url" target="_blank" rel="noreferrer noopener" class="entity-name">Name</a> – Slogan<br/><span class="footer__legal-links"><a href="https://example.com/privacy" class="legal" target="_blank" rel="noreferrer noopener">Privacy policy</a></span>', $this->template->getShortFooter()); } - public function testGetShortFooterAllLegalLinks() { + public function testGetShortFooterAllLegalLinks(): void { $this->navigationManager->expects($this->once())->method('getAll')->with(INavigationManager::TYPE_GUEST)->willReturn([]); $this->config ->expects($this->exactly(5)) @@ -362,7 +362,7 @@ class ThemingDefaultsTest extends TestCase { * @param $invalidImprintUrl * @dataProvider invalidLegalUrlProvider */ - public function testGetShortFooterInvalidImprint($invalidImprintUrl) { + public function testGetShortFooterInvalidImprint($invalidImprintUrl): void { $this->navigationManager->expects($this->once())->method('getAll')->with(INavigationManager::TYPE_GUEST)->willReturn([]); $this->config ->expects($this->exactly(5)) @@ -382,7 +382,7 @@ class ThemingDefaultsTest extends TestCase { * @param $invalidPrivacyUrl * @dataProvider invalidLegalUrlProvider */ - public function testGetShortFooterInvalidPrivacy($invalidPrivacyUrl) { + public function testGetShortFooterInvalidPrivacy($invalidPrivacyUrl): void { $this->navigationManager->expects($this->once())->method('getAll')->with(INavigationManager::TYPE_GUEST)->willReturn([]); $this->config ->expects($this->exactly(5)) @@ -398,7 +398,7 @@ class ThemingDefaultsTest extends TestCase { $this->assertEquals('<a href="url" target="_blank" rel="noreferrer noopener" class="entity-name">Name</a> – Slogan', $this->template->getShortFooter()); } - public function testGetColorPrimaryWithDefault() { + public function testGetColorPrimaryWithDefault(): void { $this->appConfig ->expects(self::once()) ->method('getValueBool') @@ -413,7 +413,7 @@ class ThemingDefaultsTest extends TestCase { $this->assertEquals($this->defaults->getColorPrimary(), $this->template->getColorPrimary()); } - public function testGetColorPrimaryWithCustom() { + public function testGetColorPrimaryWithCustom(): void { $this->appConfig ->expects(self::once()) ->method('getValueBool') @@ -472,7 +472,7 @@ class ThemingDefaultsTest extends TestCase { /** * @dataProvider dataGetColorPrimary */ - public function testGetColorPrimary(bool $disableTheming, string $primaryColor, string $userPrimaryColor, string $expected) { + public function testGetColorPrimary(bool $disableTheming, string $primaryColor, string $userPrimaryColor, string $expected): void { $user = $this->createMock(IUser::class); $this->userSession->expects($this->any()) ->method('getUser') @@ -499,7 +499,7 @@ class ThemingDefaultsTest extends TestCase { $this->assertEquals($expected, $this->template->getColorPrimary()); } - public function testSet() { + public function testSet(): void { $this->config ->expects($this->exactly(2)) ->method('setAppValue') @@ -527,7 +527,7 @@ class ThemingDefaultsTest extends TestCase { $this->template->set('MySetting', 'MyValue'); } - public function testUndoName() { + public function testUndoName(): void { $this->config ->expects($this->once()) ->method('deleteAppValue') @@ -550,7 +550,7 @@ class ThemingDefaultsTest extends TestCase { $this->assertSame('Nextcloud', $this->template->undo('name')); } - public function testUndoBaseUrl() { + public function testUndoBaseUrl(): void { $this->config ->expects($this->once()) ->method('deleteAppValue') @@ -573,7 +573,7 @@ class ThemingDefaultsTest extends TestCase { $this->assertSame($this->defaults->getBaseUrl(), $this->template->undo('url')); } - public function testUndoSlogan() { + public function testUndoSlogan(): void { $this->config ->expects($this->once()) ->method('deleteAppValue') @@ -596,7 +596,7 @@ class ThemingDefaultsTest extends TestCase { $this->assertSame($this->defaults->getSlogan(), $this->template->undo('slogan')); } - public function testUndoPrimaryColor() { + public function testUndoPrimaryColor(): void { $this->config ->expects($this->once()) ->method('deleteAppValue') @@ -614,7 +614,7 @@ class ThemingDefaultsTest extends TestCase { $this->assertSame($this->defaults->getColorPrimary(), $this->template->undo('primary_color')); } - public function testUndoDefaultAction() { + public function testUndoDefaultAction(): void { $this->config ->expects($this->once()) ->method('deleteAppValue') @@ -632,7 +632,7 @@ class ThemingDefaultsTest extends TestCase { $this->assertSame('', $this->template->undo('defaultitem')); } - public function testGetBackground() { + public function testGetBackground(): void { $this->imageManager ->expects($this->once()) ->method('getImageUrl') @@ -663,15 +663,15 @@ class ThemingDefaultsTest extends TestCase { $this->assertEquals('core-logo?v=0', $this->template->getLogo($useSvg)); } - public function testGetLogoDefaultWithSvg() { + public function testGetLogoDefaultWithSvg(): void { $this->getLogoHelper('logo/logo.svg', true); } - public function testGetLogoDefaultWithoutSvg() { + public function testGetLogoDefaultWithoutSvg(): void { $this->getLogoHelper('logo/logo.png', false); } - public function testGetLogoCustom() { + public function testGetLogoCustom(): void { $this->config ->expects($this->exactly(2)) ->method('getAppValue') @@ -689,7 +689,7 @@ class ThemingDefaultsTest extends TestCase { $this->assertEquals('custom-logo' . '?v=0', $this->template->getLogo()); } - public function testGetScssVariablesCached() { + public function testGetScssVariablesCached(): void { $this->config->expects($this->any())->method('getAppValue')->with('theming', 'cachebuster', '0')->willReturn('1'); $this->cacheFactory->expects($this->once()) ->method('createDistributed') @@ -699,7 +699,7 @@ class ThemingDefaultsTest extends TestCase { $this->assertEquals(['foo' => 'bar'], $this->template->getScssVariables()); } - public function testGetScssVariables() { + public function testGetScssVariables(): void { $this->config ->expects($this->any()) ->method('getAppValue') @@ -754,7 +754,7 @@ class ThemingDefaultsTest extends TestCase { $this->assertEquals($expected, $this->template->getScssVariables()); } - public function testGetDefaultAndroidURL() { + public function testGetDefaultAndroidURL(): void { $this->config ->expects($this->once()) ->method('getAppValue') @@ -764,7 +764,7 @@ class ThemingDefaultsTest extends TestCase { $this->assertEquals('https://play.google.com/store/apps/details?id=com.nextcloud.client', $this->template->getAndroidClientUrl()); } - public function testGetCustomAndroidURL() { + public function testGetCustomAndroidURL(): void { $this->config ->expects($this->once()) ->method('getAppValue') @@ -774,7 +774,7 @@ class ThemingDefaultsTest extends TestCase { $this->assertEquals('https://play.google.com/store/apps/details?id=com.mycloud.client', $this->template->getAndroidClientUrl()); } - public function testGetDefaultiOSURL() { + public function testGetDefaultiOSURL(): void { $this->config ->expects($this->once()) ->method('getAppValue') @@ -784,7 +784,7 @@ class ThemingDefaultsTest extends TestCase { $this->assertEquals('https://geo.itunes.apple.com/us/app/nextcloud/id1125420102?mt=8', $this->template->getiOSClientUrl()); } - public function testGetCustomiOSURL() { + public function testGetCustomiOSURL(): void { $this->config ->expects($this->once()) ->method('getAppValue') @@ -794,7 +794,7 @@ class ThemingDefaultsTest extends TestCase { $this->assertEquals('https://geo.itunes.apple.com/us/app/nextcloud/id1234567890?mt=8', $this->template->getiOSClientUrl()); } - public function testGetDefaultiTunesAppId() { + public function testGetDefaultiTunesAppId(): void { $this->config ->expects($this->once()) ->method('getAppValue') @@ -804,7 +804,7 @@ class ThemingDefaultsTest extends TestCase { $this->assertEquals('1125420102', $this->template->getiTunesAppId()); } - public function testGetCustomiTunesAppId() { + public function testGetCustomiTunesAppId(): void { $this->config ->expects($this->once()) ->method('getAppValue') @@ -824,7 +824,7 @@ class ThemingDefaultsTest extends TestCase { } /** @dataProvider dataReplaceImagePath */ - public function testReplaceImagePath($app, $image, $result = 'themingRoute?v=1234abcd') { + public function testReplaceImagePath($app, $image, $result = 'themingRoute?v=1234abcd'): void { $this->cache->expects($this->any()) ->method('get') ->with('shouldReplaceIcons') diff --git a/apps/theming/tests/UtilTest.php b/apps/theming/tests/UtilTest.php index 4c9f9f10c97..ba160684b7a 100644 --- a/apps/theming/tests/UtilTest.php +++ b/apps/theming/tests/UtilTest.php @@ -18,22 +18,17 @@ use Test\TestCase; class UtilTest extends TestCase { - /** @var Util */ - protected $util; - /** @var IConfig|MockObject */ - protected $config; - /** @var IAppData|MockObject */ - protected $appData; - /** @var IAppManager|MockObject */ - protected $appManager; - /** @var ImageManager|MockObject */ - protected $imageManager; + protected Util $util; + protected IConfig&MockObject $config; + protected IAppData&MockObject $appData; + protected IAppManager $appManager; + protected ImageManager&MockObject $imageManager; protected function setUp(): void { parent::setUp(); $this->config = $this->createMock(IConfig::class); $this->appData = $this->createMock(IAppData::class); - $this->appManager = $this->createMock(IAppManager::class); + $this->appManager = \OCP\Server::get(IAppManager::class); $this->imageManager = $this->createMock(ImageManager::class); $this->util = new Util($this->config, $this->appManager, $this->appData, $this->imageManager); } @@ -52,7 +47,7 @@ class UtilTest extends TestCase { /** * @dataProvider dataColorContrast */ - public function testColorContrast(string $color1, string $color2, $contrast) { + public function testColorContrast(string $color1, string $color2, $contrast): void { $this->assertEqualsWithDelta($contrast, $this->util->colorContrast($color1, $color2), .001); } @@ -67,78 +62,78 @@ class UtilTest extends TestCase { /** * @dataProvider dataInvertTextColor */ - public function testInvertTextColor($color, $expected) { + public function testInvertTextColor($color, $expected): void { $invert = $this->util->invertTextColor($color); $this->assertEquals($expected, $invert); } - public function testCalculateLuminanceLight() { + public function testCalculateLuminanceLight(): void { $luminance = $this->util->calculateLuminance('#ffffff'); $this->assertEquals(1, $luminance); } - public function testCalculateLuminanceDark() { + public function testCalculateLuminanceDark(): void { $luminance = $this->util->calculateLuminance('#000000'); $this->assertEquals(0, $luminance); } - public function testCalculateLuminanceLightShorthand() { + public function testCalculateLuminanceLightShorthand(): void { $luminance = $this->util->calculateLuminance('#fff'); $this->assertEquals(1, $luminance); } - public function testCalculateLuminanceDarkShorthand() { + public function testCalculateLuminanceDarkShorthand(): void { $luminance = $this->util->calculateLuminance('#000'); $this->assertEquals(0, $luminance); } - public function testInvertTextColorInvalid() { + public function testInvertTextColorInvalid(): void { $this->expectException(\Exception::class); $this->util->invertTextColor('aaabbbcccddd123'); } - public function testInvertTextColorEmpty() { + public function testInvertTextColorEmpty(): void { $this->expectException(\Exception::class); $this->util->invertTextColor(''); } - public function testElementColorDefaultBlack() { + public function testElementColorDefaultBlack(): void { $elementColor = $this->util->elementColor('#000000'); $this->assertEquals('#4d4d4d', $elementColor); } - public function testElementColorDefaultWhite() { + public function testElementColorDefaultWhite(): void { $elementColor = $this->util->elementColor('#ffffff'); $this->assertEquals('#b3b3b3', $elementColor); } - public function testElementColorBlackOnDarkBackground() { + public function testElementColorBlackOnDarkBackground(): void { $elementColor = $this->util->elementColor('#000000', false); $this->assertEquals('#4d4d4d', $elementColor); } - public function testElementColorBlackOnBrightBackground() { + public function testElementColorBlackOnBrightBackground(): void { $elementColor = $this->util->elementColor('#000000', true); $this->assertEquals('#000000', $elementColor); } - public function testElementColorWhiteOnBrightBackground() { + public function testElementColorWhiteOnBrightBackground(): void { $elementColor = $this->util->elementColor('#ffffff', true); $this->assertEquals('#b3b3b3', $elementColor); } - public function testElementColorWhiteOnDarkBackground() { + public function testElementColorWhiteOnDarkBackground(): void { $elementColor = $this->util->elementColor('#ffffff', false); $this->assertEquals('#ffffff', $elementColor); } - public function testGenerateRadioButtonWhite() { + public function testGenerateRadioButtonWhite(): void { $button = $this->util->generateRadioButton('#ffffff'); $expected = 'PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMTYiIHdpZHRoPSIxNiI+PHBhdGggZD0iTTggMWE3IDcgMCAwIDAtNyA3IDcgNyAwIDAgMCA3IDcgNyA3IDAgMCAwIDctNyA3IDcgMCAwIDAtNy03em0wIDFhNiA2IDAgMCAxIDYgNiA2IDYgMCAwIDEtNiA2IDYgNiAwIDAgMS02LTYgNiA2IDAgMCAxIDYtNnptMCAyYTQgNCAwIDEgMCAwIDggNCA0IDAgMCAwIDAtOHoiIGZpbGw9IiNmZmZmZmYiLz48L3N2Zz4='; $this->assertEquals($expected, $button); } - public function testGenerateRadioButtonBlack() { + public function testGenerateRadioButtonBlack(): void { $button = $this->util->generateRadioButton('#000000'); $expected = 'PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMTYiIHdpZHRoPSIxNiI+PHBhdGggZD0iTTggMWE3IDcgMCAwIDAtNyA3IDcgNyAwIDAgMCA3IDcgNyA3IDAgMCAwIDctNyA3IDcgMCAwIDAtNy03em0wIDFhNiA2IDAgMCAxIDYgNiA2IDYgMCAwIDEtNiA2IDYgNiAwIDAgMS02LTYgNiA2IDAgMCAxIDYtNnptMCAyYTQgNCAwIDEgMCAwIDggNCA0IDAgMCAwIDAtOHoiIGZpbGw9IiMwMDAwMDAiLz48L3N2Zz4='; $this->assertEquals($expected, $button); @@ -147,28 +142,24 @@ class UtilTest extends TestCase { /** * @dataProvider dataGetAppIcon */ - public function testGetAppIcon($app, $expected) { + public function testGetAppIcon($app, $expected): void { $this->appData->expects($this->any()) ->method('getFolder') ->with('global/images') ->willThrowException(new NotFoundException()); - $this->appManager->expects($this->once()) - ->method('getAppPath') - ->with($app) - ->willReturn(\OC_App::getAppPath($app)); $icon = $this->util->getAppIcon($app); $this->assertEquals($expected, $icon); } public function dataGetAppIcon() { return [ - ['user_ldap', \OC_App::getAppPath('user_ldap') . '/img/app.svg'], + ['user_ldap', \OCP\Server::get(IAppManager::class)->getAppPath('user_ldap') . '/img/app.svg'], ['noapplikethis', \OC::$SERVERROOT . '/core/img/logo/logo.svg'], - ['comments', \OC_App::getAppPath('comments') . '/img/comments.svg'], + ['comments', \OCP\Server::get(IAppManager::class)->getAppPath('comments') . '/img/comments.svg'], ]; } - public function testGetAppIconThemed() { + public function testGetAppIconThemed(): void { $file = $this->createMock(ISimpleFile::class); $folder = $this->createMock(ISimpleFolder::class); $folder->expects($this->once()) @@ -186,13 +177,7 @@ class UtilTest extends TestCase { /** * @dataProvider dataGetAppImage */ - public function testGetAppImage($app, $image, $expected) { - if ($app !== 'core') { - $this->appManager->expects($this->once()) - ->method('getAppPath') - ->with($app) - ->willReturn(\OC_App::getAppPath($app)); - } + public function testGetAppImage($app, $image, $expected): void { $this->assertEquals($expected, $this->util->getAppImage($app, $image)); } @@ -205,14 +190,14 @@ class UtilTest extends TestCase { ]; } - public function testColorizeSvg() { + public function testColorizeSvg(): void { $input = '#0082c9 #0082C9 #000000 #FFFFFF'; $expected = '#AAAAAA #AAAAAA #000000 #FFFFFF'; $result = $this->util->colorizeSvg($input, '#AAAAAA'); $this->assertEquals($expected, $result); } - public function testIsAlreadyThemedFalse() { + public function testIsAlreadyThemedFalse(): void { $this->config->expects($this->once()) ->method('getSystemValue') ->with('theme', '') @@ -221,7 +206,7 @@ class UtilTest extends TestCase { $this->assertFalse($actual); } - public function testIsAlreadyThemedTrue() { + public function testIsAlreadyThemedTrue(): void { $this->config->expects($this->once()) ->method('getSystemValue') ->with('theme', '') @@ -240,7 +225,7 @@ class UtilTest extends TestCase { /** * @dataProvider dataIsBackgroundThemed */ - public function testIsBackgroundThemed($backgroundMime, $expected) { + public function testIsBackgroundThemed($backgroundMime, $expected): void { $this->config->expects($this->once()) ->method('getAppValue') ->with('theming', 'backgroundMime', '') diff --git a/apps/twofactor_backupcodes/l10n/ru.js b/apps/twofactor_backupcodes/l10n/ru.js index 3f3e3a15e0a..a798b19fd9a 100644 --- a/apps/twofactor_backupcodes/l10n/ru.js +++ b/apps/twofactor_backupcodes/l10n/ru.js @@ -10,6 +10,7 @@ OC.L10N.register( "Two factor backup codes" : "Второй фактор — резервные коды", "A two-factor auth backup codes provider" : "Провайдер резервных копий для кодов двухфакторной аутентификации", "Backup codes have been generated. {used} of {total} codes have been used." : "Использовано {used} из {total} ранее выпущенных резервных кодов.", + "These are your backup codes. Please save and/or print them as you will not be able to read the codes again later." : "Это ваши резервные коды. Пожалуйста, сохраните и/или распечатайте их, так как позже вы не сможете прочитать коды снова.", "Save backup codes" : "Сохранить резервные коды", "Print backup codes" : "Распечатать резервные коды", "Regenerate backup codes" : "Перевыпустить резервные коды", diff --git a/apps/twofactor_backupcodes/l10n/ru.json b/apps/twofactor_backupcodes/l10n/ru.json index 44e4c9620c7..4023303d1e9 100644 --- a/apps/twofactor_backupcodes/l10n/ru.json +++ b/apps/twofactor_backupcodes/l10n/ru.json @@ -8,6 +8,7 @@ "Two factor backup codes" : "Второй фактор — резервные коды", "A two-factor auth backup codes provider" : "Провайдер резервных копий для кодов двухфакторной аутентификации", "Backup codes have been generated. {used} of {total} codes have been used." : "Использовано {used} из {total} ранее выпущенных резервных кодов.", + "These are your backup codes. Please save and/or print them as you will not be able to read the codes again later." : "Это ваши резервные коды. Пожалуйста, сохраните и/или распечатайте их, так как позже вы не сможете прочитать коды снова.", "Save backup codes" : "Сохранить резервные коды", "Print backup codes" : "Распечатать резервные коды", "Regenerate backup codes" : "Перевыпустить резервные коды", diff --git a/apps/twofactor_backupcodes/tests/Db/BackupCodeMapperTest.php b/apps/twofactor_backupcodes/tests/Db/BackupCodeMapperTest.php index ce373aea1d9..5cde4c5a718 100644 --- a/apps/twofactor_backupcodes/tests/Db/BackupCodeMapperTest.php +++ b/apps/twofactor_backupcodes/tests/Db/BackupCodeMapperTest.php @@ -50,7 +50,7 @@ class BackupCodeMapperTest extends TestCase { $this->resetDB(); } - public function testGetBackupCodes() { + public function testGetBackupCodes(): void { $code1 = new BackupCode(); $code1->setUserId($this->testUID); $code1->setCode('1|$2y$10$Fyo.DkMtkaHapVvRVbQBeeIdi5x/6nmPnxiBzD0GDKa08NMus5xze'); @@ -76,7 +76,7 @@ class BackupCodeMapperTest extends TestCase { $this->assertInstanceOf(BackupCode::class, $dbCodes[1]); } - public function testDeleteCodes() { + public function testDeleteCodes(): void { $code = new BackupCode(); $code->setUserId($this->testUID); $code->setCode('1|$2y$10$CagG8pEhZL.xDirtCCP/KuuWtnsAasgq60zY9rU46dBK4w8yW0Z/y'); @@ -95,7 +95,7 @@ class BackupCodeMapperTest extends TestCase { $this->assertCount(0, $this->mapper->getBackupCodes($user)); } - public function testInsertArgonEncryptedCodes() { + public function testInsertArgonEncryptedCodes(): void { $code = new BackupCode(); $code->setUserId($this->testUID); $code->setCode('2|$argon2i$v=19$m=1024,t=2,p=2$MjJWUjRFWndtMm5BWGxOag$BusVxLeFyiLLWtaVvX/JRFBiPdZcjRrzpQ/rAhn6vqY'); diff --git a/apps/twofactor_backupcodes/tests/Service/BackupCodeStorageTest.php b/apps/twofactor_backupcodes/tests/Service/BackupCodeStorageTest.php index bd300b21b94..f184cb1c75c 100644 --- a/apps/twofactor_backupcodes/tests/Service/BackupCodeStorageTest.php +++ b/apps/twofactor_backupcodes/tests/Service/BackupCodeStorageTest.php @@ -38,7 +38,7 @@ class BackupCodeStorageTest extends TestCase { $this->overwriteService(IManager::class, $this->notificationManager); } - public function testSimpleWorkFlow() { + public function testSimpleWorkFlow(): void { $user = $this->getMockBuilder(\OCP\IUser::class)->getMock(); $user->expects($this->any()) ->method('getUID') diff --git a/apps/twofactor_backupcodes/tests/Unit/Activity/ProviderTest.php b/apps/twofactor_backupcodes/tests/Unit/Activity/ProviderTest.php index d73acad7979..fb2c419f521 100644 --- a/apps/twofactor_backupcodes/tests/Unit/Activity/ProviderTest.php +++ b/apps/twofactor_backupcodes/tests/Unit/Activity/ProviderTest.php @@ -41,7 +41,7 @@ class ProviderTest extends TestCase { $this->provider = new Provider($this->l10n, $this->urlGenerator, $this->activityManager); } - public function testParseUnrelated() { + public function testParseUnrelated(): void { $lang = 'ru'; $event = $this->createMock(IEvent::class); $event->expects($this->once()) @@ -61,7 +61,7 @@ class ProviderTest extends TestCase { /** * @dataProvider subjectData */ - public function testParse($subject) { + public function testParse($subject): void { $lang = 'ru'; $event = $this->createMock(IEvent::class); $l = $this->createMock(IL10N::class); @@ -93,7 +93,7 @@ class ProviderTest extends TestCase { $this->provider->parse($lang, $event); } - public function testParseInvalidSubject() { + public function testParseInvalidSubject(): void { $lang = 'ru'; $l = $this->createMock(IL10N::class); $event = $this->createMock(IEvent::class); diff --git a/apps/twofactor_backupcodes/tests/Unit/BackgroundJob/CheckBackupCodeTest.php b/apps/twofactor_backupcodes/tests/Unit/BackgroundJob/CheckBackupCodeTest.php index 5f95994e6fa..7b6fe6cb2d8 100644 --- a/apps/twofactor_backupcodes/tests/Unit/BackgroundJob/CheckBackupCodeTest.php +++ b/apps/twofactor_backupcodes/tests/Unit/BackgroundJob/CheckBackupCodeTest.php @@ -63,7 +63,7 @@ class CheckBackupCodeTest extends TestCase { ); } - public function testRunAlreadyGenerated() { + public function testRunAlreadyGenerated(): void { $this->user->method('isEnabled') ->willReturn(true); @@ -79,7 +79,7 @@ class CheckBackupCodeTest extends TestCase { $this->invokePrivate($this->checkBackupCodes, 'run', [[]]); } - public function testRun() { + public function testRun(): void { $this->user->method('getUID') ->willReturn('myUID'); $this->user->method('isEnabled') @@ -104,7 +104,7 @@ class CheckBackupCodeTest extends TestCase { $this->invokePrivate($this->checkBackupCodes, 'run', [[]]); } - public function testRunDisabledUser() { + public function testRunDisabledUser(): void { $this->user->method('getUID') ->willReturn('myUID'); $this->user->method('isEnabled') @@ -120,7 +120,7 @@ class CheckBackupCodeTest extends TestCase { $this->invokePrivate($this->checkBackupCodes, 'run', [[]]); } - public function testRunNoProviders() { + public function testRunNoProviders(): void { $this->user->method('isEnabled') ->willReturn(true); diff --git a/apps/twofactor_backupcodes/tests/Unit/BackgroundJob/RememberBackupCodesJobTest.php b/apps/twofactor_backupcodes/tests/Unit/BackgroundJob/RememberBackupCodesJobTest.php index 8b2714227cd..31b7d514246 100644 --- a/apps/twofactor_backupcodes/tests/Unit/BackgroundJob/RememberBackupCodesJobTest.php +++ b/apps/twofactor_backupcodes/tests/Unit/BackgroundJob/RememberBackupCodesJobTest.php @@ -59,7 +59,7 @@ class RememberBackupCodesJobTest extends TestCase { ); } - public function testInvalidUID() { + public function testInvalidUID(): void { $this->userManager->method('get') ->with('invalidUID') ->willReturn(null); @@ -78,7 +78,7 @@ class RememberBackupCodesJobTest extends TestCase { self::invokePrivate($this->job, 'run', [['uid' => 'invalidUID']]); } - public function testBackupCodesGenerated() { + public function testBackupCodesGenerated(): void { $user = $this->createMock(IUser::class); $user->method('getUID') ->willReturn('validUID'); @@ -108,7 +108,7 @@ class RememberBackupCodesJobTest extends TestCase { self::invokePrivate($this->job, 'run', [['uid' => 'validUID']]); } - public function testNoActiveProvider() { + public function testNoActiveProvider(): void { $user = $this->createMock(IUser::class); $user->method('getUID') ->willReturn('validUID'); @@ -136,7 +136,7 @@ class RememberBackupCodesJobTest extends TestCase { self::invokePrivate($this->job, 'run', [['uid' => 'validUID']]); } - public function testNotificationSend() { + public function testNotificationSend(): void { $user = $this->createMock(IUser::class); $user->method('getUID') ->willReturn('validUID'); @@ -176,7 +176,7 @@ class RememberBackupCodesJobTest extends TestCase { self::invokePrivate($this->job, 'run', [['uid' => 'validUID']]); } - public function testNotificationNotSendForDisabledUser() { + public function testNotificationNotSendForDisabledUser(): void { $user = $this->createMock(IUser::class); $user->method('getUID') ->willReturn('validUID'); diff --git a/apps/twofactor_backupcodes/tests/Unit/Controller/SettingsControllerTest.php b/apps/twofactor_backupcodes/tests/Unit/Controller/SettingsControllerTest.php index da4d58cf0bc..85b23e88fee 100644 --- a/apps/twofactor_backupcodes/tests/Unit/Controller/SettingsControllerTest.php +++ b/apps/twofactor_backupcodes/tests/Unit/Controller/SettingsControllerTest.php @@ -42,7 +42,7 @@ class SettingsControllerTest extends TestCase { $this->controller = new SettingsController('twofactor_backupcodes', $this->request, $this->storage, $this->userSession); } - public function testCreateCodes() { + public function testCreateCodes(): void { $user = $this->getMockBuilder(IUser::class)->getMock(); $codes = ['a', 'b']; diff --git a/apps/twofactor_backupcodes/tests/Unit/Event/CodesGeneratedTest.php b/apps/twofactor_backupcodes/tests/Unit/Event/CodesGeneratedTest.php index fd7841b0e98..3f619e387e9 100644 --- a/apps/twofactor_backupcodes/tests/Unit/Event/CodesGeneratedTest.php +++ b/apps/twofactor_backupcodes/tests/Unit/Event/CodesGeneratedTest.php @@ -13,7 +13,7 @@ use OCP\IUser; use Test\TestCase; class CodesGeneratedTest extends TestCase { - public function testCodeGeneratedEvent() { + public function testCodeGeneratedEvent(): void { $user = $this->createMock(IUser::class); $event = new CodesGenerated($user); diff --git a/apps/twofactor_backupcodes/tests/Unit/Listener/ActivityPublisherTest.php b/apps/twofactor_backupcodes/tests/Unit/Listener/ActivityPublisherTest.php index bfb5065fdfa..72ca91ed8eb 100644 --- a/apps/twofactor_backupcodes/tests/Unit/Listener/ActivityPublisherTest.php +++ b/apps/twofactor_backupcodes/tests/Unit/Listener/ActivityPublisherTest.php @@ -37,7 +37,7 @@ class ActivityPublisherTest extends TestCase { $this->listener = new ActivityPublisher($this->activityManager, $this->logger); } - public function testHandleGenericEvent() { + public function testHandleGenericEvent(): void { $event = $this->createMock(Event::class); $this->activityManager->expects($this->never()) ->method('publish'); @@ -45,7 +45,7 @@ class ActivityPublisherTest extends TestCase { $this->listener->handle($event); } - public function testHandleCodesGeneratedEvent() { + public function testHandleCodesGeneratedEvent(): void { $user = $this->createMock(IUser::class); $user->method('getUID')->willReturn('fritz'); $event = new CodesGenerated($user); diff --git a/apps/twofactor_backupcodes/tests/Unit/Listener/ClearNotificationsTest.php b/apps/twofactor_backupcodes/tests/Unit/Listener/ClearNotificationsTest.php index 14807ffdd5e..b4afa9c2a72 100644 --- a/apps/twofactor_backupcodes/tests/Unit/Listener/ClearNotificationsTest.php +++ b/apps/twofactor_backupcodes/tests/Unit/Listener/ClearNotificationsTest.php @@ -34,7 +34,7 @@ class ClearNotificationsTest extends TestCase { $this->listener = new ClearNotifications($this->notificationManager); } - public function testHandleGenericEvent() { + public function testHandleGenericEvent(): void { $event = $this->createMock(Event::class); $this->notificationManager->expects($this->never()) ->method($this->anything()); @@ -42,7 +42,7 @@ class ClearNotificationsTest extends TestCase { $this->listener->handle($event); } - public function testHandleCodesGeneratedEvent() { + public function testHandleCodesGeneratedEvent(): void { $user = $this->createMock(IUser::class); $user->method('getUID')->willReturn('fritz'); $event = new CodesGenerated($user); diff --git a/apps/twofactor_backupcodes/tests/Unit/Listener/ProviderDisabledTest.php b/apps/twofactor_backupcodes/tests/Unit/Listener/ProviderDisabledTest.php index f9e9f46b1d6..7f7b5dc3011 100644 --- a/apps/twofactor_backupcodes/tests/Unit/Listener/ProviderDisabledTest.php +++ b/apps/twofactor_backupcodes/tests/Unit/Listener/ProviderDisabledTest.php @@ -31,7 +31,7 @@ class ProviderDisabledTest extends TestCase { $this->listener = new ProviderDisabled($this->registy, $this->jobList); } - public function testHandleGenericEvent() { + public function testHandleGenericEvent(): void { $event = $this->createMock(Event::class); $this->jobList->expects($this->never()) ->method($this->anything()); @@ -39,7 +39,7 @@ class ProviderDisabledTest extends TestCase { $this->listener->handle($event); } - public function testHandleStillActiveProvider() { + public function testHandleStillActiveProvider(): void { $user = $this->createMock(IUser::class); $user->method('getUID') ->willReturn('myUID'); @@ -60,7 +60,7 @@ class ProviderDisabledTest extends TestCase { $this->listener->handle($event); } - public function testHandleNoActiveProvider() { + public function testHandleNoActiveProvider(): void { $user = $this->createMock(IUser::class); $user->method('getUID') ->willReturn('myUID'); diff --git a/apps/twofactor_backupcodes/tests/Unit/Listener/ProviderEnabledTest.php b/apps/twofactor_backupcodes/tests/Unit/Listener/ProviderEnabledTest.php index 60e8b13656c..145944fccca 100644 --- a/apps/twofactor_backupcodes/tests/Unit/Listener/ProviderEnabledTest.php +++ b/apps/twofactor_backupcodes/tests/Unit/Listener/ProviderEnabledTest.php @@ -31,7 +31,7 @@ class ProviderEnabledTest extends TestCase { $this->listener = new ProviderEnabled($this->registy, $this->jobList); } - public function testHandleGenericEvent() { + public function testHandleGenericEvent(): void { $event = $this->createMock(Event::class); $this->jobList->expects($this->never()) ->method($this->anything()); @@ -39,7 +39,7 @@ class ProviderEnabledTest extends TestCase { $this->listener->handle($event); } - public function testHandleCodesGeneratedEventAlraedyBackupcodes() { + public function testHandleCodesGeneratedEventAlraedyBackupcodes(): void { $user = $this->createMock(IUser::class); $user->method('getUID') ->willReturn('myUID'); @@ -59,7 +59,7 @@ class ProviderEnabledTest extends TestCase { $this->listener->handle($event); } - public function testHandleCodesGeneratedEventNoBackupcodes() { + public function testHandleCodesGeneratedEventNoBackupcodes(): void { $user = $this->createMock(IUser::class); $user->method('getUID') ->willReturn('myUID'); diff --git a/apps/twofactor_backupcodes/tests/Unit/Listener/RegistryUpdaterTest.php b/apps/twofactor_backupcodes/tests/Unit/Listener/RegistryUpdaterTest.php index d23c477cb7b..4f724f888d7 100644 --- a/apps/twofactor_backupcodes/tests/Unit/Listener/RegistryUpdaterTest.php +++ b/apps/twofactor_backupcodes/tests/Unit/Listener/RegistryUpdaterTest.php @@ -36,7 +36,7 @@ class RegistryUpdaterTest extends TestCase { $this->listener = new RegistryUpdater($this->registry, $this->provider); } - public function testHandleGenericEvent() { + public function testHandleGenericEvent(): void { $event = $this->createMock(Event::class); $this->registry->expects($this->never()) ->method('enableProviderFor'); @@ -44,7 +44,7 @@ class RegistryUpdaterTest extends TestCase { $this->listener->handle($event); } - public function testHandleCodesGeneratedEvent() { + public function testHandleCodesGeneratedEvent(): void { $user = $this->createMock(IUser::class); $event = new CodesGenerated($user); $this->registry->expects($this->once()) diff --git a/apps/twofactor_backupcodes/tests/Unit/Migration/CheckBackupCodeTest.php b/apps/twofactor_backupcodes/tests/Unit/Migration/CheckBackupCodeTest.php index 25972f8aaca..bb959ff08b3 100644 --- a/apps/twofactor_backupcodes/tests/Unit/Migration/CheckBackupCodeTest.php +++ b/apps/twofactor_backupcodes/tests/Unit/Migration/CheckBackupCodeTest.php @@ -28,11 +28,11 @@ class CheckBackupCodeTest extends TestCase { $this->checkBackupsCodes = new CheckBackupCodes($this->jobList); } - public function testGetName() { + public function testGetName(): void { $this->assertSame('Add background job to check for backup codes', $this->checkBackupsCodes->getName()); } - public function testRun() { + public function testRun(): void { $this->jobList->expects($this->once()) ->method('add') ->with( diff --git a/apps/twofactor_backupcodes/tests/Unit/Notification/NotifierTest.php b/apps/twofactor_backupcodes/tests/Unit/Notification/NotifierTest.php index 87aca38ba73..dc42c8c0bdc 100644 --- a/apps/twofactor_backupcodes/tests/Unit/Notification/NotifierTest.php +++ b/apps/twofactor_backupcodes/tests/Unit/Notification/NotifierTest.php @@ -49,7 +49,7 @@ class NotifierTest extends TestCase { } - public function testPrepareWrongApp() { + public function testPrepareWrongApp(): void { $this->expectException(\InvalidArgumentException::class); /** @var INotification|\PHPUnit\Framework\MockObject\MockObject $notification */ @@ -64,7 +64,7 @@ class NotifierTest extends TestCase { } - public function testPrepareWrongSubject() { + public function testPrepareWrongSubject(): void { $this->expectException(\InvalidArgumentException::class); /** @var INotification|\PHPUnit\Framework\MockObject\MockObject $notification */ @@ -79,7 +79,7 @@ class NotifierTest extends TestCase { $this->notifier->prepare($notification, 'en'); } - public function testPrepare() { + public function testPrepare(): void { /** @var \OCP\Notification\INotification|\PHPUnit\Framework\MockObject\MockObject $notification */ $notification = $this->createMock(INotification::class); diff --git a/apps/twofactor_backupcodes/tests/Unit/Provider/BackupCodesProviderTest.php b/apps/twofactor_backupcodes/tests/Unit/Provider/BackupCodesProviderTest.php index ffeb5fd1e15..24e986710c4 100644 --- a/apps/twofactor_backupcodes/tests/Unit/Provider/BackupCodesProviderTest.php +++ b/apps/twofactor_backupcodes/tests/Unit/Provider/BackupCodesProviderTest.php @@ -49,11 +49,11 @@ class BackupCodesProviderTest extends TestCase { $this->provider = new BackupCodesProvider($this->appName, $this->storage, $this->l10n, $this->appManager, $this->initialState); } - public function testGetId() { + public function testGetId(): void { $this->assertEquals('backup_codes', $this->provider->getId()); } - public function testGetDisplayName() { + public function testGetDisplayName(): void { $this->l10n->expects($this->once()) ->method('t') ->with('Backup code') @@ -61,7 +61,7 @@ class BackupCodesProviderTest extends TestCase { $this->assertSame('l10n backup code', $this->provider->getDisplayName()); } - public function testGetDescription() { + public function testGetDescription(): void { $this->l10n->expects($this->once()) ->method('t') ->with('Use backup code') @@ -69,14 +69,14 @@ class BackupCodesProviderTest extends TestCase { $this->assertSame('l10n use backup code', $this->provider->getDescription()); } - public function testGetTempalte() { + public function testGetTempalte(): void { $user = $this->getMockBuilder(IUser::class)->getMock(); $expected = new Template('twofactor_backupcodes', 'challenge'); $this->assertEquals($expected, $this->provider->getTemplate($user)); } - public function testVerfiyChallenge() { + public function testVerfiyChallenge(): void { $user = $this->getMockBuilder(IUser::class)->getMock(); $challenge = 'xyz'; @@ -88,7 +88,7 @@ class BackupCodesProviderTest extends TestCase { $this->assertFalse($this->provider->verifyChallenge($user, $challenge)); } - public function testIsTwoFactorEnabledForUser() { + public function testIsTwoFactorEnabledForUser(): void { $user = $this->getMockBuilder(IUser::class)->getMock(); $this->storage->expects($this->once()) @@ -99,7 +99,7 @@ class BackupCodesProviderTest extends TestCase { $this->assertTrue($this->provider->isTwoFactorAuthEnabledForUser($user)); } - public function testIsActiveNoProviders() { + public function testIsActiveNoProviders(): void { $user = $this->getMockBuilder(IUser::class)->getMock(); $this->appManager->expects($this->once()) @@ -119,7 +119,7 @@ class BackupCodesProviderTest extends TestCase { $this->assertFalse($this->provider->isActive($user)); } - public function testIsActiveWithProviders() { + public function testIsActiveWithProviders(): void { $user = $this->getMockBuilder(IUser::class)->getMock(); $this->appManager->expects($this->once()) diff --git a/apps/twofactor_backupcodes/tests/Unit/Service/BackupCodeStorageTest.php b/apps/twofactor_backupcodes/tests/Unit/Service/BackupCodeStorageTest.php index 7725102db88..67124a7a928 100644 --- a/apps/twofactor_backupcodes/tests/Unit/Service/BackupCodeStorageTest.php +++ b/apps/twofactor_backupcodes/tests/Unit/Service/BackupCodeStorageTest.php @@ -46,7 +46,7 @@ class BackupCodeStorageTest extends TestCase { $this->storage = new BackupCodeStorage($this->mapper, $this->random, $this->hasher, $this->eventDispatcher); } - public function testCreateCodes() { + public function testCreateCodes(): void { $user = $this->createMock(IUser::class); $number = 5; $user->method('getUID')->willReturn('fritz'); @@ -78,7 +78,7 @@ class BackupCodeStorageTest extends TestCase { } } - public function testHasBackupCodes() { + public function testHasBackupCodes(): void { $user = $this->createMock(IUser::class); $codes = [ new BackupCode(), @@ -93,7 +93,7 @@ class BackupCodeStorageTest extends TestCase { $this->assertTrue($this->storage->hasBackupCodes($user)); } - public function testHasBackupCodesNoCodes() { + public function testHasBackupCodesNoCodes(): void { $user = $this->createMock(IUser::class); $codes = []; @@ -105,7 +105,7 @@ class BackupCodeStorageTest extends TestCase { $this->assertFalse($this->storage->hasBackupCodes($user)); } - public function testGetBackupCodeState() { + public function testGetBackupCodeState(): void { $user = $this->createMock(IUser::class); $code1 = new BackupCode(); @@ -130,7 +130,7 @@ class BackupCodeStorageTest extends TestCase { $this->assertEquals($expected, $this->storage->getBackupCodesState($user)); } - public function testGetBackupCodeDisabled() { + public function testGetBackupCodeDisabled(): void { $user = $this->createMock(IUser::class); $codes = []; @@ -148,7 +148,7 @@ class BackupCodeStorageTest extends TestCase { $this->assertEquals($expected, $this->storage->getBackupCodesState($user)); } - public function testValidateCode() { + public function testValidateCode(): void { $user = $this->createMock(IUser::class); $code = new BackupCode(); $code->setUsed(0); @@ -174,7 +174,7 @@ class BackupCodeStorageTest extends TestCase { $this->assertEquals(1, $code->getUsed()); } - public function testValidateUsedCode() { + public function testValidateUsedCode(): void { $user = $this->createMock(IUser::class); $code = new BackupCode(); $code->setUsed('1'); @@ -195,7 +195,7 @@ class BackupCodeStorageTest extends TestCase { $this->assertFalse($this->storage->validateCode($user, 'CHALLENGE')); } - public function testValidateCodeWithWrongHash() { + public function testValidateCodeWithWrongHash(): void { $user = $this->createMock(IUser::class); $code = new BackupCode(); $code->setUsed(0); diff --git a/apps/updatenotification/l10n/gl.js b/apps/updatenotification/l10n/gl.js index e3d21c0f623..7dca1d01d22 100644 --- a/apps/updatenotification/l10n/gl.js +++ b/apps/updatenotification/l10n/gl.js @@ -17,7 +17,7 @@ OC.L10N.register( "What's new in {app} {version}" : "Novidades en {app} {version}", "Give feedback" : "Opinar", "Get started" : "Comezar", - "No changelog available" : "Non hai rexistro de cambios dispoñíbel", + "No changelog available" : "Non hai notas da versión dispoñíbeis", "Update" : "Actualizar", "The version you are running is not maintained anymore. Please make sure to update to a supported version as soon as possible." : "A versión que ten en execución xa non dispón de mantemento. Asegúrese de actualizar a unha versión asistida tecnicamente tan cedo como lle sexa posíbel.", "Apps missing compatible version" : "Aplicacións que carecen de versión compatíbel", @@ -43,7 +43,7 @@ OC.L10N.register( "The selected update channel does not support updates of the server." : "A canle de actualización seleccionada non admite actualizacións do servidor.", "A new version is available: <strong>{newVersionString}</strong>" : "Hai dispoñíbel unha versión nova:<strong>{newVersionString}</strong>", "Note that after a new release the update only shows up after the first minor release or later. We roll out new versions spread out over time and sometimes skip a version when issues are found. Learn more about updates and release channels at {link}" : "Teña en conta que após unha nova versión, a actualización só aparece após a primeira versión menor ou posterior. Publicamos novas versións espalladas ao longo do tempo e ás veces saltamos unha versión cando se atopan problemas. Máis información sobre actualizacións e canles de publicación en {link}", - "Checked on {lastCheckedDate} - Open changelog" : "Comprobado o {lastCheckedDate} - Abrir o rexistro de cambios", + "Checked on {lastCheckedDate} - Open changelog" : "Comprobado o {lastCheckedDate} - Abrir as notas da versión", "Checking apps for compatible versions" : "Comprobando as versións compatíbeis das aplicacións", "Please make sure your config.php does not set <samp>appstoreenabled</samp> to false." : "Asegúrese de que o seu config.php non ten estabelecido <samp>appstoreenabled</samp> como «false».", "Could not connect to the App Store or no updates have been returned at all. Search manually for updates or make sure your server has access to the internet and can connect to the App Store." : "Non foi posíbel conectar á Tenda de aplicacións ou non se devolveu ningunha actualización. Busque actualizacións manualmente ou asegúrese de que o seu servidor ten acceso a Internet e pode conectarse á Tenda de aplicacións.", @@ -55,7 +55,7 @@ OC.L10N.register( "Beta" : "Beta", "A pre-release version only for testing new features, not for production environments." : "Unha versión preliminar só para probar funcionalidades novas, non para contornos de produción", "_<strong>%n</strong> app has no compatible version for this Nextcloud version available._::_<strong>%n</strong> apps have no compatible version for this Nextcloud version available._" : ["<strong>%n</strong> aplicación non ten dispoñíbel unha versión compatíbel para esta versión de Nextcloud.","<strong>%n</strong> aplicacións non teñen dispoñíbel unha versión compatíbel para esta versión de Nextcloud."], - "Changelog for app {app}" : "Rexistro de cambios para a aplicación {app}", + "Changelog for app {app}" : "Notas da versión para a aplicación {app}", "What's new in {app} version {version}" : "Novidades en {app} versión {version}", "Update to %1$s is available." : "Está dispoñíbel unha actualización para %1$s.", "Displays update notifications for Nextcloud and provides the SSO for the updater." : "Amosa as notificacións de actualizacións para o Nexcloud e fornece o inicio de sesión único (SSO) para o actualizador.", diff --git a/apps/updatenotification/l10n/gl.json b/apps/updatenotification/l10n/gl.json index c4afb66d792..714f5f93dd8 100644 --- a/apps/updatenotification/l10n/gl.json +++ b/apps/updatenotification/l10n/gl.json @@ -15,7 +15,7 @@ "What's new in {app} {version}" : "Novidades en {app} {version}", "Give feedback" : "Opinar", "Get started" : "Comezar", - "No changelog available" : "Non hai rexistro de cambios dispoñíbel", + "No changelog available" : "Non hai notas da versión dispoñíbeis", "Update" : "Actualizar", "The version you are running is not maintained anymore. Please make sure to update to a supported version as soon as possible." : "A versión que ten en execución xa non dispón de mantemento. Asegúrese de actualizar a unha versión asistida tecnicamente tan cedo como lle sexa posíbel.", "Apps missing compatible version" : "Aplicacións que carecen de versión compatíbel", @@ -41,7 +41,7 @@ "The selected update channel does not support updates of the server." : "A canle de actualización seleccionada non admite actualizacións do servidor.", "A new version is available: <strong>{newVersionString}</strong>" : "Hai dispoñíbel unha versión nova:<strong>{newVersionString}</strong>", "Note that after a new release the update only shows up after the first minor release or later. We roll out new versions spread out over time and sometimes skip a version when issues are found. Learn more about updates and release channels at {link}" : "Teña en conta que após unha nova versión, a actualización só aparece após a primeira versión menor ou posterior. Publicamos novas versións espalladas ao longo do tempo e ás veces saltamos unha versión cando se atopan problemas. Máis información sobre actualizacións e canles de publicación en {link}", - "Checked on {lastCheckedDate} - Open changelog" : "Comprobado o {lastCheckedDate} - Abrir o rexistro de cambios", + "Checked on {lastCheckedDate} - Open changelog" : "Comprobado o {lastCheckedDate} - Abrir as notas da versión", "Checking apps for compatible versions" : "Comprobando as versións compatíbeis das aplicacións", "Please make sure your config.php does not set <samp>appstoreenabled</samp> to false." : "Asegúrese de que o seu config.php non ten estabelecido <samp>appstoreenabled</samp> como «false».", "Could not connect to the App Store or no updates have been returned at all. Search manually for updates or make sure your server has access to the internet and can connect to the App Store." : "Non foi posíbel conectar á Tenda de aplicacións ou non se devolveu ningunha actualización. Busque actualizacións manualmente ou asegúrese de que o seu servidor ten acceso a Internet e pode conectarse á Tenda de aplicacións.", @@ -53,7 +53,7 @@ "Beta" : "Beta", "A pre-release version only for testing new features, not for production environments." : "Unha versión preliminar só para probar funcionalidades novas, non para contornos de produción", "_<strong>%n</strong> app has no compatible version for this Nextcloud version available._::_<strong>%n</strong> apps have no compatible version for this Nextcloud version available._" : ["<strong>%n</strong> aplicación non ten dispoñíbel unha versión compatíbel para esta versión de Nextcloud.","<strong>%n</strong> aplicacións non teñen dispoñíbel unha versión compatíbel para esta versión de Nextcloud."], - "Changelog for app {app}" : "Rexistro de cambios para a aplicación {app}", + "Changelog for app {app}" : "Notas da versión para a aplicación {app}", "What's new in {app} version {version}" : "Novidades en {app} versión {version}", "Update to %1$s is available." : "Está dispoñíbel unha actualización para %1$s.", "Displays update notifications for Nextcloud and provides the SSO for the updater." : "Amosa as notificacións de actualizacións para o Nexcloud e fornece o inicio de sesión único (SSO) para o actualizador.", diff --git a/apps/updatenotification/tests/BackgroundJob/ResetTokenTest.php b/apps/updatenotification/tests/BackgroundJob/ResetTokenTest.php index b93efd3a275..1b0fe0cbc59 100644 --- a/apps/updatenotification/tests/BackgroundJob/ResetTokenTest.php +++ b/apps/updatenotification/tests/BackgroundJob/ResetTokenTest.php @@ -33,7 +33,7 @@ class ResetTokenTest extends TestCase { ); } - public function testRunWithNotExpiredToken() { + public function testRunWithNotExpiredToken(): void { $this->timeFactory ->expects($this->atLeastOnce()) ->method('getTime') @@ -54,7 +54,7 @@ class ResetTokenTest extends TestCase { static::invokePrivate($this->resetTokenBackgroundJob, 'run', [null]); } - public function testRunWithExpiredToken() { + public function testRunWithExpiredToken(): void { $this->timeFactory ->expects($this->once()) ->method('getTime') @@ -72,7 +72,7 @@ class ResetTokenTest extends TestCase { static::invokePrivate($this->resetTokenBackgroundJob, 'run', [null]); } - public function testRunWithExpiredTokenAndReadOnlyConfigFile() { + public function testRunWithExpiredTokenAndReadOnlyConfigFile(): void { $this->timeFactory ->expects($this->never()) ->method('getTime'); diff --git a/apps/updatenotification/tests/BackgroundJob/UpdateAvailableNotificationsTest.php b/apps/updatenotification/tests/BackgroundJob/UpdateAvailableNotificationsTest.php index ca058cedff7..dccccf1a940 100644 --- a/apps/updatenotification/tests/BackgroundJob/UpdateAvailableNotificationsTest.php +++ b/apps/updatenotification/tests/BackgroundJob/UpdateAvailableNotificationsTest.php @@ -80,7 +80,7 @@ class UpdateAvailableNotificationsTest extends TestCase { } } - public function testRun() { + public function testRun(): void { $job = $this->getJob([ 'checkCoreUpdate', 'checkAppUpdates', @@ -105,7 +105,7 @@ class UpdateAvailableNotificationsTest extends TestCase { self::invokePrivate($job, 'run', [null]); } - public function testRunNoInternet() { + public function testRunNoInternet(): void { $job = $this->getJob([ 'checkCoreUpdate', 'checkAppUpdates', @@ -160,7 +160,7 @@ class UpdateAvailableNotificationsTest extends TestCase { * @param null|string $readableVersion * @param null|int $errorDays */ - public function testCheckCoreUpdate(string $channel, $versionCheck, $version, $readableVersion, $errorDays) { + public function testCheckCoreUpdate(string $channel, $versionCheck, $version, $readableVersion, $errorDays): void { $job = $this->getJob([ 'getChannel', 'createNotifications', @@ -237,7 +237,7 @@ class UpdateAvailableNotificationsTest extends TestCase { * @param array $isUpdateAvailable * @param array $notifications */ - public function testCheckAppUpdates(array $apps, array $isUpdateAvailable, array $notifications) { + public function testCheckAppUpdates(array $apps, array $isUpdateAvailable, array $notifications): void { $job = $this->getJob([ 'isUpdateAvailable', 'createNotifications', @@ -277,7 +277,7 @@ class UpdateAvailableNotificationsTest extends TestCase { * @param string[]|null $users * @param array|null $userNotifications */ - public function testCreateNotifications(string $app, string $version, $lastNotification, $callDelete, $createNotification, $users, $userNotifications) { + public function testCreateNotifications(string $app, string $version, $lastNotification, $callDelete, $createNotification, $users, $userNotifications): void { $job = $this->getJob([ 'deleteOutdatedNotifications', 'getUsersToNotify', @@ -286,7 +286,7 @@ class UpdateAvailableNotificationsTest extends TestCase { $this->appConfig->expects($this->once()) ->method('getAppValueString') ->with($app, '') - ->willReturn($lastNotification ? $lastNotification : ''); + ->willReturn($lastNotification ?: ''); if ($lastNotification !== $version) { $this->appConfig->expects($this->once()) @@ -364,7 +364,7 @@ class UpdateAvailableNotificationsTest extends TestCase { * @param array $groupUsers * @param string[] $expected */ - public function testGetUsersToNotify(array $groups, array $groupUsers, array $expected) { + public function testGetUsersToNotify(array $groups, array $groupUsers, array $expected): void { $job = $this->getJob(); $this->appConfig->expects($this->once()) @@ -408,7 +408,7 @@ class UpdateAvailableNotificationsTest extends TestCase { * @param string $app * @param string $version */ - public function testDeleteOutdatedNotifications(string $app, string $version) { + public function testDeleteOutdatedNotifications(string $app, string $version): void { $notification = $this->createMock(INotification::class); $notification->expects($this->once()) ->method('setApp') diff --git a/apps/updatenotification/tests/Controller/AdminControllerTest.php b/apps/updatenotification/tests/Controller/AdminControllerTest.php index 74fcb4f8773..877a0276373 100644 --- a/apps/updatenotification/tests/Controller/AdminControllerTest.php +++ b/apps/updatenotification/tests/Controller/AdminControllerTest.php @@ -55,7 +55,7 @@ class AdminControllerTest extends TestCase { ); } - public function testCreateCredentials() { + public function testCreateCredentials(): void { $this->jobList ->expects($this->once()) ->method('add') diff --git a/apps/updatenotification/tests/Notification/NotifierTest.php b/apps/updatenotification/tests/Notification/NotifierTest.php index 7455966975a..1e53b8d4aea 100644 --- a/apps/updatenotification/tests/Notification/NotifierTest.php +++ b/apps/updatenotification/tests/Notification/NotifierTest.php @@ -90,7 +90,7 @@ class NotifierTest extends TestCase { * @param string $versionInstalled * @param bool $exception */ - public function testUpdateAlreadyInstalledCheck(string $versionNotification, string $versionInstalled, bool $exception) { + public function testUpdateAlreadyInstalledCheck(string $versionNotification, string $versionInstalled, bool $exception): void { $notifier = $this->getNotifier(); $notification = $this->createMock(INotification::class); diff --git a/apps/updatenotification/tests/Settings/AdminTest.php b/apps/updatenotification/tests/Settings/AdminTest.php index 80ad2ec7587..b39cb8fe127 100644 --- a/apps/updatenotification/tests/Settings/AdminTest.php +++ b/apps/updatenotification/tests/Settings/AdminTest.php @@ -80,7 +80,7 @@ class AdminTest extends TestCase { ); } - public function testGetFormWithUpdate() { + public function testGetFormWithUpdate(): void { $backend1 = $this->createMock(CountUsersBackend::class); $backend2 = $this->createMock(CountUsersBackend::class); $backend3 = $this->createMock(CountUsersBackend::class); @@ -206,7 +206,7 @@ class AdminTest extends TestCase { $this->assertEquals($expected, $this->admin->getForm()); } - public function testGetFormWithUpdateAndChangedUpdateServer() { + public function testGetFormWithUpdateAndChangedUpdateServer(): void { $backend1 = $this->createMock(CountUsersBackend::class); $backend2 = $this->createMock(CountUsersBackend::class); $backend3 = $this->createMock(CountUsersBackend::class); @@ -333,7 +333,7 @@ class AdminTest extends TestCase { $this->assertEquals($expected, $this->admin->getForm()); } - public function testGetFormWithUpdateAndCustomersUpdateServer() { + public function testGetFormWithUpdateAndCustomersUpdateServer(): void { $backend1 = $this->createMock(CountUsersBackend::class); $backend2 = $this->createMock(CountUsersBackend::class); $backend3 = $this->createMock(CountUsersBackend::class); @@ -461,11 +461,11 @@ class AdminTest extends TestCase { } - public function testGetSection() { + public function testGetSection(): void { $this->assertSame('overview', $this->admin->getSection()); } - public function testGetPriority() { + public function testGetPriority(): void { $this->assertSame(11, $this->admin->getPriority()); } @@ -527,7 +527,7 @@ class AdminTest extends TestCase { /** * @dataProvider changesProvider */ - public function testFilterChanges($changes, $userLang, $expectation) { + public function testFilterChanges($changes, $userLang, $expectation): void { $iterator = $this->createMock(ILanguageIterator::class); $iterator->expects($this->any()) ->method('current') diff --git a/apps/updatenotification/tests/UpdateCheckerTest.php b/apps/updatenotification/tests/UpdateCheckerTest.php index 54d756ddcb7..0497a992669 100644 --- a/apps/updatenotification/tests/UpdateCheckerTest.php +++ b/apps/updatenotification/tests/UpdateCheckerTest.php @@ -29,7 +29,7 @@ class UpdateCheckerTest extends TestCase { $this->updateChecker = new UpdateChecker($this->updater, $this->changesChecker); } - public function testGetUpdateStateWithUpdateAndInvalidLink() { + public function testGetUpdateStateWithUpdateAndInvalidLink(): void { $this->updater ->expects($this->once()) ->method('check') @@ -53,7 +53,7 @@ class UpdateCheckerTest extends TestCase { $this->assertSame($expected, $this->updateChecker->getUpdateState()); } - public function testGetUpdateStateWithUpdateAndValidLink() { + public function testGetUpdateStateWithUpdateAndValidLink(): void { $changes = [ 'changelog' => 'https://nextcloud.com/changelog/#123-0-0', 'whatsNew' => [ @@ -101,7 +101,7 @@ class UpdateCheckerTest extends TestCase { $this->assertSame($expected, $this->updateChecker->getUpdateState()); } - public function testGetUpdateStateWithoutUpdate() { + public function testGetUpdateStateWithoutUpdate(): void { $this->updater ->expects($this->once()) ->method('check') diff --git a/apps/user_ldap/ajax/clearMappings.php b/apps/user_ldap/ajax/clearMappings.php index 0616281b415..bd866769cc8 100644 --- a/apps/user_ldap/ajax/clearMappings.php +++ b/apps/user_ldap/ajax/clearMappings.php @@ -5,8 +5,13 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + use OCA\User_LDAP\Mapping\GroupMapping; use OCA\User_LDAP\Mapping\UserMapping; +use OCP\EventDispatcher\IEventDispatcher; +use OCP\Server; +use OCP\User\Events\BeforeUserIdUnassignedEvent; +use OCP\User\Events\UserIdUnassignedEvent; // Check user and app status \OC_JSON::checkAdminUser(); @@ -17,12 +22,16 @@ $subject = (string)$_POST['ldap_clear_mapping']; $mapping = null; try { if ($subject === 'user') { - $mapping = \OCP\Server::get(UserMapping::class); + $mapping = Server::get(UserMapping::class); + /** @var IEventDispatcher $dispatcher */ + $dispatcher = Server::get(IEventDispatcher::class); $result = $mapping->clearCb( - function ($uid) { + function (string $uid) use ($dispatcher): void { + $dispatcher->dispatchTyped(new BeforeUserIdUnassignedEvent($uid)); \OC::$server->getUserManager()->emit('\OC\User', 'preUnassignedUserId', [$uid]); }, - function ($uid) { + function (string $uid) use ($dispatcher): void { + $dispatcher->dispatchTyped(new UserIdUnassignedEvent($uid)); \OC::$server->getUserManager()->emit('\OC\User', 'postUnassignedUserId', [$uid]); } ); diff --git a/apps/user_ldap/l10n/es.js b/apps/user_ldap/l10n/es.js index f4204fb5aca..46b7c8c794c 100644 --- a/apps/user_ldap/l10n/es.js +++ b/apps/user_ldap/l10n/es.js @@ -31,7 +31,7 @@ OC.L10N.register( "Base DN could not be auto-detected, please revise credentials, host and port." : "Base DN no puede ser detectada automáticamente, por favor revise credenciales, host y puerto.", "Could not detect Base DN, please enter it manually." : "No se ha podido detectar Base DN, por favor introdúzcala manualmente.", "{nthServer}. Server" : "{nthServer}. servidor", - "No object found in the given Base DN. Please revise." : "No se encuentra ningún objeto en la Base DN dada. Por favor revisar.", + "No object found in the given Base DN. Please revise." : "No se encuentra ningún objeto en el Base DN proporcionado. Por favor revisar.", "More than 1,000 directory entries available." : "Más de 1.000 entradas de directorios disponibles.", "_{objectsFound} entry available within the provided Base DN_::_{objectsFound} entries available within the provided Base DN_" : ["{objectsFound} entrada disponible en la base DN proporcionada","{objectsFound} entradas disponibles en la base DN proporcionada","{objectsFound} entradas disponibles en la base DN proporcionada"], "An error occurred. Please check the Base DN, as well as connection settings and credentials." : "Un error ocurrió. Por favor revise la Base DN, también como la configuración de la conexión y credenciales.", diff --git a/apps/user_ldap/l10n/es.json b/apps/user_ldap/l10n/es.json index 0c96c953db0..17351635c6b 100644 --- a/apps/user_ldap/l10n/es.json +++ b/apps/user_ldap/l10n/es.json @@ -29,7 +29,7 @@ "Base DN could not be auto-detected, please revise credentials, host and port." : "Base DN no puede ser detectada automáticamente, por favor revise credenciales, host y puerto.", "Could not detect Base DN, please enter it manually." : "No se ha podido detectar Base DN, por favor introdúzcala manualmente.", "{nthServer}. Server" : "{nthServer}. servidor", - "No object found in the given Base DN. Please revise." : "No se encuentra ningún objeto en la Base DN dada. Por favor revisar.", + "No object found in the given Base DN. Please revise." : "No se encuentra ningún objeto en el Base DN proporcionado. Por favor revisar.", "More than 1,000 directory entries available." : "Más de 1.000 entradas de directorios disponibles.", "_{objectsFound} entry available within the provided Base DN_::_{objectsFound} entries available within the provided Base DN_" : ["{objectsFound} entrada disponible en la base DN proporcionada","{objectsFound} entradas disponibles en la base DN proporcionada","{objectsFound} entradas disponibles en la base DN proporcionada"], "An error occurred. Please check the Base DN, as well as connection settings and credentials." : "Un error ocurrió. Por favor revise la Base DN, también como la configuración de la conexión y credenciales.", diff --git a/apps/user_ldap/lib/Access.php b/apps/user_ldap/lib/Access.php index 864c85a8cf0..dab8db20c99 100644 --- a/apps/user_ldap/lib/Access.php +++ b/apps/user_ldap/lib/Access.php @@ -15,10 +15,12 @@ use OCA\User_LDAP\Exceptions\NoMoreResults; use OCA\User_LDAP\Mapping\AbstractMapping; use OCA\User_LDAP\User\Manager; use OCA\User_LDAP\User\OfflineUser; +use OCP\EventDispatcher\IEventDispatcher; use OCP\HintException; use OCP\IAppConfig; use OCP\IConfig; use OCP\IUserManager; +use OCP\User\Events\UserIdAssignedEvent; use Psr\Log\LoggerInterface; use function strlen; use function substr; @@ -42,6 +44,7 @@ class Access extends LDAPUtility { /** @var ?AbstractMapping */ protected $groupMapper; + private string $lastCookie = ''; public function __construct( @@ -53,15 +56,10 @@ class Access extends LDAPUtility { private IUserManager $ncUserManager, private LoggerInterface $logger, private IAppConfig $appConfig, + private IEventDispatcher $dispatcher, ) { parent::__construct($ldap); - $this->connection = $connection; - $this->userManager = $userManager; $this->userManager->setLdapAccess($this); - $this->helper = $helper; - $this->config = $config; - $this->ncUserManager = $ncUserManager; - $this->logger = $logger; } /** @@ -629,10 +627,13 @@ class Access extends LDAPUtility { bool $isUser ): bool { if ($mapper->map($fdn, $name, $uuid)) { - if ($this->ncUserManager instanceof PublicEmitter && $isUser) { + if ($isUser) { $this->cacheUserExists($name); - $this->ncUserManager->emit('\OC\User', 'assignedUserId', [$name]); - } elseif (!$isUser) { + $this->dispatcher->dispatchTyped(new UserIdAssignedEvent($name)); + if ($this->ncUserManager instanceof PublicEmitter) { + $this->ncUserManager->emit('\OC\User', 'assignedUserId', [$name]); + } + } else { $this->cacheGroupExists($name); } return true; diff --git a/apps/user_ldap/lib/AccessFactory.php b/apps/user_ldap/lib/AccessFactory.php index 28f88e3c4e9..c5c8ca17e41 100644 --- a/apps/user_ldap/lib/AccessFactory.php +++ b/apps/user_ldap/lib/AccessFactory.php @@ -6,6 +6,7 @@ namespace OCA\User_LDAP; use OCA\User_LDAP\User\Manager; +use OCP\EventDispatcher\IEventDispatcher; use OCP\IAppConfig; use OCP\IConfig; use OCP\IUserManager; @@ -21,12 +22,8 @@ class AccessFactory { private IAppConfig $appConfig, private IUserManager $ncUserManager, private LoggerInterface $logger, + private IEventDispatcher $dispatcher, ) { - $this->ldap = $ldap; - $this->helper = $helper; - $this->config = $config; - $this->ncUserManager = $ncUserManager; - $this->logger = $logger; } public function get(Connection $connection): Access { @@ -40,6 +37,7 @@ class AccessFactory { $this->ncUserManager, $this->logger, $this->appConfig, + $this->dispatcher, ); } } diff --git a/apps/user_ldap/lib/Jobs/Sync.php b/apps/user_ldap/lib/Jobs/Sync.php index b8b79218144..26888ae96ae 100644 --- a/apps/user_ldap/lib/Jobs/Sync.php +++ b/apps/user_ldap/lib/Jobs/Sync.php @@ -1,8 +1,10 @@ <?php + /** * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\User_LDAP\Jobs; use OC\ServerNotAvailableException; @@ -14,6 +16,7 @@ use OCA\User_LDAP\LDAP; use OCA\User_LDAP\Mapping\UserMapping; use OCP\AppFramework\Utility\ITimeFactory; use OCP\BackgroundJob\TimedJob; +use OCP\EventDispatcher\IEventDispatcher; use OCP\IAvatarManager; use OCP\IConfig; use OCP\IDBConnection; @@ -24,44 +27,38 @@ use Psr\Log\LoggerInterface; class Sync extends TimedJob { public const MAX_INTERVAL = 12 * 60 * 60; // 12h public const MIN_INTERVAL = 30 * 60; // 30min - /** @var Helper */ - protected $ldapHelper; - /** @var LDAP */ - protected $ldap; - /** @var UserMapping */ - protected $mapper; - /** @var IConfig */ - protected $config; - /** @var IAvatarManager */ - protected $avatarManager; - /** @var IDBConnection */ - protected $dbc; - /** @var IUserManager */ - protected $ncUserManager; - /** @var LoggerInterface */ - protected $logger; - /** @var IManager */ - protected $notificationManager; - /** @var ConnectionFactory */ - protected $connectionFactory; - /** @var AccessFactory */ - protected $accessFactory; - public function __construct(ITimeFactory $time) { - parent::__construct($time); + protected LDAP $ldap; + + public function __construct( + ITimeFactory $timeFactory, + private IEventDispatcher $dispatcher, + private IConfig $config, + private IDBConnection $dbc, + private IAvatarManager $avatarManager, + private IUserManager $ncUserManager, + private LoggerInterface $logger, + private IManager $notificationManager, + private UserMapping $mapper, + private Helper $ldapHelper, + private ConnectionFactory $connectionFactory, + private AccessFactory $accessFactory, + ) { + parent::__construct($timeFactory); $this->setInterval( - (int)\OC::$server->getConfig()->getAppValue( + (int)$this->config->getAppValue( 'user_ldap', 'background_sync_interval', (string)self::MIN_INTERVAL ) ); + $this->ldap = new LDAP($this->config->getSystemValueString('ldap_log_file')); } /** - * updates the interval + * Updates the interval * - * the idea is to adjust the interval depending on the amount of known users + * The idea is to adjust the interval depending on the amount of known users * and the attempt to update each user one day. At most it would run every * 30 minutes, and at least every 12 hours. */ @@ -79,9 +76,8 @@ class Sync extends TimedJob { /** * returns the smallest configured paging size - * @return int */ - protected function getMinPagingSize() { + protected function getMinPagingSize(): int { $configKeys = $this->config->getAppKeys('user_ldap'); $configKeys = array_filter($configKeys, function ($key) { return str_contains($key, 'ldap_paging_size'); @@ -98,8 +94,6 @@ class Sync extends TimedJob { * @param array $argument */ public function run($argument) { - $this->setArgument($argument); - $isBackgroundJobModeAjax = $this->config ->getAppValue('core', 'backgroundjobs_mode', 'ajax') === 'ajax'; if ($isBackgroundJobModeAjax) { @@ -134,10 +128,10 @@ class Sync extends TimedJob { } /** - * @param array $cycleData + * @param array{offset: int, prefix: string} $cycleData * @return bool whether more results are expected from the same configuration */ - public function runCycle($cycleData) { + public function runCycle(array $cycleData): bool { $connection = $this->connectionFactory->get($cycleData['prefix']); $access = $this->accessFactory->get($connection); $access->setUserMapper($this->mapper); @@ -162,24 +156,22 @@ class Sync extends TimedJob { } /** - * returns the info about the current cycle that should be run, if any, + * Returns the info about the current cycle that should be run, if any, * otherwise null - * - * @return array|null */ - public function getCycle() { + public function getCycle(): ?array { $prefixes = $this->ldapHelper->getServerConfigurationPrefixes(true); if (count($prefixes) === 0) { return null; } $cycleData = [ - 'prefix' => $this->config->getAppValue('user_ldap', 'background_sync_prefix', null), + 'prefix' => $this->config->getAppValue('user_ldap', 'background_sync_prefix', 'none'), 'offset' => (int)$this->config->getAppValue('user_ldap', 'background_sync_offset', '0'), ]; if ( - $cycleData['prefix'] !== null + $cycleData['prefix'] !== 'none' && in_array($cycleData['prefix'], $prefixes) ) { return $cycleData; @@ -191,21 +183,21 @@ class Sync extends TimedJob { /** * Save the provided cycle information in the DB * - * @param array $cycleData + * @param array{prefix: ?string, offset: int} $cycleData */ - public function setCycle(array $cycleData) { + public function setCycle(array $cycleData): void { $this->config->setAppValue('user_ldap', 'background_sync_prefix', $cycleData['prefix']); - $this->config->setAppValue('user_ldap', 'background_sync_offset', $cycleData['offset']); + $this->config->setAppValue('user_ldap', 'background_sync_offset', (string)$cycleData['offset']); } /** * returns data about the next cycle that should run, if any, otherwise * null. It also always goes for the next LDAP configuration! * - * @param array|null $cycleData the old cycle - * @return array|null + * @param ?array{prefix: string, offset: int} $cycleData the old cycle + * @return ?array{prefix: string, offset: int} */ - public function determineNextCycle(?array $cycleData = null) { + public function determineNextCycle(?array $cycleData = null): ?array { $prefixes = $this->ldapHelper->getServerConfigurationPrefixes(true); if (count($prefixes) === 0) { return null; @@ -225,13 +217,12 @@ class Sync extends TimedJob { } /** - * Checks whether the provided cycle should be run. Currently only the + * Checks whether the provided cycle should be run. Currently, only the * last configuration change goes into account (at least one hour). * - * @param $cycleData - * @return bool + * @param array{prefix: string} $cycleData */ - public function qualifiesToRun($cycleData) { + public function qualifiesToRun(array $cycleData): bool { $lastChange = (int)$this->config->getAppValue('user_ldap', $cycleData['prefix'] . '_lastChange', '0'); if ((time() - $lastChange) > 60 * 30) { return true; @@ -240,23 +231,20 @@ class Sync extends TimedJob { } /** - * increases the offset of the current cycle for the next run + * Increases the offset of the current cycle for the next run * - * @param $cycleData + * @param array{prefix: string, offset: int} $cycleData */ - protected function increaseOffset($cycleData) { + protected function increaseOffset(array $cycleData): void { $ldapConfig = new Configuration($cycleData['prefix']); $cycleData['offset'] += (int)$ldapConfig->ldapPagingSize; $this->setCycle($cycleData); } /** - * determines the next configuration prefix based on the last one (if any) - * - * @param string|null $lastPrefix - * @return string|null + * Determines the next configuration prefix based on the last one (if any) */ - protected function getNextPrefix($lastPrefix) { + protected function getNextPrefix(?string $lastPrefix): ?string { $prefixes = $this->ldapHelper->getServerConfigurationPrefixes(true); $noOfPrefixes = count($prefixes); if ($noOfPrefixes === 0) { @@ -276,73 +264,9 @@ class Sync extends TimedJob { } /** - * "fixes" DI + * Only used in tests */ - public function setArgument($argument) { - if (isset($argument['config'])) { - $this->config = $argument['config']; - } else { - $this->config = \OC::$server->getConfig(); - } - - if (isset($argument['helper'])) { - $this->ldapHelper = $argument['helper']; - } else { - $this->ldapHelper = new Helper($this->config, \OC::$server->getDatabaseConnection()); - } - - if (isset($argument['ldapWrapper'])) { - $this->ldap = $argument['ldapWrapper']; - } else { - $this->ldap = new LDAP($this->config->getSystemValueString('ldap_log_file')); - } - - if (isset($argument['avatarManager'])) { - $this->avatarManager = $argument['avatarManager']; - } else { - $this->avatarManager = \OC::$server->get(IAvatarManager::class); - } - - if (isset($argument['dbc'])) { - $this->dbc = $argument['dbc']; - } else { - $this->dbc = \OC::$server->getDatabaseConnection(); - } - - if (isset($argument['ncUserManager'])) { - $this->ncUserManager = $argument['ncUserManager']; - } else { - $this->ncUserManager = \OC::$server->getUserManager(); - } - - if (isset($argument['logger'])) { - $this->logger = $argument['logger']; - } else { - $this->logger = \OC::$server->get(LoggerInterface::class); - } - - if (isset($argument['notificationManager'])) { - $this->notificationManager = $argument['notificationManager']; - } else { - $this->notificationManager = \OC::$server->getNotificationManager(); - } - - if (isset($argument['mapper'])) { - $this->mapper = $argument['mapper']; - } else { - $this->mapper = \OCP\Server::get(UserMapping::class); - } - - if (isset($argument['connectionFactory'])) { - $this->connectionFactory = $argument['connectionFactory']; - } else { - $this->connectionFactory = new ConnectionFactory($this->ldap); - } - - if (isset($argument['accessFactory'])) { - $this->accessFactory = $argument['accessFactory']; - } else { - $this->accessFactory = \OCP\Server::get(AccessFactory::class); - } + public function overwritePropertiesForTest(LDAP $ldapWrapper): void { + $this->ldap = $ldapWrapper; } } diff --git a/apps/user_ldap/lib/LoginListener.php b/apps/user_ldap/lib/LoginListener.php index c417300b45e..f397f4694d2 100644 --- a/apps/user_ldap/lib/LoginListener.php +++ b/apps/user_ldap/lib/LoginListener.php @@ -42,7 +42,7 @@ class LoginListener implements IEventListener { public function onPostLogin(IUser $user): void { $this->logger->info( - __CLASS__ . ' - {user} postLogin', + self::class . ' - {user} postLogin', [ 'app' => 'user_ldap', 'user' => $user->getUID(), @@ -67,7 +67,7 @@ class LoginListener implements IEventListener { $groupObject = $this->groupManager->get($groupId); if ($groupObject === null) { $this->logger->error( - __CLASS__ . ' - group {group} could not be found (user {user})', + self::class . ' - group {group} could not be found (user {user})', [ 'app' => 'user_ldap', 'user' => $userId, @@ -81,7 +81,7 @@ class LoginListener implements IEventListener { } catch (Exception $e) { if ($e->getReason() !== Exception::REASON_UNIQUE_CONSTRAINT_VIOLATION) { $this->logger->error( - __CLASS__ . ' - group {group} membership failed to be added (user {user})', + self::class . ' - group {group} membership failed to be added (user {user})', [ 'app' => 'user_ldap', 'user' => $userId, @@ -96,7 +96,7 @@ class LoginListener implements IEventListener { $this->groupBackend->addRelationshipToCaches($userId, null, $groupId); $this->dispatcher->dispatchTyped(new UserAddedEvent($groupObject, $userObject)); $this->logger->info( - __CLASS__ . ' - {user} added to {group}', + self::class . ' - {user} added to {group}', [ 'app' => 'user_ldap', 'user' => $userId, @@ -110,7 +110,7 @@ class LoginListener implements IEventListener { } catch (Exception $e) { if ($e->getReason() !== Exception::REASON_DATABASE_OBJECT_NOT_FOUND) { $this->logger->error( - __CLASS__ . ' - group {group} membership failed to be removed (user {user})', + self::class . ' - group {group} membership failed to be removed (user {user})', [ 'app' => 'user_ldap', 'user' => $userId, @@ -125,7 +125,7 @@ class LoginListener implements IEventListener { $groupObject = $this->groupManager->get($groupId); if ($groupObject === null) { $this->logger->error( - __CLASS__ . ' - group {group} could not be found (user {user})', + self::class . ' - group {group} could not be found (user {user})', [ 'app' => 'user_ldap', 'user' => $userId, diff --git a/apps/user_ldap/lib/Service/UpdateGroupsService.php b/apps/user_ldap/lib/Service/UpdateGroupsService.php index 4c007f7201f..94f2a7fd4a1 100644 --- a/apps/user_ldap/lib/Service/UpdateGroupsService.php +++ b/apps/user_ldap/lib/Service/UpdateGroupsService.php @@ -90,7 +90,7 @@ class UpdateGroupsService { if ($e->getReason() !== Exception::REASON_DATABASE_OBJECT_NOT_FOUND) { /* If reason is not found something else removed the membership, that’s fine */ $this->logger->error( - __CLASS__ . ' - group {group} membership failed to be removed (user {user})', + self::class . ' - group {group} membership failed to be removed (user {user})', [ 'app' => 'user_ldap', 'user' => $removedUser, @@ -121,7 +121,7 @@ class UpdateGroupsService { if ($e->getReason() !== Exception::REASON_UNIQUE_CONSTRAINT_VIOLATION) { /* If reason is unique constraint something else added the membership, that’s fine */ $this->logger->error( - __CLASS__ . ' - group {group} membership failed to be added (user {user})', + self::class . ' - group {group} membership failed to be added (user {user})', [ 'app' => 'user_ldap', 'user' => $addedUser, @@ -167,7 +167,7 @@ class UpdateGroupsService { } catch (Exception $e) { if ($e->getReason() !== Exception::REASON_UNIQUE_CONSTRAINT_VIOLATION) { $this->logger->error( - __CLASS__ . ' - group {group} membership failed to be added (user {user})', + self::class . ' - group {group} membership failed to be added (user {user})', [ 'app' => 'user_ldap', 'user' => $user, diff --git a/apps/user_ldap/lib/SetupChecks/LdapConnection.php b/apps/user_ldap/lib/SetupChecks/LdapConnection.php index e0e9e6b63d0..a33dd10f063 100644 --- a/apps/user_ldap/lib/SetupChecks/LdapConnection.php +++ b/apps/user_ldap/lib/SetupChecks/LdapConnection.php @@ -58,7 +58,7 @@ class LdapConnection implements ISetupCheck { if (!empty($bindFailedConfigurations)) { $output .= $this->l10n->n( 'Binding failed for this LDAP configuration: %s', - 'Binding failed for these LDAP configurations: %s', + 'Binding failed for %n LDAP configurations: %s', count($bindFailedConfigurations), [implode(',', $bindFailedConfigurations)] )."\n"; @@ -66,7 +66,7 @@ class LdapConnection implements ISetupCheck { if (!empty($searchFailedConfigurations)) { $output .= $this->l10n->n( 'Searching failed for this LDAP configuration: %s', - 'Searching failed for these LDAP configurations: %s', + 'Searching failed for %n LDAP configurations: %s', count($searchFailedConfigurations), [implode(',', $searchFailedConfigurations)] )."\n"; @@ -74,7 +74,7 @@ class LdapConnection implements ISetupCheck { if (!empty($inactiveConfigurations)) { $output .= $this->l10n->n( 'There is an inactive LDAP configuration: %s', - 'There are inactive LDAP configurations: %s', + 'There are %n inactive LDAP configurations: %s', count($inactiveConfigurations), [implode(',', $inactiveConfigurations)] )."\n"; @@ -86,7 +86,7 @@ class LdapConnection implements ISetupCheck { } return SetupResult::success($this->l10n->n( 'Binding and searching works on the configured LDAP connection (%s)', - 'Binding and searching works on all of the configured LDAP connections (%s)', + 'Binding and searching works on all of the %n configured LDAP connections (%s)', count($availableConfigs), [implode(',', $availableConfigs)] )); diff --git a/apps/user_ldap/lib/User/User.php b/apps/user_ldap/lib/User/User.php index b500c72ca98..3423455e819 100644 --- a/apps/user_ldap/lib/User/User.php +++ b/apps/user_ldap/lib/User/User.php @@ -646,8 +646,7 @@ class User { try { $accountProperty = $account->getProperty($property); $currentValue = $accountProperty->getValue(); - $scope = ($accountProperty->getScope() ? $accountProperty->getScope() - : $defaultScopes[$property]); + $scope = ($accountProperty->getScope() ?: $defaultScopes[$property]); } catch (PropertyDoesNotExistException $e) { // thrown at getProperty $this->logger->error('property does not exist: '.$property .' for uid='.$this->uid.'', ['app' => 'user_ldap', 'exception' => $e]); diff --git a/apps/user_ldap/tests/AccessTest.php b/apps/user_ldap/tests/AccessTest.php index 62c508fdb09..79c0f3216a2 100644 --- a/apps/user_ldap/tests/AccessTest.php +++ b/apps/user_ldap/tests/AccessTest.php @@ -18,6 +18,7 @@ use OCA\User_LDAP\Mapping\UserMapping; use OCA\User_LDAP\User\Manager; use OCA\User_LDAP\User\OfflineUser; use OCA\User_LDAP\User\User; +use OCP\EventDispatcher\IEventDispatcher; use OCP\IAppConfig; use OCP\IAvatarManager; use OCP\IConfig; @@ -37,29 +38,31 @@ use Test\TestCase; * @package OCA\User_LDAP\Tests */ class AccessTest extends TestCase { - /** @var UserMapping|\PHPUnit\Framework\MockObject\MockObject */ + /** @var UserMapping|MockObject */ protected $userMapper; - /** @var IManager|\PHPUnit\Framework\MockObject\MockObject */ + /** @var IManager|MockObject */ protected $shareManager; - /** @var GroupMapping|\PHPUnit\Framework\MockObject\MockObject */ + /** @var GroupMapping|MockObject */ protected $groupMapper; - /** @var Connection|\PHPUnit\Framework\MockObject\MockObject */ + /** @var Connection|MockObject */ private $connection; - /** @var LDAP|\PHPUnit\Framework\MockObject\MockObject */ + /** @var LDAP|MockObject */ private $ldap; - /** @var Manager|\PHPUnit\Framework\MockObject\MockObject */ + /** @var Manager|MockObject */ private $userManager; - /** @var Helper|\PHPUnit\Framework\MockObject\MockObject */ + /** @var Helper|MockObject */ private $helper; - /** @var IConfig|\PHPUnit\Framework\MockObject\MockObject */ + /** @var IConfig|MockObject */ private $config; - /** @var IUserManager|\PHPUnit\Framework\MockObject\MockObject */ + /** @var IUserManager|MockObject */ private $ncUserManager; private LoggerInterface&MockObject $logger; private IAppConfig&MockObject $appConfig; + /** @var IEventDispatcher|MockObject */ + private $dispatcher; private Access $access; protected function setUp(): void { @@ -74,6 +77,7 @@ class AccessTest extends TestCase { $this->shareManager = $this->createMock(IManager::class); $this->logger = $this->createMock(LoggerInterface::class); $this->appConfig = $this->createMock(IAppConfig::class); + $this->dispatcher = $this->createMock(IEventDispatcher::class); $this->access = new Access( $this->ldap, @@ -84,7 +88,9 @@ class AccessTest extends TestCase { $this->ncUserManager, $this->logger, $this->appConfig, + $this->dispatcher, ); + $this->dispatcher->expects($this->any())->method('dispatchTyped'); $this->access->setUserMapper($this->userMapper); $this->access->setGroupMapper($this->groupMapper); } @@ -116,18 +122,18 @@ class AccessTest extends TestCase { return [$lw, $connector, $um, $helper]; } - public function testEscapeFilterPartValidChars() { + public function testEscapeFilterPartValidChars(): void { $input = 'okay'; $this->assertTrue($input === $this->access->escapeFilterPart($input)); } - public function testEscapeFilterPartEscapeWildcard() { + public function testEscapeFilterPartEscapeWildcard(): void { $input = '*'; $expected = '\\2a'; $this->assertTrue($expected === $this->access->escapeFilterPart($input)); } - public function testEscapeFilterPartEscapeWildcard2() { + public function testEscapeFilterPartEscapeWildcard2(): void { $input = 'foo*bar'; $expected = 'foo\\2abar'; $this->assertTrue($expected === $this->access->escapeFilterPart($input)); @@ -138,7 +144,7 @@ class AccessTest extends TestCase { * @param array $sidArray * @param $sidExpected */ - public function testConvertSID2StrSuccess(array $sidArray, $sidExpected) { + public function testConvertSID2StrSuccess(array $sidArray, $sidExpected): void { $sidBinary = implode('', $sidArray); $this->assertSame($sidExpected, $this->access->convertSID2Str($sidBinary)); } @@ -170,14 +176,14 @@ class AccessTest extends TestCase { ]; } - public function testConvertSID2StrInputError() { + public function testConvertSID2StrInputError(): void { $sidIllegal = 'foobar'; $sidExpected = ''; $this->assertSame($sidExpected, $this->access->convertSID2Str($sidIllegal)); } - public function testGetDomainDNFromDNSuccess() { + public function testGetDomainDNFromDNSuccess(): void { $inputDN = 'uid=zaphod,cn=foobar,dc=my,dc=server,dc=com'; $domainDN = 'dc=my,dc=server,dc=com'; @@ -189,7 +195,7 @@ class AccessTest extends TestCase { $this->assertSame($domainDN, $this->access->getDomainDNFromDN($inputDN)); } - public function testGetDomainDNFromDNError() { + public function testGetDomainDNFromDNError(): void { $inputDN = 'foobar'; $expected = ''; @@ -225,11 +231,11 @@ class AccessTest extends TestCase { * @dataProvider dnInputDataProvider * @param array $case */ - public function testStringResemblesDN($case) { + public function testStringResemblesDN($case): void { [$lw, $con, $um, $helper] = $this->getConnectorAndLdapMock(); - /** @var IConfig|\PHPUnit\Framework\MockObject\MockObject $config */ + /** @var IConfig|MockObject $config */ $config = $this->createMock(IConfig::class); - $access = new Access($lw, $con, $um, $helper, $config, $this->ncUserManager, $this->logger, $this->appConfig); + $access = new Access($lw, $con, $um, $helper, $config, $this->ncUserManager, $this->logger, $this->appConfig, $this->dispatcher); $lw->expects($this->exactly(1)) ->method('explodeDN') @@ -247,12 +253,12 @@ class AccessTest extends TestCase { * @dataProvider dnInputDataProvider * @param $case */ - public function testStringResemblesDNLDAPmod($case) { + public function testStringResemblesDNLDAPmod($case): void { [, $con, $um, $helper] = $this->getConnectorAndLdapMock(); - /** @var IConfig|\PHPUnit\Framework\MockObject\MockObject $config */ + /** @var IConfig|MockObject $config */ $config = $this->createMock(IConfig::class); $lw = new LDAP(); - $access = new Access($lw, $con, $um, $helper, $config, $this->ncUserManager, $this->logger, $this->appConfig); + $access = new Access($lw, $con, $um, $helper, $config, $this->ncUserManager, $this->logger, $this->appConfig, $this->dispatcher); if (!function_exists('ldap_explode_dn')) { $this->markTestSkipped('LDAP Module not available'); @@ -261,14 +267,14 @@ class AccessTest extends TestCase { $this->assertSame($case['expectedResult'], $access->stringResemblesDN($case['input'])); } - public function testCacheUserHome() { + public function testCacheUserHome(): void { $this->connection->expects($this->once()) ->method('writeToCache'); $this->access->cacheUserHome('foobar', '/foobars/path'); } - public function testBatchApplyUserAttributes() { + public function testBatchApplyUserAttributes(): void { $this->ldap->expects($this->any()) ->method('isResource') ->willReturn(true); @@ -282,7 +288,7 @@ class AccessTest extends TestCase { ->method('getAttributes') ->willReturn(['displayname' => ['bar', 'count' => 1]]); - /** @var UserMapping|\PHPUnit\Framework\MockObject\MockObject $mapperMock */ + /** @var UserMapping|MockObject $mapperMock */ $mapperMock = $this->createMock(UserMapping::class); $mapperMock->expects($this->any()) ->method('getNameByDN') @@ -326,8 +332,8 @@ class AccessTest extends TestCase { $this->access->batchApplyUserAttributes($data); } - public function testBatchApplyUserAttributesSkipped() { - /** @var UserMapping|\PHPUnit\Framework\MockObject\MockObject $mapperMock */ + public function testBatchApplyUserAttributesSkipped(): void { + /** @var UserMapping|MockObject $mapperMock */ $mapperMock = $this->createMock(UserMapping::class); $mapperMock->expects($this->any()) ->method('getNameByDN') @@ -367,8 +373,8 @@ class AccessTest extends TestCase { $this->access->batchApplyUserAttributes($data); } - public function testBatchApplyUserAttributesDontSkip() { - /** @var UserMapping|\PHPUnit\Framework\MockObject\MockObject $mapperMock */ + public function testBatchApplyUserAttributesDontSkip(): void { + /** @var UserMapping|MockObject $mapperMock */ $mapperMock = $this->createMock(UserMapping::class); $mapperMock->expects($this->any()) ->method('getNameByDN') @@ -422,9 +428,9 @@ class AccessTest extends TestCase { * @dataProvider dNAttributeProvider * @param $attribute */ - public function testSanitizeDN($attribute) { + public function testSanitizeDN($attribute): void { [$lw, $con, $um, $helper] = $this->getConnectorAndLdapMock(); - /** @var IConfig|\PHPUnit\Framework\MockObject\MockObject $config */ + /** @var IConfig|MockObject $config */ $config = $this->createMock(IConfig::class); $dnFromServer = 'cn=Mixed Cases,ou=Are Sufficient To,ou=Test,dc=example,dc=org'; @@ -438,13 +444,13 @@ class AccessTest extends TestCase { $attribute => ['count' => 1, $dnFromServer] ]); - $access = new Access($lw, $con, $um, $helper, $config, $this->ncUserManager, $this->logger, $this->appConfig); + $access = new Access($lw, $con, $um, $helper, $config, $this->ncUserManager, $this->logger, $this->appConfig, $this->dispatcher); $values = $access->readAttribute('uid=whoever,dc=example,dc=org', $attribute); $this->assertSame($values[0], strtolower($dnFromServer)); } - public function testSetPasswordWithDisabledChanges() { + public function testSetPasswordWithDisabledChanges(): void { $this->expectException(\Exception::class); $this->expectExceptionMessage('LDAP password changes are disabled'); @@ -456,7 +462,7 @@ class AccessTest extends TestCase { $this->access->setPassword('CN=foo', 'MyPassword'); } - public function testSetPasswordWithLdapNotAvailable() { + public function testSetPasswordWithLdapNotAvailable(): void { $this->connection ->method('__get') ->willReturn(true); @@ -475,7 +481,7 @@ class AccessTest extends TestCase { } - public function testSetPasswordWithRejectedChange() { + public function testSetPasswordWithRejectedChange(): void { $this->expectException(\OCP\HintException::class); $this->expectExceptionMessage('Password change rejected.'); @@ -497,7 +503,7 @@ class AccessTest extends TestCase { $this->access->setPassword('CN=foo', 'MyPassword'); } - public function testSetPassword() { + public function testSetPassword(): void { $this->connection ->method('__get') ->willReturn(true); @@ -559,7 +565,7 @@ class AccessTest extends TestCase { ->willReturnArgument(0); } - public function testSearchNoPagedSearch() { + public function testSearchNoPagedSearch(): void { // scenario: no pages search, 1 search base $filter = 'objectClass=nextcloudUser'; $base = 'ou=zombies,dc=foobar,dc=nextcloud,dc=com'; @@ -586,7 +592,7 @@ class AccessTest extends TestCase { $this->assertSame($expected, $result); } - public function testFetchListOfUsers() { + public function testFetchListOfUsers(): void { $filter = 'objectClass=nextcloudUser'; $base = 'ou=zombies,dc=foobar,dc=nextcloud,dc=com'; $attrs = ['dn', 'uid']; @@ -629,7 +635,7 @@ class AccessTest extends TestCase { $this->assertSame($expected, $list); } - public function testFetchListOfGroupsKnown() { + public function testFetchListOfGroupsKnown(): void { $filter = 'objectClass=nextcloudGroup'; $attributes = ['cn', 'gidNumber', 'dn']; $base = 'ou=SomeGroups,dc=my,dc=directory'; @@ -709,7 +715,7 @@ class AccessTest extends TestCase { * @param $name * @param $expected */ - public function testSanitizeUsername($name, $expected) { + public function testSanitizeUsername($name, $expected): void { if ($expected === null) { $this->expectException(\InvalidArgumentException::class); } @@ -720,12 +726,12 @@ class AccessTest extends TestCase { /** * @dataProvider groupIDCandidateProvider */ - public function testSanitizeGroupIDCandidate(string $name, string $expected) { + public function testSanitizeGroupIDCandidate(string $name, string $expected): void { $sanitizedName = $this->access->sanitizeGroupIDCandidate($name); $this->assertSame($expected, $sanitizedName); } - public function testUserStateUpdate() { + public function testUserStateUpdate(): void { $this->connection->expects($this->any()) ->method('__get') ->willReturnMap([ @@ -744,7 +750,7 @@ class AccessTest extends TestCase { ->with('detta') ->willReturnOnConsecutiveCalls($offlineUserMock, $regularUserMock); - /** @var UserMapping|\PHPUnit\Framework\MockObject\MockObject $mapperMock */ + /** @var UserMapping|MockObject $mapperMock */ $mapperMock = $this->createMock(UserMapping::class); $mapperMock->expects($this->any()) ->method('getNameByDN') diff --git a/apps/user_ldap/tests/ConfigurationTest.php b/apps/user_ldap/tests/ConfigurationTest.php index 96b08c4cf8a..cced8334bf5 100644 --- a/apps/user_ldap/tests/ConfigurationTest.php +++ b/apps/user_ldap/tests/ConfigurationTest.php @@ -89,7 +89,7 @@ class ConfigurationTest extends \Test\TestCase { /** * @dataProvider configurationDataProvider */ - public function testSetValue($key, $input, $expected) { + public function testSetValue($key, $input, $expected): void { $this->configuration->setConfiguration([$key => $input]); $this->assertSame($this->configuration->$key, $expected); } @@ -108,7 +108,7 @@ class ConfigurationTest extends \Test\TestCase { /** * @dataProvider avatarRuleValueProvider */ - public function testGetAvatarAttributes($setting, $expected) { + public function testGetAvatarAttributes($setting, $expected): void { $this->configuration->setConfiguration(['ldapUserAvatarRule' => $setting]); $this->assertSame($expected, $this->configuration->getAvatarAttributes()); } @@ -116,7 +116,7 @@ class ConfigurationTest extends \Test\TestCase { /** * @dataProvider avatarRuleValueProvider */ - public function testResolveRule($setting, $expected) { + public function testResolveRule($setting, $expected): void { $this->configuration->setConfiguration(['ldapUserAvatarRule' => $setting]); // so far the only thing that can get resolved :) $this->assertSame($expected, $this->configuration->resolveRule('avatar')); diff --git a/apps/user_ldap/tests/ConnectionTest.php b/apps/user_ldap/tests/ConnectionTest.php index dfa3cf6beda..bc65de39f94 100644 --- a/apps/user_ldap/tests/ConnectionTest.php +++ b/apps/user_ldap/tests/ConnectionTest.php @@ -39,7 +39,7 @@ class ConnectionTest extends \Test\TestCase { ->willReturn(true); } - public function testOriginalAgentUnchangedOnClone() { + public function testOriginalAgentUnchangedOnClone(): void { //background: upon login a bind is done with the user credentials //which is valid for the whole LDAP resource. It needs to be reset //to the agent's credentials @@ -66,7 +66,7 @@ class ConnectionTest extends \Test\TestCase { $this->assertSame($agentPawd, $agent['ldapAgentPassword']); } - public function testUseBackupServer() { + public function testUseBackupServer(): void { $mainHost = 'ldap://nixda.ldap'; $backupHost = 'ldap://fallback.ldap'; $config = [ @@ -125,7 +125,7 @@ class ConnectionTest extends \Test\TestCase { $this->connection->init(); } - public function testDontUseBackupServerOnFailedAuth() { + public function testDontUseBackupServerOnFailedAuth(): void { $mainHost = 'ldap://nixda.ldap'; $backupHost = 'ldap://fallback.ldap'; $config = [ @@ -172,7 +172,7 @@ class ConnectionTest extends \Test\TestCase { $this->connection->init(); } - public function testBindWithInvalidCredentials() { + public function testBindWithInvalidCredentials(): void { // background: Bind with invalid credentials should return false // and not throw a ServerNotAvailableException. @@ -217,7 +217,7 @@ class ConnectionTest extends \Test\TestCase { } } - public function testStartTlsNegotiationFailure() { + public function testStartTlsNegotiationFailure(): void { // background: If Start TLS negotiation fails, // a ServerNotAvailableException should be thrown. diff --git a/apps/user_ldap/tests/GroupLDAPPluginTest.php b/apps/user_ldap/tests/GroupLDAPPluginTest.php index 24cfb5d51e9..f67de32c2e9 100644 --- a/apps/user_ldap/tests/GroupLDAPPluginTest.php +++ b/apps/user_ldap/tests/GroupLDAPPluginTest.php @@ -17,7 +17,7 @@ class GroupLDAPPluginTest extends \Test\TestCase { return new GroupPluginManager(); } - public function testImplementsActions() { + public function testImplementsActions(): void { $pluginManager = $this->getGroupPluginManager(); $plugin = $this->getMockBuilder('OCA\User_LDAP\Tests\LDAPGroupPluginDummy') @@ -44,7 +44,7 @@ class GroupLDAPPluginTest extends \Test\TestCase { $this->assertTrue($pluginManager->implementsActions(GroupInterface::ADD_TO_GROUP)); } - public function testCreateGroup() { + public function testCreateGroup(): void { $pluginManager = $this->getGroupPluginManager(); $plugin = $this->getMockBuilder('OCA\User_LDAP\Tests\LDAPGroupPluginDummy') @@ -66,7 +66,7 @@ class GroupLDAPPluginTest extends \Test\TestCase { } - public function testCreateGroupNotRegistered() { + public function testCreateGroupNotRegistered(): void { $this->expectException(\Exception::class); $this->expectExceptionMessage('No plugin implements createGroup in this LDAP Backend.'); @@ -74,7 +74,7 @@ class GroupLDAPPluginTest extends \Test\TestCase { $pluginManager->createGroup('foo'); } - public function testDeleteGroup() { + public function testDeleteGroup(): void { $pluginManager = $this->getGroupPluginManager(); $plugin = $this->getMockBuilder('OCA\User_LDAP\Tests\LDAPGroupPluginDummy') @@ -96,7 +96,7 @@ class GroupLDAPPluginTest extends \Test\TestCase { } - public function testDeleteGroupNotRegistered() { + public function testDeleteGroupNotRegistered(): void { $this->expectException(\Exception::class); $this->expectExceptionMessage('No plugin implements deleteGroup in this LDAP Backend.'); @@ -104,7 +104,7 @@ class GroupLDAPPluginTest extends \Test\TestCase { $pluginManager->deleteGroup('foo'); } - public function testAddToGroup() { + public function testAddToGroup(): void { $pluginManager = $this->getGroupPluginManager(); $plugin = $this->getMockBuilder('OCA\User_LDAP\Tests\LDAPGroupPluginDummy') @@ -127,7 +127,7 @@ class GroupLDAPPluginTest extends \Test\TestCase { } - public function testAddToGroupNotRegistered() { + public function testAddToGroupNotRegistered(): void { $this->expectException(\Exception::class); $this->expectExceptionMessage('No plugin implements addToGroup in this LDAP Backend.'); @@ -135,7 +135,7 @@ class GroupLDAPPluginTest extends \Test\TestCase { $pluginManager->addToGroup('foo', 'bar'); } - public function testRemoveFromGroup() { + public function testRemoveFromGroup(): void { $pluginManager = $this->getGroupPluginManager(); $plugin = $this->getMockBuilder('OCA\User_LDAP\Tests\LDAPGroupPluginDummy') @@ -158,7 +158,7 @@ class GroupLDAPPluginTest extends \Test\TestCase { } - public function testRemoveFromGroupNotRegistered() { + public function testRemoveFromGroupNotRegistered(): void { $this->expectException(\Exception::class); $this->expectExceptionMessage('No plugin implements removeFromGroup in this LDAP Backend.'); @@ -166,7 +166,7 @@ class GroupLDAPPluginTest extends \Test\TestCase { $pluginManager->removeFromGroup('foo', 'bar'); } - public function testCountUsersInGroup() { + public function testCountUsersInGroup(): void { $pluginManager = $this->getGroupPluginManager(); $plugin = $this->getMockBuilder('OCA\User_LDAP\Tests\LDAPGroupPluginDummy') @@ -189,7 +189,7 @@ class GroupLDAPPluginTest extends \Test\TestCase { } - public function testCountUsersInGroupNotRegistered() { + public function testCountUsersInGroupNotRegistered(): void { $this->expectException(\Exception::class); $this->expectExceptionMessage('No plugin implements countUsersInGroup in this LDAP Backend.'); @@ -197,7 +197,7 @@ class GroupLDAPPluginTest extends \Test\TestCase { $pluginManager->countUsersInGroup('foo', 'bar'); } - public function testgetGroupDetails() { + public function testgetGroupDetails(): void { $pluginManager = $this->getGroupPluginManager(); $plugin = $this->getMockBuilder('OCA\User_LDAP\Tests\LDAPGroupPluginDummy') @@ -219,7 +219,7 @@ class GroupLDAPPluginTest extends \Test\TestCase { } - public function testgetGroupDetailsNotRegistered() { + public function testgetGroupDetailsNotRegistered(): void { $this->expectException(\Exception::class); $this->expectExceptionMessage('No plugin implements getGroupDetails in this LDAP Backend.'); diff --git a/apps/user_ldap/tests/Group_LDAPTest.php b/apps/user_ldap/tests/Group_LDAPTest.php index 06d64b99a4f..58006627410 100644 --- a/apps/user_ldap/tests/Group_LDAPTest.php +++ b/apps/user_ldap/tests/Group_LDAPTest.php @@ -51,7 +51,7 @@ class Group_LDAPTest extends TestCase { $this->groupBackend = new GroupLDAP($this->access, $this->pluginManager, $this->config, $this->ncUserManager); } - public function testCountEmptySearchString() { + public function testCountEmptySearchString(): void { $groupDN = 'cn=group,dc=foo,dc=bar'; $this->enableGroups(); @@ -130,7 +130,7 @@ class Group_LDAPTest extends TestCase { }); } - public function testCountWithSearchString() { + public function testCountWithSearchString(): void { $this->enableGroups(); $this->access->expects($this->any()) @@ -174,7 +174,7 @@ class Group_LDAPTest extends TestCase { $this->assertSame(2, $users); } - public function testCountUsersWithPlugin() { + public function testCountUsersWithPlugin(): void { /** @var GroupPluginManager|MockObject $pluginManager */ $this->pluginManager = $this->getMockBuilder(GroupPluginManager::class) ->setMethods(['implementsActions', 'countUsersInGroup']) @@ -194,7 +194,7 @@ class Group_LDAPTest extends TestCase { $this->assertEquals($this->groupBackend->countUsersInGroup('gid', 'search'), 42); } - public function testGidNumber2NameSuccess() { + public function testGidNumber2NameSuccess(): void { $this->enableGroups(); $userDN = 'cn=alice,cn=foo,dc=barfoo,dc=bar'; @@ -214,7 +214,7 @@ class Group_LDAPTest extends TestCase { $this->assertSame('MyGroup', $group); } - public function testGidNumberID2NameNoGroup() { + public function testGidNumberID2NameNoGroup(): void { $this->enableGroups(); $userDN = 'cn=alice,cn=foo,dc=barfoo,dc=bar'; @@ -232,7 +232,7 @@ class Group_LDAPTest extends TestCase { $this->assertSame(false, $group); } - public function testGidNumberID2NameNoName() { + public function testGidNumberID2NameNoName(): void { $this->enableGroups(); $userDN = 'cn=alice,cn=foo,dc=barfoo,dc=bar'; @@ -251,7 +251,7 @@ class Group_LDAPTest extends TestCase { $this->assertSame(false, $group); } - public function testGetEntryGidNumberValue() { + public function testGetEntryGidNumberValue(): void { $this->enableGroups(); $dn = 'cn=foobar,cn=foo,dc=barfoo,dc=bar'; @@ -268,7 +268,7 @@ class Group_LDAPTest extends TestCase { $this->assertSame('3117', $gid); } - public function testGetEntryGidNumberNoValue() { + public function testGetEntryGidNumberNoValue(): void { $this->enableGroups(); $dn = 'cn=foobar,cn=foo,dc=barfoo,dc=bar'; @@ -285,7 +285,7 @@ class Group_LDAPTest extends TestCase { $this->assertSame(false, $gid); } - public function testPrimaryGroupID2NameSuccessCache() { + public function testPrimaryGroupID2NameSuccessCache(): void { $this->enableGroups(); $userDN = 'cn=alice,cn=foo,dc=barfoo,dc=bar'; @@ -313,7 +313,7 @@ class Group_LDAPTest extends TestCase { $this->assertSame('MyGroup', $group); } - public function testPrimaryGroupID2NameSuccess() { + public function testPrimaryGroupID2NameSuccess(): void { $this->enableGroups(); $userDN = 'cn=alice,cn=foo,dc=barfoo,dc=bar'; @@ -338,7 +338,7 @@ class Group_LDAPTest extends TestCase { $this->assertSame('MyGroup', $group); } - public function testPrimaryGroupID2NameNoSID() { + public function testPrimaryGroupID2NameNoSID(): void { $this->enableGroups(); $userDN = 'cn=alice,cn=foo,dc=barfoo,dc=bar'; @@ -360,7 +360,7 @@ class Group_LDAPTest extends TestCase { $this->assertSame(false, $group); } - public function testPrimaryGroupID2NameNoGroup() { + public function testPrimaryGroupID2NameNoGroup(): void { $this->enableGroups(); $userDN = 'cn=alice,cn=foo,dc=barfoo,dc=bar'; @@ -383,7 +383,7 @@ class Group_LDAPTest extends TestCase { $this->assertSame(false, $group); } - public function testPrimaryGroupID2NameNoName() { + public function testPrimaryGroupID2NameNoName(): void { $this->enableGroups(); $userDN = 'cn=alice,cn=foo,dc=barfoo,dc=bar'; @@ -407,7 +407,7 @@ class Group_LDAPTest extends TestCase { $this->assertSame(false, $group); } - public function testGetEntryGroupIDValue() { + public function testGetEntryGroupIDValue(): void { //tests getEntryGroupID via getGroupPrimaryGroupID //which is basically identical to getUserPrimaryGroupIDs $this->enableGroups(); @@ -426,7 +426,7 @@ class Group_LDAPTest extends TestCase { $this->assertSame('3117', $gid); } - public function testGetEntryGroupIDNoValue() { + public function testGetEntryGroupIDNoValue(): void { //tests getEntryGroupID via getGroupPrimaryGroupID //which is basically identical to getUserPrimaryGroupIDs $this->enableGroups(); @@ -449,7 +449,7 @@ class Group_LDAPTest extends TestCase { * tests whether Group Backend behaves correctly when cache with uid and gid * is hit */ - public function testInGroupHitsUidGidCache() { + public function testInGroupHitsUidGidCache(): void { $this->enableGroups(); $uid = 'someUser'; @@ -486,7 +486,7 @@ class Group_LDAPTest extends TestCase { /** * @dataProvider groupWithMembersProvider */ - public function testInGroupMember(string $gid, string $groupDn, array $memberDNs) { + public function testInGroupMember(string $gid, string $groupDn, array $memberDNs): void { $uid = 'someUser'; $userDn = $memberDNs[0]; @@ -527,7 +527,7 @@ class Group_LDAPTest extends TestCase { /** * @dataProvider groupWithMembersProvider */ - public function testInGroupMemberNot(string $gid, string $groupDn, array $memberDNs) { + public function testInGroupMemberNot(string $gid, string $groupDn, array $memberDNs): void { $uid = 'unelatedUser'; $userDn = 'uid=unrelatedUser,ou=unrelatedTeam,ou=unrelatedDepartment,dc=someDomain,dc=someTld'; @@ -568,7 +568,7 @@ class Group_LDAPTest extends TestCase { /** * @dataProvider groupWithMembersProvider */ - public function testInGroupMemberUid(string $gid, string $groupDn, array $memberDNs) { + public function testInGroupMemberUid(string $gid, string $groupDn, array $memberDNs): void { $memberUids = []; $userRecords = []; foreach ($memberDNs as $dn) { @@ -625,7 +625,7 @@ class Group_LDAPTest extends TestCase { $this->assertTrue($this->groupBackend->inGroup($uid, $gid)); } - public function testGetGroupsWithOffset() { + public function testGetGroupsWithOffset(): void { $this->enableGroups(); $this->access->expects($this->once()) @@ -642,7 +642,7 @@ class Group_LDAPTest extends TestCase { * tests that a user listing is complete, if all its members have the group * as their primary. */ - public function testUsersInGroupPrimaryMembersOnly() { + public function testUsersInGroupPrimaryMembersOnly(): void { $this->enableGroups(); $this->access->connection->expects($this->any()) @@ -685,7 +685,7 @@ class Group_LDAPTest extends TestCase { * tests that a user listing is complete, if all its members have the group * as their primary. */ - public function testUsersInGroupPrimaryAndUnixMembers() { + public function testUsersInGroupPrimaryAndUnixMembers(): void { $this->enableGroups(); $this->access->connection->expects($this->any()) @@ -726,7 +726,7 @@ class Group_LDAPTest extends TestCase { * tests that a user counting is complete, if all its members have the group * as their primary. */ - public function testCountUsersInGroupPrimaryMembersOnly() { + public function testCountUsersInGroupPrimaryMembersOnly(): void { $this->enableGroups(); $this->access->connection->expects($this->any()) @@ -761,7 +761,7 @@ class Group_LDAPTest extends TestCase { $this->assertSame(4, $users); } - public function testGetUserGroupsMemberOf() { + public function testGetUserGroupsMemberOf(): void { $this->enableGroups(); $dn = 'cn=userX,dc=foobar'; @@ -797,7 +797,7 @@ class Group_LDAPTest extends TestCase { $this->assertSame(2, count($groups)); } - public function testGetUserGroupsMemberOfDisabled() { + public function testGetUserGroupsMemberOfDisabled(): void { $this->access->connection->expects($this->any()) ->method('__get') ->willReturnCallback(function ($name) { @@ -856,7 +856,7 @@ class Group_LDAPTest extends TestCase { $this->groupBackend->getUserGroups('userX'); } - public function testGetUserGroupsOfflineUser() { + public function testGetUserGroupsOfflineUser(): void { $this->enableGroups(); $offlineUser = $this->createMock(OfflineUser::class); @@ -882,7 +882,7 @@ class Group_LDAPTest extends TestCase { * regression tests against a case where a json object was stored instead of expected list * @see https://github.com/nextcloud/server/issues/42374 */ - public function testGetUserGroupsOfflineUserUnexpectedJson() { + public function testGetUserGroupsOfflineUserUnexpectedJson(): void { $this->enableGroups(); $offlineUser = $this->createMock(OfflineUser::class); @@ -905,7 +905,7 @@ class Group_LDAPTest extends TestCase { $this->assertTrue(in_array('groupF', $returnedGroups)); } - public function testGetUserGroupsUnrecognizedOfflineUser() { + public function testGetUserGroupsUnrecognizedOfflineUser(): void { $this->enableGroups(); $dn = 'cn=userX,dc=foobar'; @@ -958,7 +958,7 @@ class Group_LDAPTest extends TestCase { /** * @dataProvider nestedGroupsProvider */ - public function testGetGroupsByMember(bool $nestedGroups) { + public function testGetGroupsByMember(bool $nestedGroups): void { $groupFilter = '(&(objectclass=nextcloudGroup)(nextcloudEnabled=TRUE))'; $this->access->connection->expects($this->any()) ->method('__get') @@ -1072,7 +1072,7 @@ class Group_LDAPTest extends TestCase { $this->assertEquals($expectedGroupsNames, $groupsAgain); } - public function testCreateGroupWithPlugin() { + public function testCreateGroupWithPlugin(): void { $this->pluginManager = $this->getMockBuilder(GroupPluginManager::class) ->setMethods(['implementsActions', 'createGroup']) ->getMock(); @@ -1092,7 +1092,7 @@ class Group_LDAPTest extends TestCase { } - public function testCreateGroupFailing() { + public function testCreateGroupFailing(): void { $this->expectException(\Exception::class); $this->pluginManager = $this->getMockBuilder(GroupPluginManager::class) @@ -1108,7 +1108,7 @@ class Group_LDAPTest extends TestCase { $this->groupBackend->createGroup('gid'); } - public function testDeleteGroupWithPlugin() { + public function testDeleteGroupWithPlugin(): void { $this->pluginManager = $this->getMockBuilder(GroupPluginManager::class) ->setMethods(['implementsActions', 'deleteGroup']) ->getMock(); @@ -1137,7 +1137,7 @@ class Group_LDAPTest extends TestCase { } - public function testDeleteGroupFailing() { + public function testDeleteGroupFailing(): void { $this->expectException(\Exception::class); $this->pluginManager = $this->getMockBuilder(GroupPluginManager::class) @@ -1153,7 +1153,7 @@ class Group_LDAPTest extends TestCase { $this->groupBackend->deleteGroup('gid'); } - public function testAddToGroupWithPlugin() { + public function testAddToGroupWithPlugin(): void { $this->pluginManager = $this->getMockBuilder(GroupPluginManager::class) ->setMethods(['implementsActions', 'addToGroup']) ->getMock(); @@ -1173,7 +1173,7 @@ class Group_LDAPTest extends TestCase { } - public function testAddToGroupFailing() { + public function testAddToGroupFailing(): void { $this->expectException(\Exception::class); $this->pluginManager = $this->getMockBuilder(GroupPluginManager::class) @@ -1189,7 +1189,7 @@ class Group_LDAPTest extends TestCase { $this->groupBackend->addToGroup('uid', 'gid'); } - public function testRemoveFromGroupWithPlugin() { + public function testRemoveFromGroupWithPlugin(): void { $this->pluginManager = $this->getMockBuilder(GroupPluginManager::class) ->setMethods(['implementsActions', 'removeFromGroup']) ->getMock(); @@ -1209,7 +1209,7 @@ class Group_LDAPTest extends TestCase { } - public function testRemoveFromGroupFailing() { + public function testRemoveFromGroupFailing(): void { $this->expectException(\Exception::class); $this->pluginManager = $this->getMockBuilder(GroupPluginManager::class) @@ -1225,7 +1225,7 @@ class Group_LDAPTest extends TestCase { $this->groupBackend->removeFromGroup('uid', 'gid'); } - public function testGetGroupDetailsWithPlugin() { + public function testGetGroupDetailsWithPlugin(): void { /** @var GroupPluginManager|MockObject $pluginManager */ $this->pluginManager = $this->getMockBuilder(GroupPluginManager::class) ->setMethods(['implementsActions', 'getGroupDetails']) @@ -1245,7 +1245,7 @@ class Group_LDAPTest extends TestCase { $this->assertEquals($this->groupBackend->getGroupDetails('gid'), 'result'); } - public function testGetGroupDetailsFailing() { + public function testGetGroupDetailsFailing(): void { $this->expectException(\Exception::class); $this->pluginManager = $this->getMockBuilder(GroupPluginManager::class) @@ -1333,7 +1333,7 @@ class Group_LDAPTest extends TestCase { * @param string[] $expectedMembers * @dataProvider groupMemberProvider */ - public function testGroupMembers(array $expectedResult, ?array $groupsInfo = null) { + public function testGroupMembers(array $expectedResult, ?array $groupsInfo = null): void { $this->access->expects($this->any()) ->method('readAttribute') ->willReturnCallback(function ($group) use ($groupsInfo) { @@ -1372,7 +1372,7 @@ class Group_LDAPTest extends TestCase { /** * @dataProvider displayNameProvider */ - public function testGetDisplayName(string $expected, $ldapResult) { + public function testGetDisplayName(string $expected, $ldapResult): void { $gid = 'graphic_novelists'; $this->access->expects($this->atLeastOnce()) diff --git a/apps/user_ldap/tests/HelperTest.php b/apps/user_ldap/tests/HelperTest.php index bbb3956f918..38c6a639340 100644 --- a/apps/user_ldap/tests/HelperTest.php +++ b/apps/user_ldap/tests/HelperTest.php @@ -26,7 +26,7 @@ class HelperTest extends \Test\TestCase { $this->helper = new Helper($this->config, \OC::$server->getDatabaseConnection()); } - public function testGetServerConfigurationPrefixes() { + public function testGetServerConfigurationPrefixes(): void { $this->config->method('getAppKeys') ->with($this->equalTo('user_ldap')) ->willReturn([ @@ -40,7 +40,7 @@ class HelperTest extends \Test\TestCase { $this->assertEquals(['', 's1'], $result); } - public function testGetServerConfigurationPrefixesActive() { + public function testGetServerConfigurationPrefixesActive(): void { $this->config->method('getAppKeys') ->with($this->equalTo('user_ldap')) ->willReturn([ @@ -65,7 +65,7 @@ class HelperTest extends \Test\TestCase { $this->assertEquals(['s1'], $result); } - public function testGetServerConfigurationHost() { + public function testGetServerConfigurationHost(): void { $this->config->method('getAppKeys') ->with($this->equalTo('user_ldap')) ->willReturn([ diff --git a/apps/user_ldap/tests/Jobs/CleanUpTest.php b/apps/user_ldap/tests/Jobs/CleanUpTest.php index 05d202f82df..582b6fba5d7 100644 --- a/apps/user_ldap/tests/Jobs/CleanUpTest.php +++ b/apps/user_ldap/tests/Jobs/CleanUpTest.php @@ -43,7 +43,7 @@ class CleanUpTest extends TestCase { /** * clean up job must not run when there are disabled configurations */ - public function test_runNotAllowedByDisabledConfigurations() { + public function test_runNotAllowedByDisabledConfigurations(): void { $this->mocks['helper']->expects($this->once()) ->method('haveDisabledConfigurations') ->willReturn(true); @@ -59,7 +59,7 @@ class CleanUpTest extends TestCase { * clean up job must not run when LDAP Helper is broken i.e. * returning unexpected results */ - public function test_runNotAllowedByBrokenHelper() { + public function test_runNotAllowedByBrokenHelper(): void { $this->mocks['helper']->expects($this->once()) ->method('haveDisabledConfigurations') ->will($this->throwException(new Exception())); @@ -74,7 +74,7 @@ class CleanUpTest extends TestCase { /** * clean up job must not run when it is not enabled */ - public function test_runNotAllowedBySysConfig() { + public function test_runNotAllowedBySysConfig(): void { $this->mocks['helper']->expects($this->once()) ->method('haveDisabledConfigurations') ->willReturn(false); @@ -90,7 +90,7 @@ class CleanUpTest extends TestCase { /** * clean up job is allowed to run */ - public function test_runIsAllowed() { + public function test_runIsAllowed(): void { $this->mocks['helper']->expects($this->once()) ->method('haveDisabledConfigurations') ->willReturn(false); @@ -106,7 +106,7 @@ class CleanUpTest extends TestCase { /** * check whether offset will be reset when it needs to */ - public function test_OffsetResetIsNecessary() { + public function test_OffsetResetIsNecessary(): void { $result = $this->bgJob->isOffsetResetNecessary($this->bgJob->getChunkSize() - 1); $this->assertSame(true, $result); } @@ -114,7 +114,7 @@ class CleanUpTest extends TestCase { /** * make sure offset is not reset when it is not due */ - public function test_OffsetResetIsNotNecessary() { + public function test_OffsetResetIsNotNecessary(): void { $result = $this->bgJob->isOffsetResetNecessary($this->bgJob->getChunkSize()); $this->assertSame(false, $result); } diff --git a/apps/user_ldap/tests/Jobs/SyncTest.php b/apps/user_ldap/tests/Jobs/SyncTest.php index 0f5f045ac7f..8277e7d48a9 100644 --- a/apps/user_ldap/tests/Jobs/SyncTest.php +++ b/apps/user_ldap/tests/Jobs/SyncTest.php @@ -15,39 +15,42 @@ use OCA\User_LDAP\LDAP; use OCA\User_LDAP\Mapping\UserMapping; use OCA\User_LDAP\User\Manager; use OCP\AppFramework\Utility\ITimeFactory; +use OCP\EventDispatcher\IEventDispatcher; use OCP\IAvatarManager; use OCP\IConfig; use OCP\IDBConnection; use OCP\IUserManager; use OCP\Notification\IManager; +use OCP\Server; +use PHPUnit\Framework\MockObject\MockObject; +use Psr\Log\LoggerInterface; use Test\TestCase; class SyncTest extends TestCase { /** @var array */ protected $arguments; - /** @var Helper|\PHPUnit\Framework\MockObject\MockObject */ + /** @var Helper|MockObject */ protected $helper; - /** @var LDAP|\PHPUnit\Framework\MockObject\MockObject */ + /** @var LDAP|MockObject */ protected $ldapWrapper; - /** @var Manager|\PHPUnit\Framework\MockObject\MockObject */ + /** @var Manager|MockObject */ protected $userManager; - /** @var UserMapping|\PHPUnit\Framework\MockObject\MockObject */ + /** @var UserMapping|MockObject */ protected $mapper; - /** @var Sync */ - protected $sync; - /** @var IConfig|\PHPUnit\Framework\MockObject\MockObject */ + protected Sync $sync; + /** @var IConfig|MockObject */ protected $config; - /** @var IAvatarManager|\PHPUnit\Framework\MockObject\MockObject */ + /** @var IAvatarManager|MockObject */ protected $avatarManager; - /** @var IDBConnection|\PHPUnit\Framework\MockObject\MockObject */ + /** @var IDBConnection|MockObject */ protected $dbc; - /** @var IUserManager|\PHPUnit\Framework\MockObject\MockObject */ + /** @var IUserManager|MockObject */ protected $ncUserManager; - /** @var IManager|\PHPUnit\Framework\MockObject\MockObject */ + /** @var IManager|MockObject */ protected $notificationManager; - /** @var ConnectionFactory|\PHPUnit\Framework\MockObject\MockObject */ + /** @var ConnectionFactory|MockObject */ protected $connectionFactory; - /** @var AccessFactory|\PHPUnit\Framework\MockObject\MockObject */ + /** @var AccessFactory|MockObject */ protected $accessFactory; protected function setUp(): void { @@ -65,23 +68,25 @@ class SyncTest extends TestCase { $this->connectionFactory = $this->createMock(ConnectionFactory::class); $this->accessFactory = $this->createMock(AccessFactory::class); - $this->arguments = [ - 'helper' => $this->helper, - 'ldapWrapper' => $this->ldapWrapper, - 'mapper' => $this->mapper, - 'config' => $this->config, - 'avatarManager' => $this->avatarManager, - 'dbc' => $this->dbc, - 'ncUserManager' => $this->ncUserManager, - 'notificationManager' => $this->notificationManager, - 'connectionFactory' => $this->connectionFactory, - 'accessFactory' => $this->accessFactory, - ]; - - $this->sync = new Sync($this->createMock(ITimeFactory::class)); + $this->sync = new Sync( + Server::get(ITimeFactory::class), + Server::get(IEventDispatcher::class), + $this->config, + $this->dbc, + $this->avatarManager, + $this->ncUserManager, + Server::get(LoggerInterface::class), + $this->notificationManager, + $this->mapper, + $this->helper, + $this->connectionFactory, + $this->accessFactory, + ); + + $this->sync->overwritePropertiesForTest($this->ldapWrapper); } - public function intervalDataProvider() { + public function intervalDataProvider(): array { return [ [ 0, 1000, 750 @@ -104,7 +109,7 @@ class SyncTest extends TestCase { /** * @dataProvider intervalDataProvider */ - public function testUpdateInterval($userCount, $pagingSize1, $pagingSize2) { + public function testUpdateInterval(int $userCount, int $pagingSize1, int $pagingSize2): void { $this->config->expects($this->once()) ->method('setAppValue') ->with('user_ldap', 'background_sync_interval', $this->anything()) @@ -147,7 +152,7 @@ class SyncTest extends TestCase { /** * @dataProvider moreResultsProvider */ - public function testMoreResults($pagingSize, $results, $expected) { + public function testMoreResults($pagingSize, $results, $expected): void { $connection = $this->createMock(Connection::class); $this->connectionFactory->expects($this->any()) ->method('get') @@ -161,7 +166,7 @@ class SyncTest extends TestCase { return null; }); - /** @var Access|\PHPUnit\Framework\MockObject\MockObject $access */ + /** @var Access|MockObject $access */ $access = $this->createMock(Access::class); $this->accessFactory->expects($this->any()) ->method('get') @@ -202,7 +207,7 @@ class SyncTest extends TestCase { /** * @dataProvider cycleDataProvider */ - public function testDetermineNextCycle($cycleData, $prefixes, $expectedCycle) { + public function testDetermineNextCycle($cycleData, $prefixes, $expectedCycle): void { $this->helper->expects($this->any()) ->method('getServerConfigurationPrefixes') ->with(true) @@ -231,7 +236,7 @@ class SyncTest extends TestCase { } } - public function testQualifiesToRun() { + public function testQualifiesToRun(): void { $cycleData = ['prefix' => 's01']; $this->config->expects($this->exactly(2)) @@ -243,7 +248,7 @@ class SyncTest extends TestCase { $this->assertFalse($this->sync->qualifiesToRun($cycleData)); } - public function runDataProvider() { + public function runDataProvider(): array { return [ #0 - one LDAP server, reset [[ @@ -278,7 +283,7 @@ class SyncTest extends TestCase { /** * @dataProvider runDataProvider */ - public function testRun($runData) { + public function testRun($runData): void { $this->config->expects($this->any()) ->method('getAppValue') ->willReturnCallback(function ($app, $key, $default) use ($runData) { @@ -335,7 +340,7 @@ class SyncTest extends TestCase { return null; }); - /** @var Access|\PHPUnit\Framework\MockObject\MockObject $access */ + /** @var Access|MockObject $access */ $access = $this->createMock(Access::class); $this->accessFactory->expects($this->any()) ->method('get') diff --git a/apps/user_ldap/tests/LDAPProviderTest.php b/apps/user_ldap/tests/LDAPProviderTest.php index d240b6d65c5..514cc137954 100644 --- a/apps/user_ldap/tests/LDAPProviderTest.php +++ b/apps/user_ldap/tests/LDAPProviderTest.php @@ -87,7 +87,7 @@ class LDAPProviderTest extends \Test\TestCase { } - public function testGetUserDNUserIDNotFound() { + public function testGetUserDNUserIDNotFound(): void { $this->expectException(\Exception::class); $this->expectExceptionMessage('User id not found in LDAP'); @@ -103,7 +103,7 @@ class LDAPProviderTest extends \Test\TestCase { $ldapProvider->getUserDN('nonexisting_user'); } - public function testGetUserDN() { + public function testGetUserDN(): void { $userBackend = $this->getMockBuilder('OCA\User_LDAP\User_LDAP') ->setMethods(['userExists', 'getLDAPAccess', 'username2dn']) ->disableOriginalConstructor() @@ -126,7 +126,7 @@ class LDAPProviderTest extends \Test\TestCase { } - public function testGetGroupDNGroupIDNotFound() { + public function testGetGroupDNGroupIDNotFound(): void { $this->expectException(\Exception::class); $this->expectExceptionMessage('Group id not found in LDAP'); @@ -147,7 +147,7 @@ class LDAPProviderTest extends \Test\TestCase { $ldapProvider->getGroupDN('nonexisting_group'); } - public function testGetGroupDN() { + public function testGetGroupDN(): void { $userBackend = $this->getMockBuilder('OCA\User_LDAP\User_LDAP') ->setMethods(['userExists', 'getLDAPAccess', 'username2dn']) ->disableOriginalConstructor() @@ -175,7 +175,7 @@ class LDAPProviderTest extends \Test\TestCase { $ldapProvider->getGroupDN('existing_group')); } - public function testGetUserName() { + public function testGetUserName(): void { $userBackend = $this->getMockBuilder('OCA\User_LDAP\User_LDAP') ->setMethods(['dn2UserName']) ->disableOriginalConstructor() @@ -191,7 +191,7 @@ class LDAPProviderTest extends \Test\TestCase { $ldapProvider->getUserName('cn=existing_user,ou=Are Sufficient To,ou=Test,dc=example,dc=org')); } - public function testDNasBaseParameter() { + public function testDNasBaseParameter(): void { $userBackend = $this->getMockBuilder('OCA\User_LDAP\User_LDAP') ->setMethods([]) ->disableOriginalConstructor() @@ -207,7 +207,7 @@ class LDAPProviderTest extends \Test\TestCase { $ldapProvider->DNasBaseParameter('cn=existing_user,ou=Are Sufficient To,ou=Test,dc=example,dc=org')); } - public function testSanitizeDN() { + public function testSanitizeDN(): void { $userBackend = $this->getMockBuilder('OCA\User_LDAP\User_LDAP') ->setMethods([]) ->disableOriginalConstructor() @@ -224,7 +224,7 @@ class LDAPProviderTest extends \Test\TestCase { } - public function testGetLDAPConnectionUserIDNotFound() { + public function testGetLDAPConnectionUserIDNotFound(): void { $this->expectException(\Exception::class); $this->expectExceptionMessage('User id not found in LDAP'); @@ -240,7 +240,7 @@ class LDAPProviderTest extends \Test\TestCase { $ldapProvider->getLDAPConnection('nonexisting_user'); } - public function testGetLDAPConnection() { + public function testGetLDAPConnection(): void { $userBackend = $this->getMockBuilder('OCA\User_LDAP\User_LDAP') ->setMethods(['userExists', 'getNewLDAPConnection']) ->disableOriginalConstructor() @@ -260,7 +260,7 @@ class LDAPProviderTest extends \Test\TestCase { } - public function testGetGroupLDAPConnectionGroupIDNotFound() { + public function testGetGroupLDAPConnectionGroupIDNotFound(): void { $this->expectException(\Exception::class); $this->expectExceptionMessage('Group id not found in LDAP'); @@ -281,7 +281,7 @@ class LDAPProviderTest extends \Test\TestCase { $ldapProvider->getGroupLDAPConnection('nonexisting_group'); } - public function testGetGroupLDAPConnection() { + public function testGetGroupLDAPConnection(): void { $userBackend = $this->getMockBuilder('OCA\User_LDAP\User_LDAP') ->disableOriginalConstructor() ->getMock(); @@ -307,7 +307,7 @@ class LDAPProviderTest extends \Test\TestCase { } - public function testGetLDAPBaseUsersUserIDNotFound() { + public function testGetLDAPBaseUsersUserIDNotFound(): void { $this->expectException(\Exception::class); $this->expectExceptionMessage('User id not found in LDAP'); @@ -323,7 +323,7 @@ class LDAPProviderTest extends \Test\TestCase { $ldapProvider->getLDAPBaseUsers('nonexisting_user'); } - public function testGetLDAPBaseUsers() { + public function testGetLDAPBaseUsers(): void { $bases = [ 'ou=users,ou=foobar,dc=example,dc=org', 'ou=users,ou=barfoo,dc=example,dc=org', @@ -370,7 +370,7 @@ class LDAPProviderTest extends \Test\TestCase { } - public function testGetLDAPBaseGroupsUserIDNotFound() { + public function testGetLDAPBaseGroupsUserIDNotFound(): void { $this->expectException(\Exception::class); $this->expectExceptionMessage('User id not found in LDAP'); @@ -386,7 +386,7 @@ class LDAPProviderTest extends \Test\TestCase { $ldapProvider->getLDAPBaseGroups('nonexisting_user'); } - public function testGetLDAPBaseGroups() { + public function testGetLDAPBaseGroups(): void { $bases = [ 'ou=groupd,ou=foobar,dc=example,dc=org', 'ou=groups,ou=barfoo,dc=example,dc=org', @@ -426,7 +426,7 @@ class LDAPProviderTest extends \Test\TestCase { } - public function testClearCacheUserIDNotFound() { + public function testClearCacheUserIDNotFound(): void { $this->expectException(\Exception::class); $this->expectExceptionMessage('User id not found in LDAP'); @@ -442,7 +442,7 @@ class LDAPProviderTest extends \Test\TestCase { $ldapProvider->clearCache('nonexisting_user'); } - public function testClearCache() { + public function testClearCache(): void { $userBackend = $this->getMockBuilder('OCA\User_LDAP\User_LDAP') ->setMethods(['userExists', 'getLDAPAccess', 'getConnection', 'clearCache']) ->disableOriginalConstructor() @@ -465,7 +465,7 @@ class LDAPProviderTest extends \Test\TestCase { } - public function testClearGroupCacheGroupIDNotFound() { + public function testClearGroupCacheGroupIDNotFound(): void { $this->expectException(\Exception::class); $this->expectExceptionMessage('Group id not found in LDAP'); @@ -484,7 +484,7 @@ class LDAPProviderTest extends \Test\TestCase { $ldapProvider->clearGroupCache('nonexisting_group'); } - public function testClearGroupCache() { + public function testClearGroupCache(): void { $userBackend = $this->getMockBuilder('OCA\User_LDAP\User_LDAP') ->disableOriginalConstructor() ->getMock(); @@ -509,7 +509,7 @@ class LDAPProviderTest extends \Test\TestCase { $this->addToAssertionCount(1); } - public function testDnExists() { + public function testDnExists(): void { $userBackend = $this->getMockBuilder('OCA\User_LDAP\User_LDAP') ->setMethods(['dn2UserName']) ->disableOriginalConstructor() @@ -524,7 +524,7 @@ class LDAPProviderTest extends \Test\TestCase { $this->assertTrue($ldapProvider->dnExists('cn=existing_user,ou=Are Sufficient To,ou=Test,dc=example,dc=org')); } - public function testFlagRecord() { + public function testFlagRecord(): void { $userBackend = $this->getMockBuilder('OCA\User_LDAP\User_LDAP') ->setMethods([]) ->disableOriginalConstructor() @@ -537,7 +537,7 @@ class LDAPProviderTest extends \Test\TestCase { $this->addToAssertionCount(1); } - public function testUnflagRecord() { + public function testUnflagRecord(): void { $userBackend = $this->getMockBuilder('OCA\User_LDAP\User_LDAP') ->setMethods([]) ->disableOriginalConstructor() @@ -551,7 +551,7 @@ class LDAPProviderTest extends \Test\TestCase { } - public function testGetLDAPDisplayNameFieldUserIDNotFound() { + public function testGetLDAPDisplayNameFieldUserIDNotFound(): void { $this->expectException(\Exception::class); $this->expectExceptionMessage('User id not found in LDAP'); @@ -567,7 +567,7 @@ class LDAPProviderTest extends \Test\TestCase { $ldapProvider->getLDAPDisplayNameField('nonexisting_user'); } - public function testGetLDAPDisplayNameField() { + public function testGetLDAPDisplayNameField(): void { $userBackend = $this->getMockBuilder('OCA\User_LDAP\User_LDAP') ->setMethods(['userExists', 'getLDAPAccess', 'getConnection', 'getConfiguration']) ->disableOriginalConstructor() @@ -589,7 +589,7 @@ class LDAPProviderTest extends \Test\TestCase { } - public function testGetLDAPEmailFieldUserIDNotFound() { + public function testGetLDAPEmailFieldUserIDNotFound(): void { $this->expectException(\Exception::class); $this->expectExceptionMessage('User id not found in LDAP'); @@ -605,7 +605,7 @@ class LDAPProviderTest extends \Test\TestCase { $ldapProvider->getLDAPEmailField('nonexisting_user'); } - public function testGetLDAPEmailField() { + public function testGetLDAPEmailField(): void { $userBackend = $this->getMockBuilder('OCA\User_LDAP\User_LDAP') ->setMethods(['userExists', 'getLDAPAccess', 'getConnection', 'getConfiguration']) ->disableOriginalConstructor() @@ -627,7 +627,7 @@ class LDAPProviderTest extends \Test\TestCase { } - public function testGetLDAPGroupMemberAssocUserIDNotFound() { + public function testGetLDAPGroupMemberAssocUserIDNotFound(): void { $this->expectException(\Exception::class); $this->expectExceptionMessage('Group id not found in LDAP'); @@ -648,7 +648,7 @@ class LDAPProviderTest extends \Test\TestCase { $ldapProvider->getLDAPGroupMemberAssoc('nonexisting_group'); } - public function testgetLDAPGroupMemberAssoc() { + public function testgetLDAPGroupMemberAssoc(): void { $userBackend = $this->getMockBuilder('OCA\User_LDAP\User_LDAP') ->disableOriginalConstructor() ->getMock(); @@ -674,7 +674,7 @@ class LDAPProviderTest extends \Test\TestCase { $this->assertEquals('assoc_type', $ldapProvider->getLDAPGroupMemberAssoc('existing_group')); } - public function testGetMultiValueUserAttributeUserNotFound() { + public function testGetMultiValueUserAttributeUserNotFound(): void { $this->expectException(\Exception::class); $this->expectExceptionMessage('User id not found in LDAP'); @@ -690,7 +690,7 @@ class LDAPProviderTest extends \Test\TestCase { $ldapProvider->getMultiValueUserAttribute('admin', 'mailAlias'); } - public function testGetMultiValueUserAttributeCacheHit() { + public function testGetMultiValueUserAttributeCacheHit(): void { $connection = $this->createMock(Connection::class); $connection->expects(self::once()) ->method('getFromCache') @@ -715,7 +715,7 @@ class LDAPProviderTest extends \Test\TestCase { $ldapProvider->getMultiValueUserAttribute('admin', 'mailAlias'); } - public function testGetMultiValueUserAttributeLdapError() { + public function testGetMultiValueUserAttributeLdapError(): void { $connection = $this->createMock(Connection::class); $connection->expects(self::once()) ->method('getFromCache') @@ -752,7 +752,7 @@ class LDAPProviderTest extends \Test\TestCase { self::assertCount(0, $values); } - public function testGetMultiValueUserAttribute() { + public function testGetMultiValueUserAttribute(): void { $connection = $this->createMock(Connection::class); $connection->expects(self::once()) ->method('getFromCache') @@ -789,7 +789,7 @@ class LDAPProviderTest extends \Test\TestCase { self::assertCount(2, $values); } - public function testGetUserAttributeLdapError() { + public function testGetUserAttributeLdapError(): void { $connection = $this->createMock(Connection::class); $connection->expects(self::once()) ->method('getFromCache') @@ -826,7 +826,7 @@ class LDAPProviderTest extends \Test\TestCase { self::assertNull($value); } - public function testGetUserAttribute() { + public function testGetUserAttribute(): void { $connection = $this->createMock(Connection::class); $connection->expects(self::once()) ->method('getFromCache') diff --git a/apps/user_ldap/tests/LDAPTest.php b/apps/user_ldap/tests/LDAPTest.php index 51ed0c2b462..b7349d11b36 100644 --- a/apps/user_ldap/tests/LDAPTest.php +++ b/apps/user_ldap/tests/LDAPTest.php @@ -36,7 +36,7 @@ class LDAPTest extends TestCase { * @param bool $passThrough * @dataProvider errorProvider */ - public function testSearchWithErrorHandler(string $errorMessage, bool $passThrough) { + public function testSearchWithErrorHandler(string $errorMessage, bool $passThrough): void { $wasErrorHandlerCalled = false; $errorHandler = function ($number, $message, $file, $line) use (&$wasErrorHandlerCalled) { $wasErrorHandlerCalled = true; @@ -59,7 +59,7 @@ class LDAPTest extends TestCase { restore_error_handler(); } - public function testModReplace() { + public function testModReplace(): void { $link = $this->createMock(LDAP::class); $userDN = 'CN=user'; $password = 'MyPassword'; diff --git a/apps/user_ldap/tests/Mapping/AbstractMappingTest.php b/apps/user_ldap/tests/Mapping/AbstractMappingTest.php index 478e5ea0395..e0a31c119ba 100644 --- a/apps/user_ldap/tests/Mapping/AbstractMappingTest.php +++ b/apps/user_ldap/tests/Mapping/AbstractMappingTest.php @@ -16,7 +16,7 @@ abstract class AbstractMappingTest extends \Test\TestCase { /** * kiss test on isColNameValid */ - public function testIsColNameValid() { + public function testIsColNameValid(): void { $dbMock = $this->createMock(IDBConnection::class); $mapper = $this->getMapper($dbMock); @@ -84,7 +84,7 @@ abstract class AbstractMappingTest extends \Test\TestCase { * tests map() method with input that should result in not-mapping. * Hint: successful mapping is tested inherently with mapEntries(). */ - public function testMap() { + public function testMap(): void { [$mapper, $data] = $this->initTest(); // test that mapping will not happen when it shall not @@ -104,7 +104,7 @@ abstract class AbstractMappingTest extends \Test\TestCase { * tests unmap() for both successful and unsuccessful removing of * mapping entries */ - public function testUnmap() { + public function testUnmap(): void { [$mapper, $data] = $this->initTest(); foreach ($data as $entry) { @@ -124,7 +124,7 @@ abstract class AbstractMappingTest extends \Test\TestCase { * tests getDNByName(), getNameByDN() and getNameByUUID() for successful * and unsuccessful requests. */ - public function testGetMethods() { + public function testGetMethods(): void { [$mapper, $data] = $this->initTest(); foreach ($data as $entry) { @@ -152,7 +152,7 @@ abstract class AbstractMappingTest extends \Test\TestCase { /** * tests getNamesBySearch() for successful and unsuccessful requests. */ - public function testSearch() { + public function testSearch(): void { [$mapper,] = $this->initTest(); $names = $mapper->getNamesBySearch('oo', '%', '%'); @@ -168,7 +168,7 @@ abstract class AbstractMappingTest extends \Test\TestCase { /** * tests setDNbyUUID() for successful and unsuccessful update. */ - public function testSetDNMethod() { + public function testSetDNMethod(): void { [$mapper, $data] = $this->initTest(); $newDN = 'uid=modified,dc=example,dc=org'; @@ -187,7 +187,7 @@ abstract class AbstractMappingTest extends \Test\TestCase { /** * tests setUUIDbyDN() for successful and unsuccessful update. */ - public function testSetUUIDMethod() { + public function testSetUUIDMethod(): void { /** @var AbstractMapping $mapper */ [$mapper, $data] = $this->initTest(); @@ -207,7 +207,7 @@ abstract class AbstractMappingTest extends \Test\TestCase { /** * tests clear() for successful update. */ - public function testClear() { + public function testClear(): void { [$mapper, $data] = $this->initTest(); $done = $mapper->clear(); @@ -221,7 +221,7 @@ abstract class AbstractMappingTest extends \Test\TestCase { /** * tests clear() for successful update. */ - public function testClearCb() { + public function testClearCb(): void { [$mapper, $data] = $this->initTest(); $callbackCalls = 0; @@ -244,7 +244,7 @@ abstract class AbstractMappingTest extends \Test\TestCase { /** * tests getList() method */ - public function testList() { + public function testList(): void { [$mapper, $data] = $this->initTest(); // get all entries without specifying offset or limit @@ -265,7 +265,7 @@ abstract class AbstractMappingTest extends \Test\TestCase { $this->assertSame(1, count($results)); } - public function testGetListOfIdsByDn() { + public function testGetListOfIdsByDn(): void { /** @var AbstractMapping $mapper */ [$mapper,] = $this->initTest(); diff --git a/apps/user_ldap/tests/Migration/AbstractUUIDFixTest.php b/apps/user_ldap/tests/Migration/AbstractUUIDFixTest.php index 9d433cf4937..f8abcaeb482 100644 --- a/apps/user_ldap/tests/Migration/AbstractUUIDFixTest.php +++ b/apps/user_ldap/tests/Migration/AbstractUUIDFixTest.php @@ -48,7 +48,7 @@ abstract class AbstractUUIDFixTest extends TestCase { ->willReturn($this->access); } - public function testRunSingleRecord() { + public function testRunSingleRecord(): void { $args = [ 'records' => [ 0 => [ @@ -72,7 +72,7 @@ abstract class AbstractUUIDFixTest extends TestCase { $this->job->run($args); } - public function testRunValidRecord() { + public function testRunValidRecord(): void { $correctUUID = '4355-AED3-9D73-03AD'; $args = [ 'records' => [ @@ -95,7 +95,7 @@ abstract class AbstractUUIDFixTest extends TestCase { $this->job->run($args); } - public function testRunRemovedRecord() { + public function testRunRemovedRecord(): void { $args = [ 'records' => [ 0 => [ @@ -117,7 +117,7 @@ abstract class AbstractUUIDFixTest extends TestCase { $this->job->run($args); } - public function testRunManyRecords() { + public function testRunManyRecords(): void { $args = [ 'records' => [ 0 => [ diff --git a/apps/user_ldap/tests/Migration/UUIDFixInsertTest.php b/apps/user_ldap/tests/Migration/UUIDFixInsertTest.php index 78d119bf566..f31da43c584 100644 --- a/apps/user_ldap/tests/Migration/UUIDFixInsertTest.php +++ b/apps/user_ldap/tests/Migration/UUIDFixInsertTest.php @@ -44,7 +44,7 @@ class UUIDFixInsertTest extends TestCase { ); } - public function testGetName() { + public function testGetName(): void { $this->assertSame('Insert UUIDFix background job for user and group in batches', $this->job->getName()); } @@ -97,7 +97,7 @@ class UUIDFixInsertTest extends TestCase { /** * @dataProvider recordProvider */ - public function testRun($userBatches, $groupBatches) { + public function testRun($userBatches, $groupBatches): void { $this->config->expects($this->once()) ->method('getAppValue') ->with('user_ldap', 'installed_version', '1.2.1') @@ -124,7 +124,7 @@ class UUIDFixInsertTest extends TestCase { /** * @dataProvider recordProviderTooLongAndNone */ - public function testRunWithManyAndNone($userBatches, $groupBatches) { + public function testRunWithManyAndNone($userBatches, $groupBatches): void { $this->config->expects($this->once()) ->method('getAppValue') ->with('user_ldap', 'installed_version', '1.2.1') @@ -155,7 +155,7 @@ class UUIDFixInsertTest extends TestCase { $this->job->run($out); } - public function testDonNotRun() { + public function testDonNotRun(): void { $this->config->expects($this->once()) ->method('getAppValue') ->with('user_ldap', 'installed_version', '1.2.1') diff --git a/apps/user_ldap/tests/Settings/AdminTest.php b/apps/user_ldap/tests/Settings/AdminTest.php index 7906a07c3e9..e06563d1856 100644 --- a/apps/user_ldap/tests/Settings/AdminTest.php +++ b/apps/user_ldap/tests/Settings/AdminTest.php @@ -34,7 +34,7 @@ class AdminTest extends TestCase { /** * @UseDB */ - public function testGetForm() { + public function testGetForm(): void { $prefixes = ['s01']; $hosts = ['s01' => '']; @@ -59,11 +59,11 @@ class AdminTest extends TestCase { $this->assertEquals($expected, $this->admin->getForm()); } - public function testGetSection() { + public function testGetSection(): void { $this->assertSame('ldap', $this->admin->getSection()); } - public function testGetPriority() { + public function testGetPriority(): void { $this->assertSame(5, $this->admin->getPriority()); } } diff --git a/apps/user_ldap/tests/Settings/SectionTest.php b/apps/user_ldap/tests/Settings/SectionTest.php index 5fe5476f1c3..722581713d1 100644 --- a/apps/user_ldap/tests/Settings/SectionTest.php +++ b/apps/user_ldap/tests/Settings/SectionTest.php @@ -29,11 +29,11 @@ class SectionTest extends TestCase { ); } - public function testGetID() { + public function testGetID(): void { $this->assertSame('ldap', $this->section->getID()); } - public function testGetName() { + public function testGetName(): void { $this->l ->expects($this->once()) ->method('t') @@ -43,11 +43,11 @@ class SectionTest extends TestCase { $this->assertSame('LDAP/AD integration', $this->section->getName()); } - public function testGetPriority() { + public function testGetPriority(): void { $this->assertSame(25, $this->section->getPriority()); } - public function testGetIcon() { + public function testGetIcon(): void { $this->url->expects($this->once()) ->method('imagePath') ->with('user_ldap', 'app-dark.svg') diff --git a/apps/user_ldap/tests/User/DeletedUsersIndexTest.php b/apps/user_ldap/tests/User/DeletedUsersIndexTest.php index 32fa5bc38bf..0e77f5023d5 100644 --- a/apps/user_ldap/tests/User/DeletedUsersIndexTest.php +++ b/apps/user_ldap/tests/User/DeletedUsersIndexTest.php @@ -54,7 +54,7 @@ class DeletedUsersIndexTest extends \Test\TestCase { parent::tearDown(); } - public function testMarkAndFetchUser() { + public function testMarkAndFetchUser(): void { $uids = [ 'cef3775c-71d2-48eb-8984-39a4051b0b95', '8c4bbb40-33ed-42d0-9b14-85b0ab76c1cc', @@ -82,7 +82,7 @@ class DeletedUsersIndexTest extends \Test\TestCase { $this->assertEmpty($uids); } - public function testUnmarkUser() { + public function testUnmarkUser(): void { $uids = [ '22a162c7-a9ee-487c-9f33-0563795583fb', '1fb4e0da-4a75-47f3-8fa7-becc7e35c9c5', diff --git a/apps/user_ldap/tests/User/ManagerTest.php b/apps/user_ldap/tests/User/ManagerTest.php index 597a2e69a0a..449f159ec4d 100644 --- a/apps/user_ldap/tests/User/ManagerTest.php +++ b/apps/user_ldap/tests/User/ManagerTest.php @@ -114,7 +114,7 @@ class ManagerTest extends \Test\TestCase { /** * @dataProvider dnProvider */ - public function testGetByDNExisting(string $inputDN) { + public function testGetByDNExisting(string $inputDN): void { $uid = '563418fc-423b-1033-8d1c-ad5f418ee02e'; $this->access->expects($this->once()) @@ -139,7 +139,7 @@ class ManagerTest extends \Test\TestCase { $this->assertInstanceOf(User::class, $user); } - public function testGetByDNNotExisting() { + public function testGetByDNNotExisting(): void { $inputDN = 'cn=gone,dc=foobar,dc=bar'; $this->access->expects($this->once()) @@ -161,7 +161,7 @@ class ManagerTest extends \Test\TestCase { $this->assertNull($user); } - public function testGetByUidExisting() { + public function testGetByUidExisting(): void { $dn = 'cn=foo,dc=foobar,dc=bar'; $uid = '563418fc-423b-1033-8d1c-ad5f418ee02e'; @@ -187,7 +187,7 @@ class ManagerTest extends \Test\TestCase { $this->assertInstanceOf(User::class, $user); } - public function testGetByUidNotExisting() { + public function testGetByUidNotExisting(): void { $uid = 'gone'; $this->access->expects($this->never()) @@ -213,7 +213,7 @@ class ManagerTest extends \Test\TestCase { /** * @dataProvider attributeRequestProvider */ - public function testGetAttributes($minimal) { + public function testGetAttributes($minimal): void { $this->connection->setConfiguration([ 'ldapEmailAttribute' => 'MAIL', 'ldapUserAvatarRule' => 'default', diff --git a/apps/user_ldap/tests/User/OfflineUserTest.php b/apps/user_ldap/tests/User/OfflineUserTest.php index 8ac0e617d80..e53bfca7f47 100644 --- a/apps/user_ldap/tests/User/OfflineUserTest.php +++ b/apps/user_ldap/tests/User/OfflineUserTest.php @@ -55,7 +55,7 @@ class OfflineUserTest extends TestCase { /** * @dataProvider shareOwnerProvider */ - public function testHasActiveShares(array $existingShareTypes, bool $expected) { + public function testHasActiveShares(array $existingShareTypes, bool $expected): void { $shareMock = $this->createMock(IShare::class); $this->shareManager->expects($this->atLeastOnce()) diff --git a/apps/user_ldap/tests/User/UserTest.php b/apps/user_ldap/tests/User/UserTest.php index 1d4aeb619b6..aca4e2434e2 100644 --- a/apps/user_ldap/tests/User/UserTest.php +++ b/apps/user_ldap/tests/User/UserTest.php @@ -87,12 +87,12 @@ class UserTest extends \Test\TestCase { ); } - public function testGetDNandUsername() { + public function testGetDNandUsername(): void { $this->assertSame($this->dn, $this->user->getDN()); $this->assertSame($this->uid, $this->user->getUsername()); } - public function testUpdateEmailProvided() { + public function testUpdateEmailProvided(): void { $this->connection->expects($this->once()) ->method('__get') ->with($this->equalTo('ldapEmailAttribute')) @@ -118,7 +118,7 @@ class UserTest extends \Test\TestCase { $this->user->updateEmail(); } - public function testUpdateEmailNotProvided() { + public function testUpdateEmailNotProvided(): void { $this->connection->expects($this->once()) ->method('__get') ->with($this->equalTo('ldapEmailAttribute')) @@ -136,7 +136,7 @@ class UserTest extends \Test\TestCase { $this->user->updateEmail(); } - public function testUpdateEmailNotConfigured() { + public function testUpdateEmailNotConfigured(): void { $this->connection->expects($this->once()) ->method('__get') ->with($this->equalTo('ldapEmailAttribute')) @@ -151,7 +151,7 @@ class UserTest extends \Test\TestCase { $this->user->updateEmail(); } - public function testUpdateQuotaAllProvided() { + public function testUpdateQuotaAllProvided(): void { $this->connection->expects($this->exactly(2)) ->method('__get') ->willReturnMap([ @@ -178,7 +178,7 @@ class UserTest extends \Test\TestCase { $this->user->updateQuota(); } - public function testUpdateQuotaToDefaultAllProvided() { + public function testUpdateQuotaToDefaultAllProvided(): void { $this->connection->expects($this->exactly(2)) ->method('__get') ->willReturnMap([ @@ -205,7 +205,7 @@ class UserTest extends \Test\TestCase { $this->user->updateQuota(); } - public function testUpdateQuotaToNoneAllProvided() { + public function testUpdateQuotaToNoneAllProvided(): void { $this->connection->expects($this->exactly(2)) ->method('__get') ->willReturnMap([ @@ -232,7 +232,7 @@ class UserTest extends \Test\TestCase { $this->user->updateQuota(); } - public function testUpdateQuotaDefaultProvided() { + public function testUpdateQuotaDefaultProvided(): void { $this->connection->expects($this->exactly(2)) ->method('__get') ->willReturnMap([ @@ -259,7 +259,7 @@ class UserTest extends \Test\TestCase { $this->user->updateQuota(); } - public function testUpdateQuotaIndividualProvided() { + public function testUpdateQuotaIndividualProvided(): void { $this->connection->expects($this->exactly(2)) ->method('__get') ->willReturnMap([ @@ -286,7 +286,7 @@ class UserTest extends \Test\TestCase { $this->user->updateQuota(); } - public function testUpdateQuotaNoneProvided() { + public function testUpdateQuotaNoneProvided(): void { $this->connection->expects($this->exactly(2)) ->method('__get') ->willReturnMap([ @@ -314,7 +314,7 @@ class UserTest extends \Test\TestCase { $this->user->updateQuota(); } - public function testUpdateQuotaNoneConfigured() { + public function testUpdateQuotaNoneConfigured(): void { $this->connection->expects($this->exactly(2)) ->method('__get') ->willReturnMap([ @@ -338,7 +338,7 @@ class UserTest extends \Test\TestCase { $this->user->updateQuota(); } - public function testUpdateQuotaFromValue() { + public function testUpdateQuotaFromValue(): void { $readQuota = '19 GB'; $this->connection->expects($this->exactly(2)) @@ -367,7 +367,7 @@ class UserTest extends \Test\TestCase { /** * Unparseable quota will fallback to use the LDAP default */ - public function testUpdateWrongQuotaAllProvided() { + public function testUpdateWrongQuotaAllProvided(): void { $this->connection->expects($this->exactly(2)) ->method('__get') ->willReturnMap([ @@ -397,7 +397,7 @@ class UserTest extends \Test\TestCase { /** * No user quota and wrong default will set 'default' as quota */ - public function testUpdateWrongDefaultQuotaProvided() { + public function testUpdateWrongDefaultQuotaProvided(): void { $this->connection->expects($this->exactly(2)) ->method('__get') ->willReturnMap([ @@ -424,7 +424,7 @@ class UserTest extends \Test\TestCase { /** * Wrong user quota and wrong default will set 'default' as quota */ - public function testUpdateWrongQuotaAndDefaultAllProvided() { + public function testUpdateWrongQuotaAndDefaultAllProvided(): void { $this->connection->expects($this->exactly(2)) ->method('__get') ->willReturnMap([ @@ -451,7 +451,7 @@ class UserTest extends \Test\TestCase { /** * No quota attribute set and wrong default will set 'default' as quota */ - public function testUpdateWrongDefaultQuotaNotProvided() { + public function testUpdateWrongDefaultQuotaNotProvided(): void { $this->connection->expects($this->exactly(2)) ->method('__get') ->willReturnMap([ @@ -529,7 +529,7 @@ class UserTest extends \Test\TestCase { $this->user->updateAvatar(); } - public function testUpdateAvatarKnownJpegPhotoProvided() { + public function testUpdateAvatarKnownJpegPhotoProvided(): void { $this->access->expects($this->once()) ->method('readAttribute') ->with($this->equalTo($this->dn), @@ -647,7 +647,7 @@ class UserTest extends \Test\TestCase { $this->user->updateAvatar(); } - public function testUpdateAvatarCorruptPhotoProvided() { + public function testUpdateAvatarCorruptPhotoProvided(): void { $this->access->expects($this->any()) ->method('readAttribute') ->willReturnCallback(function ($dn, $attr) { @@ -761,7 +761,7 @@ class UserTest extends \Test\TestCase { $this->assertFalse($this->user->updateAvatar()); } - public function testUpdateAvatarNotProvided() { + public function testUpdateAvatarNotProvided(): void { $this->access->expects($this->any()) ->method('readAttribute') ->willReturnCallback(function ($dn, $attr) { @@ -816,7 +816,7 @@ class UserTest extends \Test\TestCase { /** * @dataProvider extStorageHomeDataProvider */ - public function testUpdateExtStorageHome(string $expected, ?string $valueFromLDAP = null, bool $isSet = true) { + public function testUpdateExtStorageHome(string $expected, ?string $valueFromLDAP = null, bool $isSet = true): void { if ($valueFromLDAP === null) { $this->connection->expects($this->once()) ->method('__get') @@ -848,7 +848,7 @@ class UserTest extends \Test\TestCase { $this->assertSame($expected, $actual); } - public function testMarkLogin() { + public function testMarkLogin(): void { $this->config->expects($this->once()) ->method('setUserValue') ->with($this->equalTo($this->uid), @@ -860,7 +860,7 @@ class UserTest extends \Test\TestCase { $this->user->markLogin(); } - public function testGetAvatarImageProvided() { + public function testGetAvatarImageProvided(): void { $this->access->expects($this->once()) ->method('readAttribute') ->with($this->equalTo($this->dn), @@ -878,7 +878,7 @@ class UserTest extends \Test\TestCase { $this->user->getAvatarImage(); } - public function testGetAvatarImageDisabled() { + public function testGetAvatarImageDisabled(): void { $this->access->expects($this->never()) ->method('readAttribute') ->with($this->equalTo($this->dn), $this->anything()); @@ -898,7 +898,7 @@ class UserTest extends \Test\TestCase { ]; } - public function testProcessAttributes() { + public function testProcessAttributes(): void { $requiredMethods = [ 'updateQuota', 'updateEmail', @@ -973,7 +973,7 @@ class UserTest extends \Test\TestCase { /** * @dataProvider emptyHomeFolderAttributeValueProvider */ - public function testGetHomePathNotConfigured($attributeValue) { + public function testGetHomePathNotConfigured($attributeValue): void { $this->connection->expects($this->any()) ->method('__get') ->with($this->equalTo('homeFolderNamingRule')) @@ -989,7 +989,7 @@ class UserTest extends \Test\TestCase { $this->assertFalse($this->user->getHomePath()); } - public function testGetHomePathConfiguredNotAvailableAllowed() { + public function testGetHomePathConfiguredNotAvailableAllowed(): void { $this->connection->expects($this->any()) ->method('__get') ->with($this->equalTo('homeFolderNamingRule')) @@ -1013,7 +1013,7 @@ class UserTest extends \Test\TestCase { } - public function testGetHomePathConfiguredNotAvailableNotAllowed() { + public function testGetHomePathConfiguredNotAvailableNotAllowed(): void { $this->expectException(\Exception::class); $this->connection->expects($this->any()) @@ -1050,7 +1050,7 @@ class UserTest extends \Test\TestCase { /** * @dataProvider displayNameProvider */ - public function testComposeAndStoreDisplayName($part1, $part2, $expected, $expectTriggerChange) { + public function testComposeAndStoreDisplayName($part1, $part2, $expected, $expectTriggerChange): void { $this->config->expects($this->once()) ->method('setUserValue'); $oldName = $expectTriggerChange ? 'xxGunslingerxx' : null; @@ -1076,7 +1076,7 @@ class UserTest extends \Test\TestCase { $this->assertSame($expected, $displayName); } - public function testComposeAndStoreDisplayNameNoOverwrite() { + public function testComposeAndStoreDisplayNameNoOverwrite(): void { $displayName = 'Randall Flagg'; $this->config->expects($this->never()) ->method('setUserValue'); @@ -1091,7 +1091,7 @@ class UserTest extends \Test\TestCase { $this->assertSame($composedDisplayName, $displayName); } - public function testHandlePasswordExpiryWarningDefaultPolicy() { + public function testHandlePasswordExpiryWarningDefaultPolicy(): void { $this->connection->expects($this->any()) ->method('__get') ->willReturnCallback(function ($name) { @@ -1154,7 +1154,7 @@ class UserTest extends \Test\TestCase { \OC_Hook::emit('OC_User', 'post_login', ['uid' => $this->uid]); } - public function testHandlePasswordExpiryWarningCustomPolicy() { + public function testHandlePasswordExpiryWarningCustomPolicy(): void { $this->connection->expects($this->any()) ->method('__get') ->willReturnCallback(function ($name) { diff --git a/apps/user_ldap/tests/UserLDAPPluginTest.php b/apps/user_ldap/tests/UserLDAPPluginTest.php index 1e3cd6afbf8..5f11f817771 100644 --- a/apps/user_ldap/tests/UserLDAPPluginTest.php +++ b/apps/user_ldap/tests/UserLDAPPluginTest.php @@ -17,7 +17,7 @@ class UserLDAPPluginTest extends \Test\TestCase { return new UserPluginManager(); } - public function testImplementsActions() { + public function testImplementsActions(): void { $pluginManager = $this->getUserPluginManager(); $plugin = $this->getMockBuilder('OCA\User_LDAP\Tests\LDAPUserPluginDummy') @@ -44,7 +44,7 @@ class UserLDAPPluginTest extends \Test\TestCase { $this->assertTrue($pluginManager->implementsActions(Backend::PROVIDE_AVATAR)); } - public function testCreateUser() { + public function testCreateUser(): void { $pluginManager = $this->getUserPluginManager(); $plugin = $this->getMockBuilder('OCA\User_LDAP\Tests\LDAPUserPluginDummy') @@ -67,7 +67,7 @@ class UserLDAPPluginTest extends \Test\TestCase { } - public function testCreateUserNotRegistered() { + public function testCreateUserNotRegistered(): void { $this->expectException(\Exception::class); $this->expectExceptionMessage('No plugin implements createUser in this LDAP Backend.'); @@ -75,7 +75,7 @@ class UserLDAPPluginTest extends \Test\TestCase { $pluginManager->createUser('foo', 'bar'); } - public function testSetPassword() { + public function testSetPassword(): void { $pluginManager = $this->getUserPluginManager(); $plugin = $this->getMockBuilder('OCA\User_LDAP\Tests\LDAPUserPluginDummy') @@ -98,7 +98,7 @@ class UserLDAPPluginTest extends \Test\TestCase { } - public function testSetPasswordNotRegistered() { + public function testSetPasswordNotRegistered(): void { $this->expectException(\Exception::class); $this->expectExceptionMessage('No plugin implements setPassword in this LDAP Backend.'); @@ -106,7 +106,7 @@ class UserLDAPPluginTest extends \Test\TestCase { $pluginManager->setPassword('foo', 'bar'); } - public function testGetHome() { + public function testGetHome(): void { $pluginManager = $this->getUserPluginManager(); $plugin = $this->getMockBuilder('OCA\User_LDAP\Tests\LDAPUserPluginDummy') @@ -128,7 +128,7 @@ class UserLDAPPluginTest extends \Test\TestCase { } - public function testGetHomeNotRegistered() { + public function testGetHomeNotRegistered(): void { $this->expectException(\Exception::class); $this->expectExceptionMessage('No plugin implements getHome in this LDAP Backend.'); @@ -136,7 +136,7 @@ class UserLDAPPluginTest extends \Test\TestCase { $pluginManager->getHome('foo'); } - public function testGetDisplayName() { + public function testGetDisplayName(): void { $pluginManager = $this->getUserPluginManager(); $plugin = $this->getMockBuilder('OCA\User_LDAP\Tests\LDAPUserPluginDummy') @@ -158,7 +158,7 @@ class UserLDAPPluginTest extends \Test\TestCase { } - public function testGetDisplayNameNotRegistered() { + public function testGetDisplayNameNotRegistered(): void { $this->expectException(\Exception::class); $this->expectExceptionMessage('No plugin implements getDisplayName in this LDAP Backend.'); @@ -166,7 +166,7 @@ class UserLDAPPluginTest extends \Test\TestCase { $pluginManager->getDisplayName('foo'); } - public function testSetDisplayName() { + public function testSetDisplayName(): void { $pluginManager = $this->getUserPluginManager(); $plugin = $this->getMockBuilder('OCA\User_LDAP\Tests\LDAPUserPluginDummy') @@ -189,7 +189,7 @@ class UserLDAPPluginTest extends \Test\TestCase { } - public function testSetDisplayNameNotRegistered() { + public function testSetDisplayNameNotRegistered(): void { $this->expectException(\Exception::class); $this->expectExceptionMessage('No plugin implements setDisplayName in this LDAP Backend.'); @@ -197,7 +197,7 @@ class UserLDAPPluginTest extends \Test\TestCase { $pluginManager->setDisplayName('foo', 'bar'); } - public function testCanChangeAvatar() { + public function testCanChangeAvatar(): void { $pluginManager = $this->getUserPluginManager(); $plugin = $this->getMockBuilder('OCA\User_LDAP\Tests\LDAPUserPluginDummy') @@ -219,7 +219,7 @@ class UserLDAPPluginTest extends \Test\TestCase { } - public function testCanChangeAvatarNotRegistered() { + public function testCanChangeAvatarNotRegistered(): void { $this->expectException(\Exception::class); $this->expectExceptionMessage('No plugin implements canChangeAvatar in this LDAP Backend.'); @@ -227,7 +227,7 @@ class UserLDAPPluginTest extends \Test\TestCase { $pluginManager->canChangeAvatar('foo'); } - public function testCountUsers() { + public function testCountUsers(): void { $pluginManager = $this->getUserPluginManager(); $plugin = $this->getMockBuilder('OCA\User_LDAP\Tests\LDAPUserPluginDummy') @@ -246,7 +246,7 @@ class UserLDAPPluginTest extends \Test\TestCase { } - public function testCountUsersNotRegistered() { + public function testCountUsersNotRegistered(): void { $this->expectException(\Exception::class); $this->expectExceptionMessage('No plugin implements countUsers in this LDAP Backend.'); @@ -254,7 +254,7 @@ class UserLDAPPluginTest extends \Test\TestCase { $pluginManager->countUsers(); } - public function testDeleteUser() { + public function testDeleteUser(): void { $pluginManager = $this->getUserPluginManager(); $plugin = $this->getMockBuilder('OCA\User_LDAP\Tests\LDAPUserPluginDummy') @@ -282,7 +282,7 @@ class UserLDAPPluginTest extends \Test\TestCase { } - public function testDeleteUserNotRegistered() { + public function testDeleteUserNotRegistered(): void { $this->expectException(\Exception::class); $this->expectExceptionMessage('No plugin implements deleteUser in this LDAP Backend.'); diff --git a/apps/user_ldap/tests/User_LDAPTest.php b/apps/user_ldap/tests/User_LDAPTest.php index 8d6a56112ce..90166beccff 100644 --- a/apps/user_ldap/tests/User_LDAPTest.php +++ b/apps/user_ldap/tests/User_LDAPTest.php @@ -170,7 +170,7 @@ class User_LDAPTest extends TestCase { ->willReturn(['dn', 'uid', 'mail', 'displayname']); } - public function testCheckPasswordUidReturn() { + public function testCheckPasswordUidReturn(): void { $user = $this->createMock(User::class); $user->expects($this->any()) ->method('getUsername') @@ -189,7 +189,7 @@ class User_LDAPTest extends TestCase { $this->assertEquals('gunslinger', $result); } - public function testCheckPasswordWrongPassword() { + public function testCheckPasswordWrongPassword(): void { $this->prepareAccessForCheckPassword(); $backend = new UserLDAP($this->access, $this->notificationManager, $this->pluginManager, $this->logger, $this->deletedUsersIndex); \OC_User::useBackend($backend); @@ -198,7 +198,7 @@ class User_LDAPTest extends TestCase { $this->assertFalse($result); } - public function testCheckPasswordWrongUser() { + public function testCheckPasswordWrongUser(): void { $this->prepareAccessForCheckPassword(); $backend = new UserLDAP($this->access, $this->notificationManager, $this->pluginManager, $this->logger, $this->deletedUsersIndex); \OC_User::useBackend($backend); @@ -207,7 +207,7 @@ class User_LDAPTest extends TestCase { $this->assertFalse($result); } - public function testCheckPasswordNoDisplayName() { + public function testCheckPasswordNoDisplayName(): void { $this->prepareAccessForCheckPassword(true); $this->prepareAccessForCheckPassword(); @@ -222,7 +222,7 @@ class User_LDAPTest extends TestCase { $this->assertFalse($result); } - public function testCheckPasswordPublicAPI() { + public function testCheckPasswordPublicAPI(): void { $user = $this->createMock(User::class); $user->expects($this->any()) ->method('getUsername') @@ -244,7 +244,7 @@ class User_LDAPTest extends TestCase { $this->assertEquals('gunslinger', $result); } - public function testCheckPasswordPublicAPIWrongPassword() { + public function testCheckPasswordPublicAPIWrongPassword(): void { $this->prepareAccessForCheckPassword(); $backend = new UserLDAP($this->access, $this->notificationManager, $this->pluginManager, $this->logger, $this->deletedUsersIndex); \OC_User::useBackend($backend); @@ -257,7 +257,7 @@ class User_LDAPTest extends TestCase { $this->assertFalse($result); } - public function testCheckPasswordPublicAPIWrongUser() { + public function testCheckPasswordPublicAPIWrongUser(): void { $this->prepareAccessForCheckPassword(); $backend = new UserLDAP($this->access, $this->notificationManager, $this->pluginManager, $this->logger, $this->deletedUsersIndex); \OC_User::useBackend($backend); @@ -270,13 +270,13 @@ class User_LDAPTest extends TestCase { $this->assertFalse($result); } - public function testDeleteUserCancel() { + public function testDeleteUserCancel(): void { $backend = new UserLDAP($this->access, $this->notificationManager, $this->pluginManager, $this->logger, $this->deletedUsersIndex); $result = $backend->deleteUser('notme'); $this->assertFalse($result); } - public function testDeleteUserSuccess() { + public function testDeleteUserSuccess(): void { $uid = 'jeremy'; $home = '/var/vhome/jdings/'; @@ -316,7 +316,7 @@ class User_LDAPTest extends TestCase { $this->assertSame($backend->getHome($uid), $home); } - public function testDeleteUserWithPlugin() { + public function testDeleteUserWithPlugin(): void { $this->pluginManager->expects($this->once()) ->method('canDeleteUser') ->willReturn(true); @@ -395,7 +395,7 @@ class User_LDAPTest extends TestCase { ->willReturn(['dn', 'uid', 'mail', 'displayname']); } - public function testGetUsersNoParam() { + public function testGetUsersNoParam(): void { $this->prepareAccessForGetUsers(); $backend = new UserLDAP($this->access, $this->notificationManager, $this->pluginManager, $this->logger, $this->deletedUsersIndex); @@ -403,7 +403,7 @@ class User_LDAPTest extends TestCase { $this->assertEquals(3, count($result)); } - public function testGetUsersLimitOffset() { + public function testGetUsersLimitOffset(): void { $this->prepareAccessForGetUsers(); $backend = new UserLDAP($this->access, $this->notificationManager, $this->pluginManager, $this->logger, $this->deletedUsersIndex); @@ -411,7 +411,7 @@ class User_LDAPTest extends TestCase { $this->assertEquals(1, count($result)); } - public function testGetUsersLimitOffset2() { + public function testGetUsersLimitOffset2(): void { $this->prepareAccessForGetUsers(); $backend = new UserLDAP($this->access, $this->notificationManager, $this->pluginManager, $this->logger, $this->deletedUsersIndex); @@ -419,7 +419,7 @@ class User_LDAPTest extends TestCase { $this->assertEquals(2, count($result)); } - public function testGetUsersSearchWithResult() { + public function testGetUsersSearchWithResult(): void { $this->prepareAccessForGetUsers(); $backend = new UserLDAP($this->access, $this->notificationManager, $this->pluginManager, $this->logger, $this->deletedUsersIndex); @@ -427,7 +427,7 @@ class User_LDAPTest extends TestCase { $this->assertEquals(2, count($result)); } - public function testGetUsersSearchEmptyResult() { + public function testGetUsersSearchEmptyResult(): void { $this->prepareAccessForGetUsers(); $backend = new UserLDAP($this->access, $this->notificationManager, $this->pluginManager, $this->logger, $this->deletedUsersIndex); @@ -443,7 +443,7 @@ class User_LDAPTest extends TestCase { return $uids; } - public function testGetUsersViaAPINoParam() { + public function testGetUsersViaAPINoParam(): void { $this->prepareAccessForGetUsers(); $backend = new UserLDAP($this->access, $this->notificationManager, $this->pluginManager, $this->logger, $this->deletedUsersIndex); \OC_User::useBackend($backend); @@ -452,7 +452,7 @@ class User_LDAPTest extends TestCase { $this->assertEquals(3, count($result)); } - public function testGetUsersViaAPILimitOffset() { + public function testGetUsersViaAPILimitOffset(): void { $this->prepareAccessForGetUsers(); $backend = new UserLDAP($this->access, $this->notificationManager, $this->pluginManager, $this->logger, $this->deletedUsersIndex); \OC_User::useBackend($backend); @@ -461,7 +461,7 @@ class User_LDAPTest extends TestCase { $this->assertEquals(1, count($result)); } - public function testGetUsersViaAPILimitOffset2() { + public function testGetUsersViaAPILimitOffset2(): void { $this->prepareAccessForGetUsers(); $backend = new UserLDAP($this->access, $this->notificationManager, $this->pluginManager, $this->logger, $this->deletedUsersIndex); \OC_User::useBackend($backend); @@ -470,7 +470,7 @@ class User_LDAPTest extends TestCase { $this->assertEquals(2, count($result)); } - public function testGetUsersViaAPISearchWithResult() { + public function testGetUsersViaAPISearchWithResult(): void { $this->prepareAccessForGetUsers(); $backend = new UserLDAP($this->access, $this->notificationManager, $this->pluginManager, $this->logger, $this->deletedUsersIndex); \OC_User::useBackend($backend); @@ -479,7 +479,7 @@ class User_LDAPTest extends TestCase { $this->assertEquals(2, count($result)); } - public function testGetUsersViaAPISearchEmptyResult() { + public function testGetUsersViaAPISearchEmptyResult(): void { $this->prepareAccessForGetUsers(); $backend = new UserLDAP($this->access, $this->notificationManager, $this->pluginManager, $this->logger, $this->deletedUsersIndex); \OC_User::useBackend($backend); @@ -488,7 +488,7 @@ class User_LDAPTest extends TestCase { $this->assertEquals(0, count($result)); } - public function testUserExists() { + public function testUserExists(): void { $backend = new UserLDAP($this->access, $this->notificationManager, $this->pluginManager, $this->logger, $this->deletedUsersIndex); $this->prepareMockForUserExists(); @@ -510,7 +510,7 @@ class User_LDAPTest extends TestCase { $this->assertTrue($result); } - public function testUserExistsForDeleted() { + public function testUserExistsForDeleted(): void { $backend = new UserLDAP($this->access, $this->notificationManager, $this->pluginManager, $this->logger, $this->deletedUsersIndex); $this->prepareMockForUserExists(); @@ -535,7 +535,7 @@ class User_LDAPTest extends TestCase { $this->assertTrue($backend->userExists('formerUser')); } - public function testUserExistsForNeverExisting() { + public function testUserExistsForNeverExisting(): void { $backend = new UserLDAP($this->access, $this->notificationManager, $this->pluginManager, $this->logger, $this->deletedUsersIndex); $this->prepareMockForUserExists(); @@ -554,7 +554,7 @@ class User_LDAPTest extends TestCase { $this->assertFalse($result); } - public function testUserExistsPublicAPI() { + public function testUserExistsPublicAPI(): void { $backend = new UserLDAP($this->access, $this->notificationManager, $this->pluginManager, $this->logger, $this->deletedUsersIndex); $this->prepareMockForUserExists(); \OC_User::useBackend($backend); @@ -587,7 +587,7 @@ class User_LDAPTest extends TestCase { $this->assertTrue($result); } - public function testDeleteUserExisting() { + public function testDeleteUserExisting(): void { $backend = new UserLDAP($this->access, $this->notificationManager, $this->pluginManager, $this->logger, $this->deletedUsersIndex); //we do not support deleting existing users at all @@ -595,7 +595,7 @@ class User_LDAPTest extends TestCase { $this->assertFalse($result); } - public function testGetHomeAbsolutePath() { + public function testGetHomeAbsolutePath(): void { $backend = new UserLDAP($this->access, $this->notificationManager, $this->pluginManager, $this->logger, $this->deletedUsersIndex); $this->prepareMockForUserExists(); @@ -649,7 +649,7 @@ class User_LDAPTest extends TestCase { $this->assertEquals('/tmp/rolandshome/', $result); } - public function testGetHomeRelative() { + public function testGetHomeRelative(): void { $backend = new UserLDAP($this->access, $this->notificationManager, $this->pluginManager, $this->logger, $this->deletedUsersIndex); $this->prepareMockForUserExists(); @@ -705,7 +705,7 @@ class User_LDAPTest extends TestCase { } - public function testGetHomeNoPath() { + public function testGetHomeNoPath(): void { $this->expectException(\Exception::class); $backend = new UserLDAP($this->access, $this->notificationManager, $this->pluginManager, $this->logger, $this->deletedUsersIndex); @@ -750,7 +750,7 @@ class User_LDAPTest extends TestCase { $this->assertFalse($result); } - public function testGetHomeDeletedUser() { + public function testGetHomeDeletedUser(): void { $uid = 'newyorker'; $backend = new UserLDAP($this->access, $this->notificationManager, $this->pluginManager, $this->logger, $this->deletedUsersIndex); @@ -793,7 +793,7 @@ class User_LDAPTest extends TestCase { $this->assertFalse($result); } - public function testGetHomeWithPlugin() { + public function testGetHomeWithPlugin(): void { $this->pluginManager->expects($this->once()) ->method('implementsActions') ->with(Backend::GET_HOME) @@ -844,7 +844,7 @@ class User_LDAPTest extends TestCase { ->willReturn([]); } - public function testGetDisplayName() { + public function testGetDisplayName(): void { $this->prepareAccessForGetDisplayName(); $backend = new UserLDAP($this->access, $this->notificationManager, $this->pluginManager, $this->logger, $this->deletedUsersIndex); $this->prepareMockForUserExists(); @@ -915,7 +915,7 @@ class User_LDAPTest extends TestCase { $this->assertEquals(null, $result); } - public function testGetDisplayNamePublicAPI() { + public function testGetDisplayNamePublicAPI(): void { $this->access->expects($this->any()) ->method('username2dn') ->willReturnCallback(function ($uid) { @@ -1008,7 +1008,7 @@ class User_LDAPTest extends TestCase { $this->assertEquals('newyorker', $result); } - public function testGetDisplayNameWithPlugin() { + public function testGetDisplayNameWithPlugin(): void { $this->pluginManager->expects($this->once()) ->method('implementsActions') ->with(Backend::GET_DISPLAYNAME) @@ -1024,7 +1024,7 @@ class User_LDAPTest extends TestCase { //no test for getDisplayNames, because it just invokes getUsers and //getDisplayName - public function testCountUsers() { + public function testCountUsers(): void { $this->access->expects($this->once()) ->method('countUsers') ->willReturn(5); @@ -1035,7 +1035,7 @@ class User_LDAPTest extends TestCase { $this->assertEquals(5, $result); } - public function testCountUsersFailing() { + public function testCountUsersFailing(): void { $this->access->expects($this->once()) ->method('countUsers') ->willReturn(false); @@ -1046,7 +1046,7 @@ class User_LDAPTest extends TestCase { $this->assertFalse($result); } - public function testCountUsersWithPlugin() { + public function testCountUsersWithPlugin(): void { $this->pluginManager->expects($this->once()) ->method('implementsActions') ->with(Backend::COUNT_USERS) @@ -1058,7 +1058,7 @@ class User_LDAPTest extends TestCase { $this->assertEquals($this->backend->countUsers(), 42); } - public function testLoginName2UserNameSuccess() { + public function testLoginName2UserNameSuccess(): void { $loginName = 'Alice'; $username = 'alice'; $dn = 'uid=alice,dc=what,dc=ever'; @@ -1107,7 +1107,7 @@ class User_LDAPTest extends TestCase { $backend->loginName2UserName($loginName); } - public function testLoginName2UserNameNoUsersOnLDAP() { + public function testLoginName2UserNameNoUsersOnLDAP(): void { $loginName = 'Loki'; $this->access->expects($this->once()) @@ -1139,7 +1139,7 @@ class User_LDAPTest extends TestCase { $backend->loginName2UserName($loginName); } - public function testLoginName2UserNameOfflineUser() { + public function testLoginName2UserNameOfflineUser(): void { $loginName = 'Alice'; $dn = 'uid=alice,dc=what,dc=ever'; @@ -1237,7 +1237,7 @@ class User_LDAPTest extends TestCase { } - public function testSetPasswordInvalid() { + public function testSetPasswordInvalid(): void { $this->expectException(\OCP\HintException::class); $this->expectExceptionMessage('Password fails quality checking policy'); @@ -1251,7 +1251,7 @@ class User_LDAPTest extends TestCase { $this->assertTrue(\OC_User::setPassword('roland', 'dt')); } - public function testSetPasswordValid() { + public function testSetPasswordValid(): void { $this->prepareAccessForSetPassword($this->access); $this->userManager->expects($this->any()) @@ -1268,7 +1268,7 @@ class User_LDAPTest extends TestCase { $this->assertTrue(\OC_User::setPassword('roland', 'dt12234$')); } - public function testSetPasswordValidDisabled() { + public function testSetPasswordValidDisabled(): void { $this->userManager->expects($this->any()) ->method('get') ->willReturn($this->createMock(User::class)); @@ -1281,7 +1281,7 @@ class User_LDAPTest extends TestCase { } - public function testSetPasswordWithInvalidUser() { + public function testSetPasswordWithInvalidUser(): void { $this->expectException(\Exception::class); $this->expectExceptionMessage('LDAP setPassword: Could not get user object for uid NotExistingUser. Maybe the LDAP entry has no set display name attribute?'); @@ -1294,7 +1294,7 @@ class User_LDAPTest extends TestCase { $this->backend->setPassword('NotExistingUser', 'Password'); } - public function testSetPasswordWithUsernameFalse() { + public function testSetPasswordWithUsernameFalse(): void { $user = $this->createMock(User::class); $user ->expects($this->once()) @@ -1310,7 +1310,7 @@ class User_LDAPTest extends TestCase { $this->assertFalse($this->backend->setPassword('NotExistingUser', 'Password')); } - public function testSetPasswordWithPlugin() { + public function testSetPasswordWithPlugin(): void { $this->pluginManager->expects($this->once()) ->method('implementsActions') ->with(Backend::SET_PASSWORD) @@ -1333,7 +1333,7 @@ class User_LDAPTest extends TestCase { } /** @dataProvider avatarDataProvider */ - public function testCanChangeAvatar($imageData, $expected) { + public function testCanChangeAvatar($imageData, $expected): void { $isValidImage = str_starts_with((string)$imageData, 'valid'); $user = $this->createMock(User::class); @@ -1352,7 +1352,7 @@ class User_LDAPTest extends TestCase { $this->assertSame($expected, $this->backend->canChangeAvatar('uid')); } - public function testCanChangeAvatarWithPlugin() { + public function testCanChangeAvatarWithPlugin(): void { $this->pluginManager->expects($this->once()) ->method('implementsActions') ->with(Backend::PROVIDE_AVATAR) @@ -1365,7 +1365,7 @@ class User_LDAPTest extends TestCase { $this->assertEquals($this->backend->canChangeAvatar('uid'), 'result'); } - public function testSetDisplayNameWithPlugin() { + public function testSetDisplayNameWithPlugin(): void { $newDisplayName = 'J. Baker'; $this->pluginManager->expects($this->once()) ->method('implementsActions') @@ -1382,7 +1382,7 @@ class User_LDAPTest extends TestCase { } - public function testSetDisplayNameErrorWithPlugin() { + public function testSetDisplayNameErrorWithPlugin(): void { $this->expectException(\OCP\HintException::class); $newDisplayName = 'J. Baker'; @@ -1400,7 +1400,7 @@ class User_LDAPTest extends TestCase { $this->backend->setDisplayName('uid', $newDisplayName); } - public function testSetDisplayNameFailing() { + public function testSetDisplayNameFailing(): void { $this->pluginManager->expects($this->once()) ->method('implementsActions') ->with(Backend::SET_DISPLAYNAME) @@ -1411,7 +1411,7 @@ class User_LDAPTest extends TestCase { $this->assertFalse($this->backend->setDisplayName('uid', 'displayName')); } - public function testCreateUserWithPlugin() { + public function testCreateUserWithPlugin(): void { $uid = 'alien6372'; $uuid = '123-2345-36756-123-2345234-4431'; $pwd = 'passwørd'; @@ -1438,7 +1438,7 @@ class User_LDAPTest extends TestCase { $this->assertEquals($this->backend->createUser($uid, $pwd), true); } - public function testCreateUserFailing() { + public function testCreateUserFailing(): void { $this->pluginManager->expects($this->once()) ->method('implementsActions') ->with(Backend::CREATE_USER) @@ -1460,7 +1460,7 @@ class User_LDAPTest extends TestCase { /** * @dataProvider actionProvider */ - public function testImplementsAction($configurable, $value, $actionCode, $expected) { + public function testImplementsAction($configurable, $value, $actionCode, $expected): void { $this->pluginManager->expects($this->once()) ->method('getImplementedActions') ->willReturn(0); diff --git a/apps/user_ldap/tests/User_ProxyTest.php b/apps/user_ldap/tests/User_ProxyTest.php index 5af7fef3f00..4544276a714 100644 --- a/apps/user_ldap/tests/User_ProxyTest.php +++ b/apps/user_ldap/tests/User_ProxyTest.php @@ -58,7 +58,7 @@ class User_ProxyTest extends TestCase { ->getMock(); } - public function testSetPassword() { + public function testSetPassword(): void { $this->proxy ->expects($this->once()) ->method('handleRequest') @@ -68,7 +68,7 @@ class User_ProxyTest extends TestCase { $this->assertTrue($this->proxy->setPassword('MyUid', 'MyPassword')); } - public function testSetDisplayName() { + public function testSetDisplayName(): void { $this->proxy ->expects($this->once()) ->method('handleRequest') @@ -78,7 +78,7 @@ class User_ProxyTest extends TestCase { $this->assertTrue($this->proxy->setDisplayName('MyUid', 'MyPassword')); } - public function testCreateUser() { + public function testCreateUser(): void { $this->proxy ->expects($this->once()) ->method('handleRequest') diff --git a/apps/user_ldap/tests/WizardTest.php b/apps/user_ldap/tests/WizardTest.php index d3cf6ffb0ae..31fd28e2fa1 100644 --- a/apps/user_ldap/tests/WizardTest.php +++ b/apps/user_ldap/tests/WizardTest.php @@ -75,7 +75,7 @@ class WizardTest extends TestCase { ->willReturn(true); } - public function testCumulativeSearchOnAttributeLimited() { + public function testCumulativeSearchOnAttributeLimited(): void { [$wizard, $configuration, $ldap] = $this->getWizardAndMocks(); $configuration->expects($this->any()) @@ -135,7 +135,7 @@ class WizardTest extends TestCase { unset($uidnumber); } - public function testCumulativeSearchOnAttributeUnlimited() { + public function testCumulativeSearchOnAttributeUnlimited(): void { [$wizard, $configuration, $ldap] = $this->getWizardAndMocks(); $configuration->expects($this->any()) @@ -211,7 +211,7 @@ class WizardTest extends TestCase { unset($uidnumber); } - public function testDetectEmailAttributeAlreadySet() { + public function testDetectEmailAttributeAlreadySet(): void { [$wizard, $configuration, $ldap, $access] = $this->getWizardAndMocks(); @@ -233,7 +233,7 @@ class WizardTest extends TestCase { $wizard->detectEmailAttribute(); } - public function testDetectEmailAttributeOverrideSet() { + public function testDetectEmailAttributeOverrideSet(): void { [$wizard, $configuration, $ldap, $access] = $this->getWizardAndMocks(); @@ -272,7 +272,7 @@ class WizardTest extends TestCase { $result['changes']['ldap_email_attr']); } - public function testDetectEmailAttributeFind() { + public function testDetectEmailAttributeFind(): void { [$wizard, $configuration, $ldap, $access] = $this->getWizardAndMocks(); @@ -311,7 +311,7 @@ class WizardTest extends TestCase { $result['changes']['ldap_email_attr']); } - public function testDetectEmailAttributeFindNothing() { + public function testDetectEmailAttributeFindNothing(): void { [$wizard, $configuration, $ldap, $access] = $this->getWizardAndMocks(); @@ -349,7 +349,7 @@ class WizardTest extends TestCase { $this->assertSame(false, $result->hasChanges()); } - public function testCumulativeSearchOnAttributeSkipReadDN() { + public function testCumulativeSearchOnAttributeSkipReadDN(): void { // tests that there is no infinite loop, when skipping already processed // DNs (they can be returned multiple times for multiple filters ) [$wizard, $configuration, $ldap] = $this->getWizardAndMocks(); diff --git a/apps/user_status/l10n/de.js b/apps/user_status/l10n/de.js index c1ecbae5a1a..63583076b6e 100644 --- a/apps/user_status/l10n/de.js +++ b/apps/user_status/l10n/de.js @@ -20,6 +20,8 @@ OC.L10N.register( "Set status" : "Status setzen", "Online status" : "Online-Status", "Status message" : "Statusnachricht", + "Set absence period" : "Abwesenheitszeitraum festlegen", + "Set absence period and replacement" : "Abwesenheitszeitraum und Vertretung festlegen", "Your status was set automatically" : "Dein Status wurde automatisch gesetzt", "Clear status message" : "Statusnachricht löschen", "Set status message" : "Statusnachricht setzen", diff --git a/apps/user_status/l10n/de.json b/apps/user_status/l10n/de.json index 472fd65797e..7d4b091cbc1 100644 --- a/apps/user_status/l10n/de.json +++ b/apps/user_status/l10n/de.json @@ -18,6 +18,8 @@ "Set status" : "Status setzen", "Online status" : "Online-Status", "Status message" : "Statusnachricht", + "Set absence period" : "Abwesenheitszeitraum festlegen", + "Set absence period and replacement" : "Abwesenheitszeitraum und Vertretung festlegen", "Your status was set automatically" : "Dein Status wurde automatisch gesetzt", "Clear status message" : "Statusnachricht löschen", "Set status message" : "Statusnachricht setzen", diff --git a/apps/user_status/tests/Unit/BackgroundJob/ClearOldStatusesBackgroundJobTest.php b/apps/user_status/tests/Unit/BackgroundJob/ClearOldStatusesBackgroundJobTest.php index d5c744b614e..90c85bcdaac 100644 --- a/apps/user_status/tests/Unit/BackgroundJob/ClearOldStatusesBackgroundJobTest.php +++ b/apps/user_status/tests/Unit/BackgroundJob/ClearOldStatusesBackgroundJobTest.php @@ -33,7 +33,7 @@ class ClearOldStatusesBackgroundJobTest extends TestCase { $this->job = new ClearOldStatusesBackgroundJob($this->time, $this->mapper); } - public function testRun() { + public function testRun(): void { $this->mapper->expects($this->once()) ->method('clearOlderThanClearAt') ->with(1337); diff --git a/apps/user_status/tests/Unit/Connector/UserStatusTest.php b/apps/user_status/tests/Unit/Connector/UserStatusTest.php index 8cc730b9836..fee9b4e4b89 100644 --- a/apps/user_status/tests/Unit/Connector/UserStatusTest.php +++ b/apps/user_status/tests/Unit/Connector/UserStatusTest.php @@ -13,7 +13,7 @@ use OCA\UserStatus\Db; use Test\TestCase; class UserStatusTest extends TestCase { - public function testUserStatus() { + public function testUserStatus(): void { $status = new Db\UserStatus(); $status->setUserId('user2'); $status->setStatus('away'); @@ -34,7 +34,7 @@ class UserStatusTest extends TestCase { $this->assertEquals('60000', $dateTime->format('U')); } - public function testUserStatusInvisible() { + public function testUserStatusInvisible(): void { $status = new Db\UserStatus(); $status->setUserId('user2'); $status->setStatus('invisible'); diff --git a/apps/user_status/tests/Unit/Controller/PredefinedStatusControllerTest.php b/apps/user_status/tests/Unit/Controller/PredefinedStatusControllerTest.php index 67670f56e5c..5709cdc89cf 100644 --- a/apps/user_status/tests/Unit/Controller/PredefinedStatusControllerTest.php +++ b/apps/user_status/tests/Unit/Controller/PredefinedStatusControllerTest.php @@ -31,7 +31,7 @@ class PredefinedStatusControllerTest extends TestCase { $this->service); } - public function testFindAll() { + public function testFindAll(): void { $this->service->expects($this->once()) ->method('getDefaultStatuses') ->with() diff --git a/apps/weather_status/lib/Service/WeatherStatusService.php b/apps/weather_status/lib/Service/WeatherStatusService.php index da0ee855e85..1ffb3e5cff2 100644 --- a/apps/weather_status/lib/Service/WeatherStatusService.php +++ b/apps/weather_status/lib/Service/WeatherStatusService.php @@ -121,7 +121,7 @@ class WeatherStatusService { $this->config->setUserValue($this->userId, Application::APP_ID, 'lon', strval($lon)); // resolve and store formatted address $address = $this->resolveLocation($lat, $lon); - $address = $address ? $address : $this->l10n->t('Unknown address'); + $address = $address ?: $this->l10n->t('Unknown address'); $this->config->setUserValue($this->userId, Application::APP_ID, 'address', $address); // get and store altitude $altitude = $this->getAltitude($lat, $lon); @@ -257,6 +257,9 @@ class WeatherStatusService { ]; $url = 'https://nominatim.openstreetmap.org/search'; $results = $this->requestJSON($url, $params); + if ($results['error'] !== null) { + return $results; + } if (count($results) > 0) { return $results[0]; } diff --git a/apps/webhook_listeners/tests/Db/WebhookListenerMapperTest.php b/apps/webhook_listeners/tests/Db/WebhookListenerMapperTest.php index bf39d4779ea..aefed2961ea 100644 --- a/apps/webhook_listeners/tests/Db/WebhookListenerMapperTest.php +++ b/apps/webhook_listeners/tests/Db/WebhookListenerMapperTest.php @@ -48,7 +48,7 @@ class WebhookListenerMapperTest extends TestCase { $query->delete(WebhookListenerMapper::TABLE_NAME)->executeStatement(); } - public function testInsertListenerWithNotSupportedEvent() { + public function testInsertListenerWithNotSupportedEvent(): void { $this->expectException(\UnexpectedValueException::class); $listener1 = $this->mapper->addWebhookListener( null, @@ -64,7 +64,7 @@ class WebhookListenerMapperTest extends TestCase { ); } - public function testInsertListenerAndGetIt() { + public function testInsertListenerAndGetIt(): void { $listener1 = $this->mapper->addWebhookListener( null, 'bob', @@ -84,7 +84,7 @@ class WebhookListenerMapperTest extends TestCase { $this->assertEquals($listener1, $listener2); } - public function testInsertListenerAndGetItByUri() { + public function testInsertListenerAndGetItByUri(): void { $uri = 'https://webhook.example.com/endpoint'; $listener1 = $this->mapper->addWebhookListener( null, @@ -105,7 +105,7 @@ class WebhookListenerMapperTest extends TestCase { $this->assertContains($listener1->getId(), array_map(fn ($listener) => $listener->getId(), $listeners)); } - public function testInsertListenerAndGetItWithAuthData() { + public function testInsertListenerAndGetItWithAuthData(): void { $listener1 = $this->mapper->addWebhookListener( null, 'bob', @@ -125,7 +125,7 @@ class WebhookListenerMapperTest extends TestCase { $this->assertEquals($listener1, $listener2); } - public function testInsertListenerAndGetItByEventAndUser() { + public function testInsertListenerAndGetItByEventAndUser(): void { $listener1 = $this->mapper->addWebhookListener( null, 'bob', diff --git a/apps/webhook_listeners/tests/Service/PHPMongoQueryTest.php b/apps/webhook_listeners/tests/Service/PHPMongoQueryTest.php index 071330a79e3..b1094731733 100644 --- a/apps/webhook_listeners/tests/Service/PHPMongoQueryTest.php +++ b/apps/webhook_listeners/tests/Service/PHPMongoQueryTest.php @@ -41,7 +41,7 @@ class PHPMongoQueryTest extends TestCase { /** * @dataProvider dataExecuteQuery */ - public function testExecuteQuery(array $query, array $document, bool $matches) { + public function testExecuteQuery(array $query, array $document, bool $matches): void { $this->assertEquals($matches, PHPMongoQuery::executeQuery($query, $document)); } } diff --git a/apps/workflowengine/l10n/ru.js b/apps/workflowengine/l10n/ru.js index c0ef28fced1..81fad027410 100644 --- a/apps/workflowengine/l10n/ru.js +++ b/apps/workflowengine/l10n/ru.js @@ -91,6 +91,7 @@ OC.L10N.register( "Show more" : "Показывать больше", "Configured flows" : "Настроенные обработки", "Your flows" : "Ваши обработки", + "No flows configured" : "Потоки не настроены", "matches" : "соответствует", "does not match" : "не соответствует", "is" : "равняется", @@ -115,6 +116,7 @@ OC.L10N.register( "between" : "между", "not between" : "не между", "Request user agent" : "Используемое приложение (user agent)", + "Group membership" : "Членство в группе", "is member of" : "является участником", "is not member of" : "не является участником", "User group membership" : "Участие в группе пользователей" diff --git a/apps/workflowengine/l10n/ru.json b/apps/workflowengine/l10n/ru.json index b87f1d8763a..7b6c003676d 100644 --- a/apps/workflowengine/l10n/ru.json +++ b/apps/workflowengine/l10n/ru.json @@ -89,6 +89,7 @@ "Show more" : "Показывать больше", "Configured flows" : "Настроенные обработки", "Your flows" : "Ваши обработки", + "No flows configured" : "Потоки не настроены", "matches" : "соответствует", "does not match" : "не соответствует", "is" : "равняется", @@ -113,6 +114,7 @@ "between" : "между", "not between" : "не между", "Request user agent" : "Используемое приложение (user agent)", + "Group membership" : "Членство в группе", "is member of" : "является участником", "is not member of" : "не является участником", "User group membership" : "Участие в группе пользователей" diff --git a/apps/workflowengine/tests/Check/AbstractStringCheckTest.php b/apps/workflowengine/tests/Check/AbstractStringCheckTest.php index e5182bea483..eb40b164176 100644 --- a/apps/workflowengine/tests/Check/AbstractStringCheckTest.php +++ b/apps/workflowengine/tests/Check/AbstractStringCheckTest.php @@ -53,7 +53,7 @@ class AbstractStringCheckTest extends \Test\TestCase { * @param string $actualValue * @param bool $expected */ - public function testExecuteStringCheck($operation, $checkValue, $actualValue, $expected) { + public function testExecuteStringCheck($operation, $checkValue, $actualValue, $expected): void { $check = $this->getCheckMock(); /** @var \OCA\WorkflowEngine\Check\AbstractStringCheck $check */ @@ -74,7 +74,7 @@ class AbstractStringCheckTest extends \Test\TestCase { * @param string $operator * @param string $value */ - public function testValidateCheck($operator, $value) { + public function testValidateCheck($operator, $value): void { $check = $this->getCheckMock(); /** @var \OCA\WorkflowEngine\Check\AbstractStringCheck $check */ @@ -99,7 +99,7 @@ class AbstractStringCheckTest extends \Test\TestCase { * @param $exceptionCode * @param $exceptionMessage */ - public function testValidateCheckInvalid($operator, $value, $exceptionCode, $exceptionMessage) { + public function testValidateCheckInvalid($operator, $value, $exceptionCode, $exceptionMessage): void { $check = $this->getCheckMock(); try { @@ -125,7 +125,7 @@ class AbstractStringCheckTest extends \Test\TestCase { * @param array[] $matches * @param bool $expected */ - public function testMatch($pattern, $subject, $matches, $expected) { + public function testMatch($pattern, $subject, $matches, $expected): void { $check = $this->getCheckMock(); $this->invokePrivate($check, 'matches', [$matches]); diff --git a/apps/workflowengine/tests/Check/FileMimeTypeTest.php b/apps/workflowengine/tests/Check/FileMimeTypeTest.php index 60788036408..1fc5118c5c4 100644 --- a/apps/workflowengine/tests/Check/FileMimeTypeTest.php +++ b/apps/workflowengine/tests/Check/FileMimeTypeTest.php @@ -71,7 +71,7 @@ class FileMimeTypeTest extends TestCase { }); } - public function testUseCachedMimetype() { + public function testUseCachedMimetype(): void { $storage = new Temporary([]); $storage->mkdir('foo'); $storage->file_put_contents('foo/bar.txt', 'asd'); @@ -84,7 +84,7 @@ class FileMimeTypeTest extends TestCase { $this->assertTrue($check->executeCheck('is', 'text/plain')); } - public function testNonCachedNotExists() { + public function testNonCachedNotExists(): void { $storage = new Temporary([]); $check = new FileMimeType($this->l10n, $this->request, $this->mimeDetector); @@ -93,7 +93,7 @@ class FileMimeTypeTest extends TestCase { $this->assertTrue($check->executeCheck('is', 'text/plain-path-detected')); } - public function testNonCachedLocal() { + public function testNonCachedLocal(): void { $storage = new Temporary([]); $storage->mkdir('foo'); $storage->file_put_contents('foo/bar.txt', 'text-content'); @@ -104,7 +104,7 @@ class FileMimeTypeTest extends TestCase { $this->assertTrue($check->executeCheck('is', 'text/plain-content-detected')); } - public function testNonCachedNotLocal() { + public function testNonCachedNotLocal(): void { $storage = new TemporaryNoLocal([]); $storage->mkdir('foo'); $storage->file_put_contents('foo/bar.txt', 'text-content'); @@ -115,7 +115,7 @@ class FileMimeTypeTest extends TestCase { $this->assertTrue($check->executeCheck('is', 'text/plain-content-detected')); } - public function testFallback() { + public function testFallback(): void { $storage = new Temporary([]); $check = new FileMimeType($this->l10n, $this->request, $this->mimeDetector); @@ -124,7 +124,7 @@ class FileMimeTypeTest extends TestCase { $this->assertTrue($check->executeCheck('is', 'application/octet-stream')); } - public function testFromCacheCached() { + public function testFromCacheCached(): void { $storage = new Temporary([]); $storage->mkdir('foo'); $storage->file_put_contents('foo/bar.txt', 'text-content'); @@ -144,7 +144,7 @@ class FileMimeTypeTest extends TestCase { $this->assertTrue($newCheck->executeCheck('is', 'text/plain-content-detected')); } - public function testExistsCached() { + public function testExistsCached(): void { $storage = new TemporaryNoLocal([]); $storage->mkdir('foo'); $storage->file_put_contents('foo/bar.txt', 'text-content'); @@ -161,7 +161,7 @@ class FileMimeTypeTest extends TestCase { $this->assertTrue($newCheck->executeCheck('is', 'text/plain-path-detected')); } - public function testNonExistsNotCached() { + public function testNonExistsNotCached(): void { $storage = new TemporaryNoLocal([]); $check = new FileMimeType($this->l10n, $this->request, $this->mimeDetector); diff --git a/apps/workflowengine/tests/Check/RequestRemoteAddressTest.php b/apps/workflowengine/tests/Check/RequestRemoteAddressTest.php index 7c46a33a477..438a59a8a48 100644 --- a/apps/workflowengine/tests/Check/RequestRemoteAddressTest.php +++ b/apps/workflowengine/tests/Check/RequestRemoteAddressTest.php @@ -52,7 +52,7 @@ class RequestRemoteAddressTest extends \Test\TestCase { * @param string $ip * @param bool $expected */ - public function testExecuteCheckMatchesIPv4($value, $ip, $expected) { + public function testExecuteCheckMatchesIPv4($value, $ip, $expected): void { $check = new \OCA\WorkflowEngine\Check\RequestRemoteAddress($this->getL10NMock(), $this->request); $this->request->expects($this->once()) @@ -68,7 +68,7 @@ class RequestRemoteAddressTest extends \Test\TestCase { * @param string $ip * @param bool $expected */ - public function testExecuteCheckNotMatchesIPv4($value, $ip, $expected) { + public function testExecuteCheckNotMatchesIPv4($value, $ip, $expected): void { $check = new \OCA\WorkflowEngine\Check\RequestRemoteAddress($this->getL10NMock(), $this->request); $this->request->expects($this->once()) @@ -96,7 +96,7 @@ class RequestRemoteAddressTest extends \Test\TestCase { * @param string $ip * @param bool $expected */ - public function testExecuteCheckMatchesIPv6($value, $ip, $expected) { + public function testExecuteCheckMatchesIPv6($value, $ip, $expected): void { $check = new \OCA\WorkflowEngine\Check\RequestRemoteAddress($this->getL10NMock(), $this->request); $this->request->expects($this->once()) @@ -112,7 +112,7 @@ class RequestRemoteAddressTest extends \Test\TestCase { * @param string $ip * @param bool $expected */ - public function testExecuteCheckNotMatchesIPv6($value, $ip, $expected) { + public function testExecuteCheckNotMatchesIPv6($value, $ip, $expected): void { $check = new \OCA\WorkflowEngine\Check\RequestRemoteAddress($this->getL10NMock(), $this->request); $this->request->expects($this->once()) diff --git a/apps/workflowengine/tests/Check/RequestTimeTest.php b/apps/workflowengine/tests/Check/RequestTimeTest.php index 3c261fe2de3..34ea656f416 100644 --- a/apps/workflowengine/tests/Check/RequestTimeTest.php +++ b/apps/workflowengine/tests/Check/RequestTimeTest.php @@ -71,7 +71,7 @@ class RequestTimeTest extends \Test\TestCase { * @param int $timestamp * @param bool $expected */ - public function testExecuteCheckIn($value, $timestamp, $expected) { + public function testExecuteCheckIn($value, $timestamp, $expected): void { $check = new \OCA\WorkflowEngine\Check\RequestTime($this->getL10NMock(), $this->timeFactory); $this->timeFactory->expects($this->once()) @@ -87,7 +87,7 @@ class RequestTimeTest extends \Test\TestCase { * @param int $timestamp * @param bool $expected */ - public function testExecuteCheckNotIn($value, $timestamp, $expected) { + public function testExecuteCheckNotIn($value, $timestamp, $expected): void { $check = new \OCA\WorkflowEngine\Check\RequestTime($this->getL10NMock(), $this->timeFactory); $this->timeFactory->expects($this->once()) @@ -110,7 +110,7 @@ class RequestTimeTest extends \Test\TestCase { * @param string $operator * @param string $value */ - public function testValidateCheck($operator, $value) { + public function testValidateCheck($operator, $value): void { $check = new \OCA\WorkflowEngine\Check\RequestTime($this->getL10NMock(), $this->timeFactory); $check->validateCheck($operator, $value); $this->addToAssertionCount(1); @@ -135,7 +135,7 @@ class RequestTimeTest extends \Test\TestCase { * @param int $exceptionCode * @param string $exceptionMessage */ - public function testValidateCheckInvalid($operator, $value, $exceptionCode, $exceptionMessage) { + public function testValidateCheckInvalid($operator, $value, $exceptionCode, $exceptionMessage): void { $check = new \OCA\WorkflowEngine\Check\RequestTime($this->getL10NMock(), $this->timeFactory); try { diff --git a/apps/workflowengine/tests/Check/RequestUserAgentTest.php b/apps/workflowengine/tests/Check/RequestUserAgentTest.php index f41f95c15ff..f74cf669cc7 100644 --- a/apps/workflowengine/tests/Check/RequestUserAgentTest.php +++ b/apps/workflowengine/tests/Check/RequestUserAgentTest.php @@ -90,7 +90,7 @@ class RequestUserAgentTest extends TestCase { * @param string $actualValue * @param bool $expected */ - public function testExecuteCheck($operation, $checkValue, $actualValue, $expected) { + public function testExecuteCheck($operation, $checkValue, $actualValue, $expected): void { $this->request->expects($this->once()) ->method('getHeader') ->willReturn($actualValue); diff --git a/apps/workflowengine/tests/ManagerTest.php b/apps/workflowengine/tests/ManagerTest.php index 4a547f5c8bf..334666af039 100644 --- a/apps/workflowengine/tests/ManagerTest.php +++ b/apps/workflowengine/tests/ManagerTest.php @@ -123,7 +123,7 @@ class ManagerTest extends TestCase { } } - public function testChecks() { + public function testChecks(): void { $check1 = $this->invokePrivate($this->manager, 'addCheck', ['Test', 'equal', 1]); $check2 = $this->invokePrivate($this->manager, 'addCheck', ['Test', '!equal', 2]); @@ -144,7 +144,7 @@ class ManagerTest extends TestCase { $this->assertArrayHasKey($check2, $data); } - public function testScope() { + public function testScope(): void { $adminScope = $this->buildScope(); $userScope = $this->buildScope('jackie'); $entity = File::class; @@ -178,7 +178,7 @@ class ManagerTest extends TestCase { $this->assertTrue($this->invokePrivate($this->manager, 'canModify', [$opId3, $userScope])); } - public function testGetAllOperations() { + public function testGetAllOperations(): void { $adminScope = $this->buildScope(); $userScope = $this->buildScope('jackie'); $entity = File::class; @@ -249,7 +249,7 @@ class ManagerTest extends TestCase { $this->assertSame(2, count($userOps['OCA\WFE\TestUserOp'])); } - public function testGetOperations() { + public function testGetOperations(): void { $adminScope = $this->buildScope(); $userScope = $this->buildScope('jackie'); $entity = File::class; @@ -319,7 +319,7 @@ class ManagerTest extends TestCase { }); } - public function testGetAllConfiguredEvents() { + public function testGetAllConfiguredEvents(): void { $adminScope = $this->buildScope(); $userScope = $this->buildScope('jackie'); $entity = File::class; @@ -353,7 +353,7 @@ class ManagerTest extends TestCase { $this->assertEquals($allOperationsCached, $allOperations); } - public function testUpdateOperation() { + public function testUpdateOperation(): void { $adminScope = $this->buildScope(); $userScope = $this->buildScope('jackie'); $entity = File::class; @@ -434,7 +434,7 @@ class ManagerTest extends TestCase { } } - public function testDeleteOperation() { + public function testDeleteOperation(): void { $adminScope = $this->buildScope(); $userScope = $this->buildScope('jackie'); $entity = File::class; @@ -484,7 +484,7 @@ class ManagerTest extends TestCase { } } - public function testGetEntitiesListBuildInOnly() { + public function testGetEntitiesListBuildInOnly(): void { $fileEntityMock = $this->createMock(File::class); $this->container->expects($this->once()) @@ -498,7 +498,7 @@ class ManagerTest extends TestCase { $this->assertInstanceOf(IEntity::class, $entities[0]); } - public function testGetEntitiesList() { + public function testGetEntitiesList(): void { $fileEntityMock = $this->createMock(File::class); $this->container->expects($this->once()) @@ -532,7 +532,7 @@ class ManagerTest extends TestCase { $this->assertSame(1, $entityTypeCounts[1]); } - public function testValidateOperationOK() { + public function testValidateOperationOK(): void { $check = [ 'class' => ICheck::class, 'operator' => 'is', @@ -592,7 +592,7 @@ class ManagerTest extends TestCase { $this->manager->validateOperation(IOperation::class, 'test', [$check], 'operationData', $scopeMock, IEntity::class, ['MyEvent']); } - public function testValidateOperationCheckInputLengthError() { + public function testValidateOperationCheckInputLengthError(): void { $check = [ 'class' => ICheck::class, 'operator' => 'is', @@ -656,7 +656,7 @@ class ManagerTest extends TestCase { } } - public function testValidateOperationDataLengthError() { + public function testValidateOperationDataLengthError(): void { $check = [ 'class' => ICheck::class, 'operator' => 'is', @@ -720,7 +720,7 @@ class ManagerTest extends TestCase { } } - public function testValidateOperationScopeNotAvailable() { + public function testValidateOperationScopeNotAvailable(): void { $check = [ 'class' => ICheck::class, 'operator' => 'is', |