diff options
-rw-r--r-- | apps/comments/l10n/it.js | 2 | ||||
-rw-r--r-- | apps/comments/l10n/it.json | 2 | ||||
-rw-r--r-- | apps/federatedfilesharing/appinfo/app.php | 4 | ||||
-rw-r--r-- | apps/federatedfilesharing/lib/AddressHandler.php (renamed from apps/federatedfilesharing/lib/addresshandler.php) | 0 | ||||
-rw-r--r-- | apps/federatedfilesharing/lib/AppInfo/Application.php (renamed from apps/federatedfilesharing/appinfo/application.php) | 0 | ||||
-rw-r--r-- | apps/federatedfilesharing/lib/BackgroundJob/UnShare.php (renamed from apps/federatedfilesharing/backgroundjob/unshare.php) | 0 | ||||
-rw-r--r-- | apps/federatedfilesharing/lib/DiscoveryManager.php (renamed from apps/federatedfilesharing/lib/discoverymanager.php) | 0 | ||||
-rw-r--r-- | apps/federatedfilesharing/lib/FederatedShareProvider.php (renamed from apps/federatedfilesharing/lib/federatedshareprovider.php) | 0 | ||||
-rw-r--r-- | apps/federatedfilesharing/lib/Notifications.php (renamed from apps/federatedfilesharing/lib/notifications.php) | 0 | ||||
-rw-r--r-- | apps/federatedfilesharing/lib/TokenHandler.php (renamed from apps/federatedfilesharing/lib/tokenhandler.php) | 0 | ||||
-rw-r--r-- | apps/federatedfilesharing/tests/AddressHandlerTest.php (renamed from apps/federatedfilesharing/tests/addresshandlertest.php) | 0 | ||||
-rw-r--r-- | apps/federatedfilesharing/tests/FederatedShareProviderTest.php (renamed from apps/federatedfilesharing/tests/federatedshareprovidertest.php) | 0 | ||||
-rw-r--r-- | apps/federatedfilesharing/tests/NotificationsTest.php (renamed from apps/federatedfilesharing/tests/notificationstest.php) | 0 | ||||
-rw-r--r-- | apps/federatedfilesharing/tests/TokenHandlerTest.php (renamed from apps/federatedfilesharing/tests/tokenhandlertest.php) | 0 | ||||
-rw-r--r-- | apps/files/l10n/lv.js | 2 | ||||
-rw-r--r-- | apps/files/l10n/lv.json | 2 | ||||
-rw-r--r-- | apps/files/l10n/ro.js | 1 | ||||
-rw-r--r-- | apps/files/l10n/ro.json | 1 | ||||
-rw-r--r-- | apps/files_external/l10n/de.js | 2 | ||||
-rw-r--r-- | apps/files_external/l10n/de.json | 2 | ||||
-rw-r--r-- | apps/files_sharing/l10n/lv.js | 24 | ||||
-rw-r--r-- | apps/files_sharing/l10n/lv.json | 24 | ||||
-rw-r--r-- | apps/files_trashbin/l10n/lv.js | 2 | ||||
-rw-r--r-- | apps/files_trashbin/l10n/lv.json | 2 | ||||
-rw-r--r-- | core/templates/filetemplates/template.odp | bin | 12910 -> 13090 bytes | |||
-rw-r--r-- | core/templates/filetemplates/template.ods | bin | 7130 -> 7134 bytes | |||
-rw-r--r-- | core/templates/filetemplates/template.odt | bin | 8449 -> 7938 bytes | |||
-rw-r--r-- | lib/private/Authentication/Token/DefaultToken.php | 9 | ||||
-rw-r--r-- | lib/private/Authentication/Token/DefaultTokenMapper.php | 28 | ||||
-rw-r--r-- | lib/private/Authentication/Token/DefaultTokenProvider.php | 30 | ||||
-rw-r--r-- | lib/private/Authentication/Token/IProvider.php | 49 | ||||
-rw-r--r-- | lib/private/Authentication/Token/IToken.php | 10 | ||||
-rw-r--r-- | lib/private/Cache/File.php | 4 | ||||
-rw-r--r-- | lib/private/Server.php | 6 | ||||
-rw-r--r-- | lib/private/User/Session.php | 65 | ||||
-rw-r--r-- | lib/public/Files/AlreadyExistsException.php (renamed from lib/public/files/alreadyexistsexception.php) | 0 | ||||
-rw-r--r-- | lib/public/Files/Cache/ICache.php (renamed from lib/public/files/cache/icache.php) | 0 | ||||
-rw-r--r-- | lib/public/Files/Cache/ICacheEntry.php (renamed from lib/public/files/cache/icacheentry.php) | 0 | ||||
-rw-r--r-- | lib/public/Files/Cache/IPropagator.php (renamed from lib/public/files/cache/ipropagator.php) | 0 | ||||
-rw-r--r-- | lib/public/Files/Cache/IScanner.php (renamed from lib/public/files/cache/iscanner.php) | 0 | ||||
-rw-r--r-- | lib/public/Files/Cache/IUpdater.php (renamed from lib/public/files/cache/iupdater.php) | 0 | ||||
-rw-r--r-- | lib/public/Files/Cache/IWatcher.php (renamed from lib/public/files/cache/iwatcher.php) | 0 | ||||
-rw-r--r-- | lib/public/Files/Config/ICachedMountInfo.php (renamed from lib/public/files/config/icachedmountinfo.php) | 0 | ||||
-rw-r--r-- | lib/public/Files/Config/IHomeMountProvider.php (renamed from lib/public/files/config/ihomemountprovider.php) | 0 | ||||
-rw-r--r-- | lib/public/Files/Config/IMountProvider.php (renamed from lib/public/files/config/imountprovider.php) | 0 | ||||
-rw-r--r-- | lib/public/Files/Config/IMountProviderCollection.php (renamed from lib/public/files/config/imountprovidercollection.php) | 0 | ||||
-rw-r--r-- | lib/public/Files/Config/IUserMountCache.php (renamed from lib/public/files/config/iusermountcache.php) | 0 | ||||
-rw-r--r-- | lib/public/Files/EntityTooLargeException.php (renamed from lib/public/files/entitytoolargeexception.php) | 0 | ||||
-rw-r--r-- | lib/public/Files/File.php (renamed from lib/public/files/file.php) | 0 | ||||
-rw-r--r-- | lib/public/Files/FileInfo.php (renamed from lib/public/files/fileinfo.php) | 0 | ||||
-rw-r--r-- | lib/public/Files/FileNameTooLongException.php (renamed from lib/public/files/filenametoolongexception.php) | 0 | ||||
-rw-r--r-- | lib/public/Files/Folder.php (renamed from lib/public/files/folder.php) | 0 | ||||
-rw-r--r-- | lib/public/Files/ForbiddenException.php (renamed from lib/public/files/forbiddenexception.php) | 0 | ||||
-rw-r--r-- | lib/public/Files/IHomeStorage.php (renamed from lib/public/files/ihomestorage.php) | 0 | ||||
-rw-r--r-- | lib/public/Files/IMimeTypeDetector.php (renamed from lib/public/files/imimetypedetector.php) | 0 | ||||
-rw-r--r-- | lib/public/Files/IMimeTypeLoader.php (renamed from lib/public/files/imimetypeloader.php) | 0 | ||||
-rw-r--r-- | lib/public/Files/IRootFolder.php (renamed from lib/public/files/irootfolder.php) | 0 | ||||
-rw-r--r-- | lib/public/Files/InvalidCharacterInPathException.php (renamed from lib/public/files/invalidcharacterinpathexception.php) | 0 | ||||
-rw-r--r-- | lib/public/Files/InvalidContentException.php (renamed from lib/public/files/invalidcontentexception.php) | 0 | ||||
-rw-r--r-- | lib/public/Files/InvalidPathException.php (renamed from lib/public/files/invalidpathexception.php) | 0 | ||||
-rw-r--r-- | lib/public/Files/LockNotAcquiredException.php (renamed from lib/public/files/locknotacquiredexception.php) | 0 | ||||
-rw-r--r-- | lib/public/Files/Mount/IMountManager.php (renamed from lib/public/files/mount/imountmanager.php) | 0 | ||||
-rw-r--r-- | lib/public/Files/Mount/IMountPoint.php (renamed from lib/public/files/mount/imountpoint.php) | 0 | ||||
-rw-r--r-- | lib/public/Files/Node.php (renamed from lib/public/files/node.php) | 0 | ||||
-rw-r--r-- | lib/public/Files/NotEnoughSpaceException.php (renamed from lib/public/files/notenoughspaceexception.php) | 0 | ||||
-rw-r--r-- | lib/public/Files/NotFoundException.php (renamed from lib/public/files/notfoundexception.php) | 0 | ||||
-rw-r--r-- | lib/public/Files/NotPermittedException.php (renamed from lib/public/files/notpermittedexception.php) | 0 | ||||
-rw-r--r-- | lib/public/Files/ObjectStore/IObjectStore.php (renamed from lib/public/files/objectstore/iobjectstore.php) | 0 | ||||
-rw-r--r-- | lib/public/Files/ReservedWordException.php (renamed from lib/public/files/reservedwordexception.php) | 0 | ||||
-rw-r--r-- | lib/public/Files/Storage.php (renamed from lib/public/files/storage.php) | 0 | ||||
-rw-r--r-- | lib/public/Files/Storage/ILockingStorage.php (renamed from lib/public/files/storage/ilockingstorage.php) | 0 | ||||
-rw-r--r-- | lib/public/Files/Storage/IStorage.php (renamed from lib/public/files/storage/istorage.php) | 0 | ||||
-rw-r--r-- | lib/public/Files/Storage/IStorageFactory.php (renamed from lib/public/files/storage/istoragefactory.php) | 0 | ||||
-rw-r--r-- | lib/public/Files/StorageAuthException.php (renamed from lib/public/files/storageauthexception.php) | 0 | ||||
-rw-r--r-- | lib/public/Files/StorageBadConfigException.php (renamed from lib/public/files/storagebadconfigexception.php) | 0 | ||||
-rw-r--r-- | lib/public/Files/StorageConnectionException.php (renamed from lib/public/files/storageconnectionexception.php) | 0 | ||||
-rw-r--r-- | lib/public/Files/StorageInvalidException.php (renamed from lib/public/files/storageinvalidexception.php) | 0 | ||||
-rw-r--r-- | lib/public/Files/StorageNotAvailableException.php (renamed from lib/public/files/storagenotavailableexception.php) | 0 | ||||
-rw-r--r-- | lib/public/Files/StorageTimeoutException.php (renamed from lib/public/files/storagetimeoutexception.php) | 0 | ||||
-rw-r--r-- | lib/public/Http/Client/IClient.php (renamed from lib/public/http/client/iclient.php) | 0 | ||||
-rw-r--r-- | lib/public/Http/Client/IClientService.php (renamed from lib/public/http/client/iclientservice.php) | 0 | ||||
-rw-r--r-- | lib/public/Http/Client/IResponse.php (renamed from lib/public/http/client/iresponse.php) | 0 | ||||
-rw-r--r-- | lib/public/L10N/IFactory.php (renamed from lib/public/l10n/ifactory.php) | 0 | ||||
-rw-r--r-- | lib/public/Lock/ILockingProvider.php (renamed from lib/public/lock/ilockingprovider.php) | 0 | ||||
-rw-r--r-- | lib/public/Lock/LockedException.php (renamed from lib/public/lock/lockedexception.php) | 0 | ||||
-rw-r--r-- | tests/lib/authentication/token/defaulttokenmappertest.php | 18 | ||||
-rw-r--r-- | tests/lib/authentication/token/defaulttokenprovidertest.php | 10 | ||||
-rw-r--r-- | tests/lib/user/session.php | 22 |
88 files changed, 244 insertions, 77 deletions
diff --git a/apps/comments/l10n/it.js b/apps/comments/l10n/it.js index 112af1bedf5..27844003c03 100644 --- a/apps/comments/l10n/it.js +++ b/apps/comments/l10n/it.js @@ -3,7 +3,7 @@ OC.L10N.register( { "Type in a new comment..." : "Digita un nuovo commento...", "Delete comment" : "Elimina commento", - "Post" : "Commento", + "Post" : "Post", "Cancel" : "Annulla", "Edit comment" : "Modifica commento", "[Deleted user]" : "[Utente eliminato]", diff --git a/apps/comments/l10n/it.json b/apps/comments/l10n/it.json index e46f1b8b40a..73605cd6f03 100644 --- a/apps/comments/l10n/it.json +++ b/apps/comments/l10n/it.json @@ -1,7 +1,7 @@ { "translations": { "Type in a new comment..." : "Digita un nuovo commento...", "Delete comment" : "Elimina commento", - "Post" : "Commento", + "Post" : "Post", "Cancel" : "Annulla", "Edit comment" : "Modifica commento", "[Deleted user]" : "[Utente eliminato]", diff --git a/apps/federatedfilesharing/appinfo/app.php b/apps/federatedfilesharing/appinfo/app.php index 23af62037a3..4666d343f7e 100644 --- a/apps/federatedfilesharing/appinfo/app.php +++ b/apps/federatedfilesharing/appinfo/app.php @@ -19,7 +19,5 @@ * */ -namespace OCA\FederatedFileSharing\AppInfo; - -$app = new Application('federatedfilesharing'); +$app = new \OCA\FederatedFileSharing\AppInfo\Application('federatedfilesharing'); $app->registerSettings(); diff --git a/apps/federatedfilesharing/lib/addresshandler.php b/apps/federatedfilesharing/lib/AddressHandler.php index 92768f11b95..92768f11b95 100644 --- a/apps/federatedfilesharing/lib/addresshandler.php +++ b/apps/federatedfilesharing/lib/AddressHandler.php diff --git a/apps/federatedfilesharing/appinfo/application.php b/apps/federatedfilesharing/lib/AppInfo/Application.php index 5a213aec8e2..5a213aec8e2 100644 --- a/apps/federatedfilesharing/appinfo/application.php +++ b/apps/federatedfilesharing/lib/AppInfo/Application.php diff --git a/apps/federatedfilesharing/backgroundjob/unshare.php b/apps/federatedfilesharing/lib/BackgroundJob/UnShare.php index b056db4eac7..b056db4eac7 100644 --- a/apps/federatedfilesharing/backgroundjob/unshare.php +++ b/apps/federatedfilesharing/lib/BackgroundJob/UnShare.php diff --git a/apps/federatedfilesharing/lib/discoverymanager.php b/apps/federatedfilesharing/lib/DiscoveryManager.php index 51ea71195fa..51ea71195fa 100644 --- a/apps/federatedfilesharing/lib/discoverymanager.php +++ b/apps/federatedfilesharing/lib/DiscoveryManager.php diff --git a/apps/federatedfilesharing/lib/federatedshareprovider.php b/apps/federatedfilesharing/lib/FederatedShareProvider.php index d014a6219a3..d014a6219a3 100644 --- a/apps/federatedfilesharing/lib/federatedshareprovider.php +++ b/apps/federatedfilesharing/lib/FederatedShareProvider.php diff --git a/apps/federatedfilesharing/lib/notifications.php b/apps/federatedfilesharing/lib/Notifications.php index 9cdc7760361..9cdc7760361 100644 --- a/apps/federatedfilesharing/lib/notifications.php +++ b/apps/federatedfilesharing/lib/Notifications.php diff --git a/apps/federatedfilesharing/lib/tokenhandler.php b/apps/federatedfilesharing/lib/TokenHandler.php index ec5f73127d6..ec5f73127d6 100644 --- a/apps/federatedfilesharing/lib/tokenhandler.php +++ b/apps/federatedfilesharing/lib/TokenHandler.php diff --git a/apps/federatedfilesharing/tests/addresshandlertest.php b/apps/federatedfilesharing/tests/AddressHandlerTest.php index 9f7d8c49b4d..9f7d8c49b4d 100644 --- a/apps/federatedfilesharing/tests/addresshandlertest.php +++ b/apps/federatedfilesharing/tests/AddressHandlerTest.php diff --git a/apps/federatedfilesharing/tests/federatedshareprovidertest.php b/apps/federatedfilesharing/tests/FederatedShareProviderTest.php index 1fbae90a46f..1fbae90a46f 100644 --- a/apps/federatedfilesharing/tests/federatedshareprovidertest.php +++ b/apps/federatedfilesharing/tests/FederatedShareProviderTest.php diff --git a/apps/federatedfilesharing/tests/notificationstest.php b/apps/federatedfilesharing/tests/NotificationsTest.php index bde69a82bad..bde69a82bad 100644 --- a/apps/federatedfilesharing/tests/notificationstest.php +++ b/apps/federatedfilesharing/tests/NotificationsTest.php diff --git a/apps/federatedfilesharing/tests/tokenhandlertest.php b/apps/federatedfilesharing/tests/TokenHandlerTest.php index 490c0d95d7b..490c0d95d7b 100644 --- a/apps/federatedfilesharing/tests/tokenhandlertest.php +++ b/apps/federatedfilesharing/tests/TokenHandlerTest.php diff --git a/apps/files/l10n/lv.js b/apps/files/l10n/lv.js index 5efe5d6f2bd..fe8e21cbbcb 100644 --- a/apps/files/l10n/lv.js +++ b/apps/files/l10n/lv.js @@ -41,6 +41,8 @@ OC.L10N.register( "Select" : "Norādīt", "Pending" : "Gaida savu kārtu", "Unable to determine date" : "Neizdevās noteikt datumu", + "This operation is forbidden" : "Šī darbība ir aizliegta", + "This directory is unavailable, please check the logs or contact the administrator" : "Šis direktorijs nav pieejams, lūdzu pārbaudiet žurnālus vai sazinieties ar administratoru", "No entries in this folder match '{filter}'" : "Šajā mapē nekas nav atrasts, meklējot pēc '{filter}'", "Name" : "Nosaukums", "Size" : "Izmērs", diff --git a/apps/files/l10n/lv.json b/apps/files/l10n/lv.json index 3148589deb4..203491a591b 100644 --- a/apps/files/l10n/lv.json +++ b/apps/files/l10n/lv.json @@ -39,6 +39,8 @@ "Select" : "Norādīt", "Pending" : "Gaida savu kārtu", "Unable to determine date" : "Neizdevās noteikt datumu", + "This operation is forbidden" : "Šī darbība ir aizliegta", + "This directory is unavailable, please check the logs or contact the administrator" : "Šis direktorijs nav pieejams, lūdzu pārbaudiet žurnālus vai sazinieties ar administratoru", "No entries in this folder match '{filter}'" : "Šajā mapē nekas nav atrasts, meklējot pēc '{filter}'", "Name" : "Nosaukums", "Size" : "Izmērs", diff --git a/apps/files/l10n/ro.js b/apps/files/l10n/ro.js index a0ecbc06e27..fc27355e58f 100644 --- a/apps/files/l10n/ro.js +++ b/apps/files/l10n/ro.js @@ -30,6 +30,7 @@ OC.L10N.register( "Not enough free space, you are uploading {size1} but only {size2} is left" : "Spațiu liber insuficient, încărcați {size1} însă doar {size2} disponibil rămas", "Could not get result from server." : "Nu se poate obține rezultatul de la server.", "Uploading..." : "Încărcare", + "..." : "...", "File upload is in progress. Leaving the page now will cancel the upload." : "Fișierul este în curs de încărcare. Părăsirea paginii va întrerupe încărcarea.", "Actions" : "Acțiuni", "Download" : "Descarcă", diff --git a/apps/files/l10n/ro.json b/apps/files/l10n/ro.json index 6adf4eaac55..8187dad94a1 100644 --- a/apps/files/l10n/ro.json +++ b/apps/files/l10n/ro.json @@ -28,6 +28,7 @@ "Not enough free space, you are uploading {size1} but only {size2} is left" : "Spațiu liber insuficient, încărcați {size1} însă doar {size2} disponibil rămas", "Could not get result from server." : "Nu se poate obține rezultatul de la server.", "Uploading..." : "Încărcare", + "..." : "...", "File upload is in progress. Leaving the page now will cancel the upload." : "Fișierul este în curs de încărcare. Părăsirea paginii va întrerupe încărcarea.", "Actions" : "Acțiuni", "Download" : "Descarcă", diff --git a/apps/files_external/l10n/de.js b/apps/files_external/l10n/de.js index 003a2bd56b9..364a87b6a41 100644 --- a/apps/files_external/l10n/de.js +++ b/apps/files_external/l10n/de.js @@ -55,7 +55,7 @@ OC.L10N.register( "OAuth1" : "OAuth1", "App key" : "App-Schlüssel", "App secret" : "Geheime Zeichenkette der App", - "OAuth2" : "OAutch2", + "OAuth2" : "OAuth2", "Client ID" : "Client-ID", "Client secret" : "Geheime Zeichenkette des Client", "OpenStack" : "OpenStack", diff --git a/apps/files_external/l10n/de.json b/apps/files_external/l10n/de.json index a18205519fb..3ddc417e3b5 100644 --- a/apps/files_external/l10n/de.json +++ b/apps/files_external/l10n/de.json @@ -53,7 +53,7 @@ "OAuth1" : "OAuth1", "App key" : "App-Schlüssel", "App secret" : "Geheime Zeichenkette der App", - "OAuth2" : "OAutch2", + "OAuth2" : "OAuth2", "Client ID" : "Client-ID", "Client secret" : "Geheime Zeichenkette des Client", "OpenStack" : "OpenStack", diff --git a/apps/files_sharing/l10n/lv.js b/apps/files_sharing/l10n/lv.js index abc9d4ce301..41fcffb93ff 100644 --- a/apps/files_sharing/l10n/lv.js +++ b/apps/files_sharing/l10n/lv.js @@ -7,6 +7,22 @@ OC.L10N.register( "Could not authenticate to remote share, password might be wrong" : "Nesanāca autentificēties pie attālinātās koplietotnes, parole varētu būt nepareiza", "Storage not valid" : "Glabātuve nav derīga", "Couldn't add remote share" : "Nevarēja pievienot attālināto koplietotni", + "Share API is disabled" : "Koplietošanas API ir atslēgta", + "Wrong share ID, share doesn't exist" : "Nepareizs koplietošanas ID, koplietotne neeksistē", + "Could not delete share" : "Neizdevās dzēst koplietotni", + "Please specify a file or folder path" : "Lūdzu norādiet datnes vai mapes ceļu", + "Wrong path, file/folder doesn't exist" : "Nepareizs ceļš, datne/mape neeksistē", + "Please specify a valid user" : "Lūdzu norādiet derīgu lietotāju", + "Group sharing is disabled by the administrator" : "Administrators grupas koplietošanu ir atslēdzis", + "Please specify a valid group" : "Lūdzu norādiet derīgu grupu", + "Public link sharing is disabled by the administrator" : "Administrators publisku saites koplietošanu ir atslēdzis", + "Public upload disabled by the administrator" : "Administrators publisku augšupielādi ir atslēdzis", + "Public upload is only possible for publicly shared folders" : "Publiska augšupielāde iespējama tikai publiski koplietotām mapēm", + "Invalid date, date format must be YYYY-MM-DD" : "Nepareizs datums, datumam jābūt YYYY-MM-DD formātā", + "Unknown share type" : "Nezināms koplietošanas tips", + "Could not lock path" : "Nevarēja bloķēt ceļu", + "Can't change permissions for public share links" : "Publiskai koplietošanas saitei nevar mainīt tiesības", + "Cannot increase permissions" : "Nevar palielināt tiesības", "Shared with you" : "Koplietots ar tevi", "Shared with others" : "Koplietots ar citiem", "Shared by link" : "Koplietots ar saiti", @@ -21,6 +37,7 @@ OC.L10N.register( "Remote share password" : "Attālinātās koplietotnes parole", "Cancel" : "Atcelt", "Add remote share" : "Pievienot attālināto koplietotni", + "You can upload into this folder" : "Jūs variet augšuplādēt šajā mapē", "No ownCloud installation (7 or higher) found at {remote}" : "Nav atrasta neviena ownCloud (7. vai augstāka) instalācija {remote}", "Invalid ownCloud url" : "Nederīga ownCloud saite", "Shared by" : "Dalījās", @@ -28,6 +45,7 @@ OC.L10N.register( "A file or folder has been <strong>shared</strong>" : "<strong>Koplietota</strong> fails vai mape", "A file or folder was shared from <strong>another server</strong>" : "Fails vai mape tika koplietota no <strong>cita servera</strong>", "A public shared file or folder was <strong>downloaded</strong>" : "Publiski koplietots fails vai mape tika <strong>lejupielādēts</strong>", + "You received a new remote share %2$s from %1$s" : "Jūs saņēmāt jaunu attālinātu koplietotni %2$s no %1$s", "You received a new remote share from %s" : "Saņēmāt jaunu attālinātu koplietotni no %s", "%1$s accepted remote share %2$s" : "%1$s apstiprināja attālināto koplietotni %2$s", "%1$s declined remote share %2$s" : "%1$s noraidīja attālināto koplietotni %2$s", @@ -35,7 +53,13 @@ OC.L10N.register( "Public shared folder %1$s was downloaded" : "Publiski koplietota mape %1$s tika lejupielādēta", "Public shared file %1$s was downloaded" : "Publiski koplietots fails %1$s tika lejupielādēts", "You shared %1$s with %2$s" : "Tu koplietoji %1$s ar %2$s", + "%2$s shared %1$s with %3$s" : "%2$s koplietots %1$s ar %3$s", + "You removed the share of %2$s for %1$s" : "Tu noņēmi koplietošanu no %2$s priekš %1$s", + "%2$s removed the share of %3$s for %1$s" : "%2$s noņēma koplietošanu no %3$s priekš %1$s", "You shared %1$s with group %2$s" : "Tu koplietoji %1$s ar grupu %2$s", + "%2$s shared %1$s with group %3$s" : "%2$s koplietots %1$s ar grupu %3$s", + "You removed the share of group %2$s for %1$s" : "Tu noņēmi koplietošanu no grupas %2$s priekš %1$s", + "%2$s removed the share of group %3$s for %1$s" : "%2$s noņēma koplietošanu no gruapas %3$s priekš %1$s", "You shared %1$s via link" : "Tu koplietoji %1$s , izmantojot saiti", "%2$s shared %1$s with you" : "%2$s koplietoja %1$s ar tevi", "Shares" : "Koplietotie", diff --git a/apps/files_sharing/l10n/lv.json b/apps/files_sharing/l10n/lv.json index 5ea0c87b814..c4557eed842 100644 --- a/apps/files_sharing/l10n/lv.json +++ b/apps/files_sharing/l10n/lv.json @@ -5,6 +5,22 @@ "Could not authenticate to remote share, password might be wrong" : "Nesanāca autentificēties pie attālinātās koplietotnes, parole varētu būt nepareiza", "Storage not valid" : "Glabātuve nav derīga", "Couldn't add remote share" : "Nevarēja pievienot attālināto koplietotni", + "Share API is disabled" : "Koplietošanas API ir atslēgta", + "Wrong share ID, share doesn't exist" : "Nepareizs koplietošanas ID, koplietotne neeksistē", + "Could not delete share" : "Neizdevās dzēst koplietotni", + "Please specify a file or folder path" : "Lūdzu norādiet datnes vai mapes ceļu", + "Wrong path, file/folder doesn't exist" : "Nepareizs ceļš, datne/mape neeksistē", + "Please specify a valid user" : "Lūdzu norādiet derīgu lietotāju", + "Group sharing is disabled by the administrator" : "Administrators grupas koplietošanu ir atslēdzis", + "Please specify a valid group" : "Lūdzu norādiet derīgu grupu", + "Public link sharing is disabled by the administrator" : "Administrators publisku saites koplietošanu ir atslēdzis", + "Public upload disabled by the administrator" : "Administrators publisku augšupielādi ir atslēdzis", + "Public upload is only possible for publicly shared folders" : "Publiska augšupielāde iespējama tikai publiski koplietotām mapēm", + "Invalid date, date format must be YYYY-MM-DD" : "Nepareizs datums, datumam jābūt YYYY-MM-DD formātā", + "Unknown share type" : "Nezināms koplietošanas tips", + "Could not lock path" : "Nevarēja bloķēt ceļu", + "Can't change permissions for public share links" : "Publiskai koplietošanas saitei nevar mainīt tiesības", + "Cannot increase permissions" : "Nevar palielināt tiesības", "Shared with you" : "Koplietots ar tevi", "Shared with others" : "Koplietots ar citiem", "Shared by link" : "Koplietots ar saiti", @@ -19,6 +35,7 @@ "Remote share password" : "Attālinātās koplietotnes parole", "Cancel" : "Atcelt", "Add remote share" : "Pievienot attālināto koplietotni", + "You can upload into this folder" : "Jūs variet augšuplādēt šajā mapē", "No ownCloud installation (7 or higher) found at {remote}" : "Nav atrasta neviena ownCloud (7. vai augstāka) instalācija {remote}", "Invalid ownCloud url" : "Nederīga ownCloud saite", "Shared by" : "Dalījās", @@ -26,6 +43,7 @@ "A file or folder has been <strong>shared</strong>" : "<strong>Koplietota</strong> fails vai mape", "A file or folder was shared from <strong>another server</strong>" : "Fails vai mape tika koplietota no <strong>cita servera</strong>", "A public shared file or folder was <strong>downloaded</strong>" : "Publiski koplietots fails vai mape tika <strong>lejupielādēts</strong>", + "You received a new remote share %2$s from %1$s" : "Jūs saņēmāt jaunu attālinātu koplietotni %2$s no %1$s", "You received a new remote share from %s" : "Saņēmāt jaunu attālinātu koplietotni no %s", "%1$s accepted remote share %2$s" : "%1$s apstiprināja attālināto koplietotni %2$s", "%1$s declined remote share %2$s" : "%1$s noraidīja attālināto koplietotni %2$s", @@ -33,7 +51,13 @@ "Public shared folder %1$s was downloaded" : "Publiski koplietota mape %1$s tika lejupielādēta", "Public shared file %1$s was downloaded" : "Publiski koplietots fails %1$s tika lejupielādēts", "You shared %1$s with %2$s" : "Tu koplietoji %1$s ar %2$s", + "%2$s shared %1$s with %3$s" : "%2$s koplietots %1$s ar %3$s", + "You removed the share of %2$s for %1$s" : "Tu noņēmi koplietošanu no %2$s priekš %1$s", + "%2$s removed the share of %3$s for %1$s" : "%2$s noņēma koplietošanu no %3$s priekš %1$s", "You shared %1$s with group %2$s" : "Tu koplietoji %1$s ar grupu %2$s", + "%2$s shared %1$s with group %3$s" : "%2$s koplietots %1$s ar grupu %3$s", + "You removed the share of group %2$s for %1$s" : "Tu noņēmi koplietošanu no grupas %2$s priekš %1$s", + "%2$s removed the share of group %3$s for %1$s" : "%2$s noņēma koplietošanu no gruapas %3$s priekš %1$s", "You shared %1$s via link" : "Tu koplietoji %1$s , izmantojot saiti", "%2$s shared %1$s with you" : "%2$s koplietoja %1$s ar tevi", "Shares" : "Koplietotie", diff --git a/apps/files_trashbin/l10n/lv.js b/apps/files_trashbin/l10n/lv.js index 5629ba6af06..75b4eb9e9aa 100644 --- a/apps/files_trashbin/l10n/lv.js +++ b/apps/files_trashbin/l10n/lv.js @@ -8,6 +8,8 @@ OC.L10N.register( "Delete" : "Dzēst", "Delete permanently" : "Dzēst pavisam", "Error" : "Kļūda", + "This operation is forbidden" : "Šī darbība ir aizliegta", + "This directory is unavailable, please check the logs or contact the administrator" : "Šis direktorijs nav pieejams, lūdzu pārbaudiet žurnālus vai sazinieties ar administratoru", "restored" : "atjaunots", "No deleted files" : "Nav dzēstu failu", "You will be able to recover deleted files from here" : "No šejienes būs iespējams atgūt dzēstos failus", diff --git a/apps/files_trashbin/l10n/lv.json b/apps/files_trashbin/l10n/lv.json index 4cf941bd21e..22f0ac494f4 100644 --- a/apps/files_trashbin/l10n/lv.json +++ b/apps/files_trashbin/l10n/lv.json @@ -6,6 +6,8 @@ "Delete" : "Dzēst", "Delete permanently" : "Dzēst pavisam", "Error" : "Kļūda", + "This operation is forbidden" : "Šī darbība ir aizliegta", + "This directory is unavailable, please check the logs or contact the administrator" : "Šis direktorijs nav pieejams, lūdzu pārbaudiet žurnālus vai sazinieties ar administratoru", "restored" : "atjaunots", "No deleted files" : "Nav dzēstu failu", "You will be able to recover deleted files from here" : "No šejienes būs iespējams atgūt dzēstos failus", diff --git a/core/templates/filetemplates/template.odp b/core/templates/filetemplates/template.odp Binary files differindex f6371165b82..3800a491fa6 100644 --- a/core/templates/filetemplates/template.odp +++ b/core/templates/filetemplates/template.odp diff --git a/core/templates/filetemplates/template.ods b/core/templates/filetemplates/template.ods Binary files differindex e5e8b0bed8b..998ea21bd73 100644 --- a/core/templates/filetemplates/template.ods +++ b/core/templates/filetemplates/template.ods diff --git a/core/templates/filetemplates/template.odt b/core/templates/filetemplates/template.odt Binary files differindex cbb49a1cf3e..4717040fd89 100644 --- a/core/templates/filetemplates/template.odt +++ b/core/templates/filetemplates/template.odt diff --git a/lib/private/Authentication/Token/DefaultToken.php b/lib/private/Authentication/Token/DefaultToken.php index 25caf675a43..08451a46151 100644 --- a/lib/private/Authentication/Token/DefaultToken.php +++ b/lib/private/Authentication/Token/DefaultToken.php @@ -77,5 +77,14 @@ class DefaultToken extends Entity implements IToken { public function getUID() { return $this->uid; } + + /** + * Get the (encrypted) login password + * + * @return string + */ + public function getPassword() { + return parent::getPassword(); + } } diff --git a/lib/private/Authentication/Token/DefaultTokenMapper.php b/lib/private/Authentication/Token/DefaultTokenMapper.php index 18adbe48d78..9f173571270 100644 --- a/lib/private/Authentication/Token/DefaultTokenMapper.php +++ b/lib/private/Authentication/Token/DefaultTokenMapper.php @@ -26,6 +26,7 @@ use OCP\AppFramework\Db\DoesNotExistException; use OCP\AppFramework\Db\Mapper; use OCP\DB\QueryBuilder\IQueryBuilder; use OCP\IDBConnection; +use OCP\IUser; class DefaultTokenMapper extends Mapper { @@ -83,4 +84,31 @@ class DefaultTokenMapper extends Mapper { return DefaultToken::fromRow($data); } + /** + * Get all token of a user + * + * The provider may limit the number of result rows in case of an abuse + * where a high number of (session) tokens is generated + * + * @param IUser $user + * @return DefaultToken[] + */ + public function getTokenByUser(IUser $user) { + /* @var $qb IQueryBuilder */ + $qb = $this->db->getQueryBuilder(); + $qb->select('id', 'uid', 'password', 'name', 'type', 'token', 'last_activity') + ->from('authtoken') + ->where($qb->expr()->eq('uid', $qb->createNamedParameter($user->getUID()))) + ->setMaxResults(1000); + $result = $qb->execute(); + $data = $result->fetchAll(); + $result->closeCursor(); + + $entities = array_map(function ($row) { + return DefaultToken::fromRow($row); + }, $data); + + return $entities; + } + } diff --git a/lib/private/Authentication/Token/DefaultTokenProvider.php b/lib/private/Authentication/Token/DefaultTokenProvider.php index deca5b409e8..6c69d852d7b 100644 --- a/lib/private/Authentication/Token/DefaultTokenProvider.php +++ b/lib/private/Authentication/Token/DefaultTokenProvider.php @@ -28,6 +28,7 @@ use OCP\AppFramework\Db\DoesNotExistException; use OCP\AppFramework\Utility\ITimeFactory; use OCP\IConfig; use OCP\ILogger; +use OCP\IUser; use OCP\Security\ICrypto; class DefaultTokenProvider implements IProvider { @@ -103,25 +104,40 @@ class DefaultTokenProvider implements IProvider { } /** - * @param string $token + * Get all token of a user + * + * The provider may limit the number of result rows in case of an abuse + * where a high number of (session) tokens is generated + * + * @param IUser $user + * @return IToken[] + */ + public function getTokenByUser(IUser $user) { + return $this->mapper->getTokenByUser($user); + } + + /** + * Get a token by token id + * + * @param string $tokenId * @throws InvalidTokenException * @return DefaultToken */ - public function getToken($token) { + public function getToken($tokenId) { try { - return $this->mapper->getToken($this->hashToken($token)); + return $this->mapper->getToken($this->hashToken($tokenId)); } catch (DoesNotExistException $ex) { throw new InvalidTokenException(); } } /** - * @param DefaultToken $savedToken - * @param string $token session token + * @param IToken $savedToken + * @param string $tokenId session token * @return string */ - public function getPassword(DefaultToken $savedToken, $token) { - return $this->decryptPassword($savedToken->getPassword(), $token); + public function getPassword(IToken $savedToken, $tokenId) { + return $this->decryptPassword($savedToken->getPassword(), $tokenId); } /** diff --git a/lib/private/Authentication/Token/IProvider.php b/lib/private/Authentication/Token/IProvider.php index f8a3262ca8b..a5c5faa5639 100644 --- a/lib/private/Authentication/Token/IProvider.php +++ b/lib/private/Authentication/Token/IProvider.php @@ -23,10 +23,32 @@ namespace OC\Authentication\Token; use OC\Authentication\Exceptions\InvalidTokenException; +use OCP\IUser; interface IProvider { /** + * Create and persist a new token + * + * @param string $token + * @param string $uid + * @param string $password + * @param string $name + * @param int $type token type + * @return DefaultToken + */ + public function generateToken($token, $uid, $password, $name, $type = IToken::TEMPORARY_TOKEN); + + /** + * Get a token by token id + * + * @param string $tokenId + * @throws InvalidTokenException + * @return IToken + */ + public function getToken($tokenId) ; + + /** * @param string $token * @throws InvalidTokenException * @return IToken @@ -34,9 +56,36 @@ interface IProvider { public function validateToken($token); /** + * Invalidate (delete) the given session token + * + * @param string $token + */ + public function invalidateToken($token); + + /** * Update token activity timestamp * * @param IToken $token */ public function updateToken(IToken $token); + + /** + * Get all token of a user + * + * The provider may limit the number of result rows in case of an abuse + * where a high number of (session) tokens is generated + * + * @param IUser $user + * @return IToken[] + */ + public function getTokenByUser(IUser $user); + + /** + * Get the (unencrypted) password of the given token + * + * @param IToken $token + * @param string $tokenId + * @return string + */ + public function getPassword(IToken $token, $tokenId); } diff --git a/lib/private/Authentication/Token/IToken.php b/lib/private/Authentication/Token/IToken.php index 9b2bd18f83b..2a01ea75ea9 100644 --- a/lib/private/Authentication/Token/IToken.php +++ b/lib/private/Authentication/Token/IToken.php @@ -22,9 +22,6 @@ namespace OC\Authentication\Token; -/** - * @since 9.1.0 - */ interface IToken { const TEMPORARY_TOKEN = 0; @@ -43,4 +40,11 @@ interface IToken { * @return string */ public function getUID(); + + /** + * Get the (encrypted) login password + * + * @return string + */ + public function getPassword(); } diff --git a/lib/private/Cache/File.php b/lib/private/Cache/File.php index 989e05275b7..38f88959bd7 100644 --- a/lib/private/Cache/File.php +++ b/lib/private/Cache/File.php @@ -172,7 +172,9 @@ class File implements ICache { public function gc() { $storage = $this->getStorage(); if ($storage and $storage->is_dir('/')) { - $now = time(); + // extra hour safety, in case of stray part chunks that take longer to write, + // because touch() is only called after the chunk was finished + $now = time() - 3600; $dh = $storage->opendir('/'); if (!is_resource($dh)) { return null; diff --git a/lib/private/Server.php b/lib/private/Server.php index 8ece9addd3d..a4294ee2c88 100644 --- a/lib/private/Server.php +++ b/lib/private/Server.php @@ -231,15 +231,11 @@ class Server extends ServerContainer implements IServerContainer { // might however be called when ownCloud is not yet setup. if (\OC::$server->getSystemConfig()->getValue('installed', false)) { $defaultTokenProvider = $c->query('OC\Authentication\Token\DefaultTokenProvider'); - $tokenProviders = [ - $defaultTokenProvider, - ]; } else { $defaultTokenProvider = null; - $tokenProviders = []; } - $userSession = new \OC\User\Session($manager, $session, $timeFactory, $defaultTokenProvider, $tokenProviders); + $userSession = new \OC\User\Session($manager, $session, $timeFactory, $defaultTokenProvider); $userSession->listen('\OC\User', 'preCreateUser', function ($uid, $password) { \OC_Hook::emit('OC_User', 'pre_createUser', array('run' => true, 'uid' => $uid, 'password' => $password)); }); diff --git a/lib/private/User/Session.php b/lib/private/User/Session.php index c9f42d7e414..3f074fa8adf 100644 --- a/lib/private/User/Session.php +++ b/lib/private/User/Session.php @@ -35,7 +35,6 @@ namespace OC\User; use OC; use OC\Authentication\Exceptions\InvalidTokenException; -use OC\Authentication\Token\DefaultTokenProvider; use OC\Authentication\Token\IProvider; use OC\Authentication\Token\IToken; use OC\Hooks\Emitter; @@ -69,35 +68,20 @@ use OCP\Session\Exceptions\SessionNotAvailableException; * @package OC\User */ class Session implements IUserSession, Emitter { - /* - * @var Manager $manager - */ - + + /** @var Manager $manager */ private $manager; - /* - * @var ISession $session - */ + /** @var ISession $session */ private $session; - /* - * @var ITimeFactory - */ + /** @var ITimeFactory */ private $timeFacory; - /** - * @var DefaultTokenProvider - */ + /** @var IProvider */ private $tokenProvider; - /** - * @var IProvider[] - */ - private $tokenProviders; - - /** - * @var User $activeUser - */ + /** @var User $activeUser */ protected $activeUser; /** @@ -105,20 +89,18 @@ class Session implements IUserSession, Emitter { * @param ISession $session * @param ITimeFactory $timeFacory * @param IProvider $tokenProvider - * @param IProvider[] $tokenProviders */ - public function __construct(IUserManager $manager, ISession $session, ITimeFactory $timeFacory, $tokenProvider, array $tokenProviders = []) { + public function __construct(IUserManager $manager, ISession $session, ITimeFactory $timeFacory, $tokenProvider) { $this->manager = $manager; $this->session = $session; $this->timeFacory = $timeFacory; $this->tokenProvider = $tokenProvider; - $this->tokenProviders = $tokenProviders; } /** - * @param DefaultTokenProvider $provider + * @param IProvider $provider */ - public function setTokenProvider(DefaultTokenProvider $provider) { + public function setTokenProvider(IProvider $provider) { $this->tokenProvider = $provider; } @@ -246,7 +228,7 @@ class Session implements IUserSession, Emitter { } // Session is valid, so the token can be refreshed - $this->updateToken($this->tokenProvider, $token); + $this->updateToken($token); } /** @@ -418,34 +400,31 @@ class Session implements IUserSession, Emitter { * @return boolean */ private function validateToken($token) { - foreach ($this->tokenProviders as $provider) { - try { - $token = $provider->validateToken($token); - if (!is_null($token)) { - $result = $this->loginWithToken($token->getUID()); - if ($result) { - // Login success - $this->updateToken($provider, $token); - return true; - } + try { + $token = $this->tokenProvider->validateToken($token); + if (!is_null($token)) { + $result = $this->loginWithToken($token->getUID()); + if ($result) { + // Login success + $this->updateToken($token); + return true; } - } catch (InvalidTokenException $ex) { - } + } catch (InvalidTokenException $ex) { + } return false; } /** - * @param IProvider $provider * @param IToken $token */ - private function updateToken(IProvider $provider, IToken $token) { + private function updateToken(IToken $token) { // To save unnecessary DB queries, this is only done once a minute $lastTokenUpdate = $this->session->get('last_token_update') ? : 0; $now = $this->timeFacory->getTime(); if ($lastTokenUpdate < ($now - 60)) { - $provider->updateToken($token); + $this->tokenProvider->updateToken($token); $this->session->set('last_token_update', $now); } } diff --git a/lib/public/files/alreadyexistsexception.php b/lib/public/Files/AlreadyExistsException.php index 243129cb1db..243129cb1db 100644 --- a/lib/public/files/alreadyexistsexception.php +++ b/lib/public/Files/AlreadyExistsException.php diff --git a/lib/public/files/cache/icache.php b/lib/public/Files/Cache/ICache.php index 4ef88f6480f..4ef88f6480f 100644 --- a/lib/public/files/cache/icache.php +++ b/lib/public/Files/Cache/ICache.php diff --git a/lib/public/files/cache/icacheentry.php b/lib/public/Files/Cache/ICacheEntry.php index 00c8e201b9a..00c8e201b9a 100644 --- a/lib/public/files/cache/icacheentry.php +++ b/lib/public/Files/Cache/ICacheEntry.php diff --git a/lib/public/files/cache/ipropagator.php b/lib/public/Files/Cache/IPropagator.php index 5494ec9a54e..5494ec9a54e 100644 --- a/lib/public/files/cache/ipropagator.php +++ b/lib/public/Files/Cache/IPropagator.php diff --git a/lib/public/files/cache/iscanner.php b/lib/public/Files/Cache/IScanner.php index ce1f408028c..ce1f408028c 100644 --- a/lib/public/files/cache/iscanner.php +++ b/lib/public/Files/Cache/IScanner.php diff --git a/lib/public/files/cache/iupdater.php b/lib/public/Files/Cache/IUpdater.php index 5267aa6f023..5267aa6f023 100644 --- a/lib/public/files/cache/iupdater.php +++ b/lib/public/Files/Cache/IUpdater.php diff --git a/lib/public/files/cache/iwatcher.php b/lib/public/Files/Cache/IWatcher.php index c33129a2473..c33129a2473 100644 --- a/lib/public/files/cache/iwatcher.php +++ b/lib/public/Files/Cache/IWatcher.php diff --git a/lib/public/files/config/icachedmountinfo.php b/lib/public/Files/Config/ICachedMountInfo.php index e09c1a7f014..e09c1a7f014 100644 --- a/lib/public/files/config/icachedmountinfo.php +++ b/lib/public/Files/Config/ICachedMountInfo.php diff --git a/lib/public/files/config/ihomemountprovider.php b/lib/public/Files/Config/IHomeMountProvider.php index bedcd3cfacc..bedcd3cfacc 100644 --- a/lib/public/files/config/ihomemountprovider.php +++ b/lib/public/Files/Config/IHomeMountProvider.php diff --git a/lib/public/files/config/imountprovider.php b/lib/public/Files/Config/IMountProvider.php index d1498fd5f61..d1498fd5f61 100644 --- a/lib/public/files/config/imountprovider.php +++ b/lib/public/Files/Config/IMountProvider.php diff --git a/lib/public/files/config/imountprovidercollection.php b/lib/public/Files/Config/IMountProviderCollection.php index 29208cb6f53..29208cb6f53 100644 --- a/lib/public/files/config/imountprovidercollection.php +++ b/lib/public/Files/Config/IMountProviderCollection.php diff --git a/lib/public/files/config/iusermountcache.php b/lib/public/Files/Config/IUserMountCache.php index 2f2c11da1a0..2f2c11da1a0 100644 --- a/lib/public/files/config/iusermountcache.php +++ b/lib/public/Files/Config/IUserMountCache.php diff --git a/lib/public/files/entitytoolargeexception.php b/lib/public/Files/EntityTooLargeException.php index 8dabc08f8bb..8dabc08f8bb 100644 --- a/lib/public/files/entitytoolargeexception.php +++ b/lib/public/Files/EntityTooLargeException.php diff --git a/lib/public/files/file.php b/lib/public/Files/File.php index 553dd48c24f..553dd48c24f 100644 --- a/lib/public/files/file.php +++ b/lib/public/Files/File.php diff --git a/lib/public/files/fileinfo.php b/lib/public/Files/FileInfo.php index a9f05863e78..a9f05863e78 100644 --- a/lib/public/files/fileinfo.php +++ b/lib/public/Files/FileInfo.php diff --git a/lib/public/files/filenametoolongexception.php b/lib/public/Files/FileNameTooLongException.php index 68fba4ad516..68fba4ad516 100644 --- a/lib/public/files/filenametoolongexception.php +++ b/lib/public/Files/FileNameTooLongException.php diff --git a/lib/public/files/folder.php b/lib/public/Files/Folder.php index 0644ab62034..0644ab62034 100644 --- a/lib/public/files/folder.php +++ b/lib/public/Files/Folder.php diff --git a/lib/public/files/forbiddenexception.php b/lib/public/Files/ForbiddenException.php index 5a4f03d176d..5a4f03d176d 100644 --- a/lib/public/files/forbiddenexception.php +++ b/lib/public/Files/ForbiddenException.php diff --git a/lib/public/files/ihomestorage.php b/lib/public/Files/IHomeStorage.php index 4101545aafe..4101545aafe 100644 --- a/lib/public/files/ihomestorage.php +++ b/lib/public/Files/IHomeStorage.php diff --git a/lib/public/files/imimetypedetector.php b/lib/public/Files/IMimeTypeDetector.php index 7d9cd606e69..7d9cd606e69 100644 --- a/lib/public/files/imimetypedetector.php +++ b/lib/public/Files/IMimeTypeDetector.php diff --git a/lib/public/files/imimetypeloader.php b/lib/public/Files/IMimeTypeLoader.php index 57a6d7ba309..57a6d7ba309 100644 --- a/lib/public/files/imimetypeloader.php +++ b/lib/public/Files/IMimeTypeLoader.php diff --git a/lib/public/files/irootfolder.php b/lib/public/Files/IRootFolder.php index 3b6243f7638..3b6243f7638 100644 --- a/lib/public/files/irootfolder.php +++ b/lib/public/Files/IRootFolder.php diff --git a/lib/public/files/invalidcharacterinpathexception.php b/lib/public/Files/InvalidCharacterInPathException.php index 8e649b5bb62..8e649b5bb62 100644 --- a/lib/public/files/invalidcharacterinpathexception.php +++ b/lib/public/Files/InvalidCharacterInPathException.php diff --git a/lib/public/files/invalidcontentexception.php b/lib/public/Files/InvalidContentException.php index f25b7fef87f..f25b7fef87f 100644 --- a/lib/public/files/invalidcontentexception.php +++ b/lib/public/Files/InvalidContentException.php diff --git a/lib/public/files/invalidpathexception.php b/lib/public/Files/InvalidPathException.php index ee21d7432be..ee21d7432be 100644 --- a/lib/public/files/invalidpathexception.php +++ b/lib/public/Files/InvalidPathException.php diff --git a/lib/public/files/locknotacquiredexception.php b/lib/public/Files/LockNotAcquiredException.php index 247c9f5f5cb..247c9f5f5cb 100644 --- a/lib/public/files/locknotacquiredexception.php +++ b/lib/public/Files/LockNotAcquiredException.php diff --git a/lib/public/files/mount/imountmanager.php b/lib/public/Files/Mount/IMountManager.php index 9e3002a26d1..9e3002a26d1 100644 --- a/lib/public/files/mount/imountmanager.php +++ b/lib/public/Files/Mount/IMountManager.php diff --git a/lib/public/files/mount/imountpoint.php b/lib/public/Files/Mount/IMountPoint.php index bc7bf81709f..bc7bf81709f 100644 --- a/lib/public/files/mount/imountpoint.php +++ b/lib/public/Files/Mount/IMountPoint.php diff --git a/lib/public/files/node.php b/lib/public/Files/Node.php index c69077c7f2a..c69077c7f2a 100644 --- a/lib/public/files/node.php +++ b/lib/public/Files/Node.php diff --git a/lib/public/files/notenoughspaceexception.php b/lib/public/Files/NotEnoughSpaceException.php index 4e67ac26700..4e67ac26700 100644 --- a/lib/public/files/notenoughspaceexception.php +++ b/lib/public/Files/NotEnoughSpaceException.php diff --git a/lib/public/files/notfoundexception.php b/lib/public/Files/NotFoundException.php index 10a3dacda44..10a3dacda44 100644 --- a/lib/public/files/notfoundexception.php +++ b/lib/public/Files/NotFoundException.php diff --git a/lib/public/files/notpermittedexception.php b/lib/public/Files/NotPermittedException.php index 3dcbd9e499b..3dcbd9e499b 100644 --- a/lib/public/files/notpermittedexception.php +++ b/lib/public/Files/NotPermittedException.php diff --git a/lib/public/files/objectstore/iobjectstore.php b/lib/public/Files/ObjectStore/IObjectStore.php index 78be18fb2e9..78be18fb2e9 100644 --- a/lib/public/files/objectstore/iobjectstore.php +++ b/lib/public/Files/ObjectStore/IObjectStore.php diff --git a/lib/public/files/reservedwordexception.php b/lib/public/Files/ReservedWordException.php index 6a560a563fe..6a560a563fe 100644 --- a/lib/public/files/reservedwordexception.php +++ b/lib/public/Files/ReservedWordException.php diff --git a/lib/public/files/storage.php b/lib/public/Files/Storage.php index 2511690b7d3..2511690b7d3 100644 --- a/lib/public/files/storage.php +++ b/lib/public/Files/Storage.php diff --git a/lib/public/files/storage/ilockingstorage.php b/lib/public/Files/Storage/ILockingStorage.php index 7c46391f425..7c46391f425 100644 --- a/lib/public/files/storage/ilockingstorage.php +++ b/lib/public/Files/Storage/ILockingStorage.php diff --git a/lib/public/files/storage/istorage.php b/lib/public/Files/Storage/IStorage.php index ab1915bb93e..ab1915bb93e 100644 --- a/lib/public/files/storage/istorage.php +++ b/lib/public/Files/Storage/IStorage.php diff --git a/lib/public/files/storage/istoragefactory.php b/lib/public/Files/Storage/IStorageFactory.php index 01a05eeff12..01a05eeff12 100644 --- a/lib/public/files/storage/istoragefactory.php +++ b/lib/public/Files/Storage/IStorageFactory.php diff --git a/lib/public/files/storageauthexception.php b/lib/public/Files/StorageAuthException.php index 35a2907b856..35a2907b856 100644 --- a/lib/public/files/storageauthexception.php +++ b/lib/public/Files/StorageAuthException.php diff --git a/lib/public/files/storagebadconfigexception.php b/lib/public/Files/StorageBadConfigException.php index 1c340b18b7c..1c340b18b7c 100644 --- a/lib/public/files/storagebadconfigexception.php +++ b/lib/public/Files/StorageBadConfigException.php diff --git a/lib/public/files/storageconnectionexception.php b/lib/public/Files/StorageConnectionException.php index 8938a60265c..8938a60265c 100644 --- a/lib/public/files/storageconnectionexception.php +++ b/lib/public/Files/StorageConnectionException.php diff --git a/lib/public/files/storageinvalidexception.php b/lib/public/Files/StorageInvalidException.php index a34ee7ae49a..a34ee7ae49a 100644 --- a/lib/public/files/storageinvalidexception.php +++ b/lib/public/Files/StorageInvalidException.php diff --git a/lib/public/files/storagenotavailableexception.php b/lib/public/Files/StorageNotAvailableException.php index 7afb067f298..7afb067f298 100644 --- a/lib/public/files/storagenotavailableexception.php +++ b/lib/public/Files/StorageNotAvailableException.php diff --git a/lib/public/files/storagetimeoutexception.php b/lib/public/Files/StorageTimeoutException.php index ed4d98af89b..ed4d98af89b 100644 --- a/lib/public/files/storagetimeoutexception.php +++ b/lib/public/Files/StorageTimeoutException.php diff --git a/lib/public/http/client/iclient.php b/lib/public/Http/Client/IClient.php index 85db2a9ad02..85db2a9ad02 100644 --- a/lib/public/http/client/iclient.php +++ b/lib/public/Http/Client/IClient.php diff --git a/lib/public/http/client/iclientservice.php b/lib/public/Http/Client/IClientService.php index 907aa42fd3b..907aa42fd3b 100644 --- a/lib/public/http/client/iclientservice.php +++ b/lib/public/Http/Client/IClientService.php diff --git a/lib/public/http/client/iresponse.php b/lib/public/Http/Client/IResponse.php index 09189d77014..09189d77014 100644 --- a/lib/public/http/client/iresponse.php +++ b/lib/public/Http/Client/IResponse.php diff --git a/lib/public/l10n/ifactory.php b/lib/public/L10N/IFactory.php index 264c9719639..264c9719639 100644 --- a/lib/public/l10n/ifactory.php +++ b/lib/public/L10N/IFactory.php diff --git a/lib/public/lock/ilockingprovider.php b/lib/public/Lock/ILockingProvider.php index b4b579bbc7a..b4b579bbc7a 100644 --- a/lib/public/lock/ilockingprovider.php +++ b/lib/public/Lock/ILockingProvider.php diff --git a/lib/public/lock/lockedexception.php b/lib/public/Lock/LockedException.php index d084046046e..d084046046e 100644 --- a/lib/public/lock/lockedexception.php +++ b/lib/public/Lock/LockedException.php diff --git a/tests/lib/authentication/token/defaulttokenmappertest.php b/tests/lib/authentication/token/defaulttokenmappertest.php index 9a21e143fb4..e17149a5c1b 100644 --- a/tests/lib/authentication/token/defaulttokenmappertest.php +++ b/tests/lib/authentication/token/defaulttokenmappertest.php @@ -141,4 +141,22 @@ class DefaultTokenMapperTest extends TestCase { $this->mapper->getToken($token); } + public function testGetTokenByUser() { + $user = $this->getMock('\OCP\IUser'); + $user->expects($this->once()) + ->method('getUID') + ->will($this->returnValue('user1')); + + $this->assertCount(2, $this->mapper->getTokenByUser($user)); + } + + public function testGetTokenByUserNotFound() { + $user = $this->getMock('\OCP\IUser'); + $user->expects($this->once()) + ->method('getUID') + ->will($this->returnValue('user1000')); + + $this->assertCount(0, $this->mapper->getTokenByUser($user)); + } + } diff --git a/tests/lib/authentication/token/defaulttokenprovidertest.php b/tests/lib/authentication/token/defaulttokenprovidertest.php index 1902227a4fa..eeb249cfa8a 100644 --- a/tests/lib/authentication/token/defaulttokenprovidertest.php +++ b/tests/lib/authentication/token/defaulttokenprovidertest.php @@ -103,6 +103,16 @@ class DefaultTokenProviderTest extends TestCase { $this->assertEquals($this->time, $tk->getLastActivity()); } + + public function testGetTokenByUser() { + $user = $this->getMock('\OCP\IUser'); + $this->mapper->expects($this->once()) + ->method('getTokenByUser') + ->with($user) + ->will($this->returnValue(['token'])); + + $this->assertEquals(['token'], $this->tokenProvider->getTokenByUser($user)); + } public function testGetPassword() { $token = 'token1234'; diff --git a/tests/lib/user/session.php b/tests/lib/user/session.php index c6ddeb416fb..710d5ae20b3 100644 --- a/tests/lib/user/session.php +++ b/tests/lib/user/session.php @@ -88,7 +88,7 @@ class Session extends \Test\TestCase { ->with($expectedUser->getUID()) ->will($this->returnValue($expectedUser)); - $userSession = new \OC\User\Session($manager, $session, $this->timeFactory, $this->defaultProvider, [$this->defaultProvider]); + $userSession = new \OC\User\Session($manager, $session, $this->timeFactory, $this->defaultProvider); $user = $userSession->getUser(); $this->assertSame($expectedUser, $user); } @@ -111,7 +111,7 @@ class Session extends \Test\TestCase { ->getMock(); $userSession = $this->getMockBuilder('\OC\User\Session') - ->setConstructorArgs([$manager, $session, $this->timeFactory, $this->defaultProvider, [$this->defaultProvider]]) + ->setConstructorArgs([$manager, $session, $this->timeFactory, $this->defaultProvider]) ->setMethods([ 'getUser' ]) @@ -138,7 +138,7 @@ class Session extends \Test\TestCase { ->method('getUID') ->will($this->returnValue('foo')); - $userSession = new \OC\User\Session($manager, $session, $this->timeFactory, $this->defaultProvider, [$this->defaultProvider]); + $userSession = new \OC\User\Session($manager, $session, $this->timeFactory, $this->defaultProvider); $userSession->setUser($user); } @@ -190,7 +190,7 @@ class Session extends \Test\TestCase { ->will($this->returnValue($user)); $userSession = $this->getMockBuilder('\OC\User\Session') - ->setConstructorArgs([$manager, $session, $this->timeFactory, $this->defaultProvider, [$this->defaultProvider]]) + ->setConstructorArgs([$manager, $session, $this->timeFactory, $this->defaultProvider]) ->setMethods([ 'prepareUserLogin' ]) @@ -237,7 +237,7 @@ class Session extends \Test\TestCase { ->with('foo', 'bar') ->will($this->returnValue($user)); - $userSession = new \OC\User\Session($manager, $session, $this->timeFactory, $this->defaultProvider, [$this->defaultProvider]); + $userSession = new \OC\User\Session($manager, $session, $this->timeFactory, $this->defaultProvider); $userSession->login('foo', 'bar'); } @@ -273,7 +273,7 @@ class Session extends \Test\TestCase { ->with('foo', 'bar') ->will($this->returnValue(false)); - $userSession = new \OC\User\Session($manager, $session, $this->timeFactory, $this->defaultProvider, [$this->defaultProvider]); + $userSession = new \OC\User\Session($manager, $session, $this->timeFactory, $this->defaultProvider); $userSession->login('foo', 'bar'); } @@ -293,7 +293,7 @@ class Session extends \Test\TestCase { ->with('foo', 'bar') ->will($this->returnValue(false)); - $userSession = new \OC\User\Session($manager, $session, $this->timeFactory, $this->defaultProvider, [$this->defaultProvider]); + $userSession = new \OC\User\Session($manager, $session, $this->timeFactory, $this->defaultProvider); $userSession->login('foo', 'bar'); } @@ -348,7 +348,7 @@ class Session extends \Test\TestCase { //override, otherwise tests will fail because of setcookie() array('setMagicInCookie'), //there are passed as parameters to the constructor - array($manager, $session, $this->timeFactory, $this->defaultProvider, [$this->defaultProvider])); + array($manager, $session, $this->timeFactory, $this->defaultProvider)); $granted = $userSession->loginWithCookie('foo', $token); @@ -393,7 +393,7 @@ class Session extends \Test\TestCase { $token = 'goodToken'; \OC::$server->getConfig()->setUserValue('foo', 'login_token', $token, time()); - $userSession = new \OC\User\Session($manager, $session, $this->timeFactory, $this->defaultProvider, [$this->defaultProvider]); + $userSession = new \OC\User\Session($manager, $session, $this->timeFactory, $this->defaultProvider); $granted = $userSession->loginWithCookie('foo', 'badToken'); $this->assertSame($granted, false); @@ -436,7 +436,7 @@ class Session extends \Test\TestCase { $token = 'goodToken'; \OC::$server->getConfig()->setUserValue('foo', 'login_token', $token, time()); - $userSession = new \OC\User\Session($manager, $session, $this->timeFactory, $this->defaultProvider, [$this->defaultProvider]); + $userSession = new \OC\User\Session($manager, $session, $this->timeFactory, $this->defaultProvider); $granted = $userSession->loginWithCookie('foo', $token); $this->assertSame($granted, false); @@ -461,7 +461,7 @@ class Session extends \Test\TestCase { $session = new Memory(''); $session->set('user_id', 'foo'); $userSession = $this->getMockBuilder('\OC\User\Session') - ->setConstructorArgs([$manager, $session, $this->timeFactory, $this->defaultProvider, [$this->defaultProvider]]) + ->setConstructorArgs([$manager, $session, $this->timeFactory, $this->defaultProvider]) ->setMethods([ 'validateSession' ]) |