Commit graph

718 commits

Author SHA1 Message Date
Thomas Müller
e5b5eca5a9 Merge pull request #22787 from owncloud/versions-fixmtimetooltip
Fix tooltip for versions mtime
2016-03-07 14:41:46 +01:00
Lukas Reschke
72c8187cbb Keep "encryptedVersion" when calling \OC\Files\View::copy
When calling `\OC\Files\View::copy` we should also keep the version to ensure that the file will always have the correct version attached and can be successfully decrypted.

To test this the following steps are necessary (from https://github.com/owncloud/core/issues/22781#issuecomment-191328982):

1. setup a new ownCloud 9.0 beta2
2. enable encryption
2. upload a docx (5.7MB large)
3. upload the same file again and overwrite the existing file
4. I can download the original file and the first version
5. I restore the first version
6. restored version can no longer be downloaded with the error described above

The manual cache operation in `\OCA\Files_Versions\Storage` is unfortunately necessary since `\OCA\Files_Versions\Storage::copyFileContents` is not using `\OCP\Files\Storage::moveFromStorage` in the case when an object storage is used. Due to the workaround added in 54cea05271 the stream is directly copied and thus bypassing the FS.
2016-03-03 14:15:36 +01:00
Vincent Petry
03b90cec35 Fix tooltip for versions mtime
It was missing a call to jquery.tooltip
2016-03-02 17:50:46 +01:00
Joas Schilling
8885cb1eb9 Increase all versions on master which is now 9.1 2016-03-02 08:53:42 +01:00
Lukas Reschke
c353d51810 Remove Scrutinizer Auto Fixer 2016-03-01 17:48:23 +01:00
Lukas Reschke
933f60e314 Update author information
Probably nice for the people that contributed to 9.0 to see themselves in the AUTHORS file :)
2016-03-01 17:25:15 +01:00
Jenkins for ownCloud
32f4bea0ae [tx-robot] updated from transifex 2016-02-25 01:58:06 -05:00
Bjoern Schiessle
4ef035cc61 make sure that the file name doesn't end with a trailing slash. Can for example happen single files shared across servers 2016-02-19 13:15:09 +01:00
Bjoern Schiessle
ac1c3d27b7 get the actual user instead of a federated cloud id
$view->getUidAndFilename($filename); returns the federated cloud id in case of
a federated share. But in this case we need the local user who "owns" the file
which is the current logged in user in case of a federated share
2016-02-18 10:16:59 +01:00
Thomas Müller
10613f7265 Merge pull request #22273 from owncloud/versions-fixpathasrecipient
Fix versions path as share recipient when different than owner path
2016-02-10 17:25:14 +01:00
Vincent Petry
1b9e291913 Use full path of known file when handling versions
Instead of relying on the versions API response, use the known file path
when populating version models.
2016-02-10 13:39:25 +01:00
Vincent Petry
a6f997ddae Remove path from versions response
The path attribute contains the path relative to the owner's home
folder, not the one from the recipient, which is useless for the client
and needlessly discloses the owner's original path.

The requested already has access to the full path of the file, so no
need to add it to the response.
2016-02-10 13:38:38 +01:00
Lukas Reschke
762636efcd Use cache directly instead of QB
In case somebody does not use oc_filecache
2016-02-10 12:30:39 +01:00
Lukas Reschke
5ccb9dfa7e Use database for keeping track of the version 2016-02-09 23:43:27 +01:00
Arthur Schiwon
3a796d1e15 Consolidate getQuota and setQuota methods in User instance 2016-02-09 17:16:43 +01:00
Arthur Schiwon
d2d6644702 use int values and constants instead of strings 2016-02-08 18:16:27 +01:00
Arthur Schiwon
b6e03fe261 versions provide more information when throwing hooks 2016-02-08 16:33:49 +01:00
Robin Appelman
1369f2c684 cleanup shared cache 2016-01-28 11:46:43 +01:00
Thomas Müller
6824704699 Merge pull request #21117 from owncloud/owner-file-exists
Only return an owner if the file exists + improved getUidAndFilename
2016-01-15 13:31:56 +01:00
Robin Appelman
5d0451b848 Safe teardowns 2016-01-14 12:54:42 +01:00
Thomas Müller
682821c71e Happy new year! 2016-01-12 15:02:18 +01:00
Robin Appelman
94200b682c removed unused imports 2016-01-11 11:40:58 +01:00
Robin Appelman
282f67dad1 improve handling of non existing files in the trashbin 2016-01-11 11:40:58 +01:00
Robin Appelman
300eb54c87 de-deplicate getUidAndFilename 2016-01-11 11:40:58 +01:00
Jenkins for ownCloud
72b34575df [tx-robot] updated from transifex 2016-01-09 01:55:50 -05:00
Thomas Müller
1cc6fddead Merge pull request #21498 from owncloud/cleanup-OC_DB
Cleanup OC_DB methods
2016-01-07 20:13:16 +01:00
Joas Schilling
ae285c0654 Remove deprecated shipped flag from info.xml which has no use anymore 2016-01-07 15:15:58 +01:00
Joas Schilling
40f786060e Add ownCloud min and max version for shipped apps 2016-01-07 15:11:49 +01:00
Morris Jobke
547fbfdb76 Remove OC_DB::dropTable 2016-01-07 14:54:54 +01:00
Roeland Jago Douma
4f20e3bac0 Removed deprecated OC_Helper::getSecureMimeType 2015-12-18 13:42:59 +01:00
Thomas Müller
9e97bef935 Merge pull request #21268 from owncloud/cleanup-OC_Helper-getFileNameMimeType
Use proper public API for OC_Helper::getFileNameMimeType
2015-12-18 10:15:33 +01:00
Morris Jobke
ecdf88e41b Use proper public API for OC_Helper::getFileNameMimeType 2015-12-17 17:07:48 +01:00
Roeland Jago Douma
1f715289bf Removed deprecated function OC_User::deleteUser
Replaced with proper OCP calls
2015-12-17 16:18:40 +01:00
Morris Jobke
fb87441fd9 Deduplicate version expire jobs
* versionSize is calculated anyway in the expire job - > dropped
* offset/neededSpace was needed for expiry before the file is moved to the versions -> now this is included already in the currently used space because the expiry job is defered to a point in time after the version creation
* fixes #21108
2015-12-10 11:21:28 +01:00
Scrutinizer Auto-Fixer
0f1be1b601 Scrutinizer Auto-Fixes
This commit consists of patches automatically generated for this project on https://scrutinizer-ci.com
2015-12-07 20:08:20 +00:00
Thomas Müller
f9fc254672 Add DB group to some files_external tests
Adding group Db to federation tests and ldap tests

Add group DB to Test_UrlGenerator

Adding group DB to trashbin and versions tests

Adding group DB to Test_Util_CheckServer for pg
2015-11-30 10:55:10 +01:00
Thomas Müller
757aa45db7 Adding more DB groups to test suits
Adding more DB groups to test suits
2015-11-30 10:55:06 +01:00
Thomas Müller
50f6817ce9 Merge pull request #20439 from owncloud/etag-propagate-in-storage
Take submount etag into account for folder etags
2015-11-25 12:49:54 +01:00
Jenkins for ownCloud
eb42340fa3 [tx-robot] updated from transifex 2015-11-21 01:54:59 -05:00
Robin Appelman
a95d4c2b22 update tests 2015-11-19 13:32:04 +01:00
Lukas Reschke
8f09d5b67c Update license headers 2015-10-26 14:04:01 +01:00
Lukas Reschke
13e817e901 Throw exception on getPath if file does not exist
Currently the `getPath` methods returned `NULL` in case when a file with the specified ID does not exist. This however mandates that developers are checking for the `NULL` case and if they do not the door for bugs with all kind of impact is widely opened.

This is especially harmful if used in context with Views where the final result is limited based on the result of `getPath`, if `getPath` returns `NULL` PHP type juggles this to an empty string resulting in all possible kind of bugs.

While one could argue that this is a misusage of the API the fact is that it is very often misused and an exception will trigger an immediate stop of execution as well as log this behaviour and show a pretty error page.

I also adjusted some usages where I believe that we need to catch these errors, in most cases this is though simply an error that should hard-fail.
2015-10-25 17:58:21 +01:00
Jörn Friedrich Dreyer
2895c91291 Merge pull request #17641 from owncloud/fix_objectstore_rename
don't move files in cache twice, fixes renaming for objectstores
2015-10-19 17:18:57 +02:00
Jenkins for ownCloud
8d25528c49 [tx-robot] updated from transifex 2015-10-18 01:55:07 -04:00
Joas Schilling
0d3d75b3b3 Increase the 2nd digit of shipped apps 2015-10-17 08:47:11 +02:00
Jenkins for ownCloud
c378456137 [tx-robot] updated from transifex 2015-10-17 01:55:34 -04:00
Robin Appelman
d749b9a5ac Fix rename shared versions test 2015-10-16 21:41:51 +02:00
Robin Appelman
22c5c19376 handle versions expire for home storages with unlimited quota 2015-10-16 21:41:51 +02:00
Robin Appelman
54cea05271 Fix preserving file ids when restoring a file with object storage 2015-10-16 21:41:51 +02:00
Jörn Friedrich Dreyer
5646e39248 test objectstore with ceph docker
use default config for swift primary storage test config

allow testsuite to complete

fix timeout, script cleanup, enable debug for now

use btrfs loopback device, requires privileged container and absolute path

throw exception when storage has problems

debug by echo ...

sleep more, more debug
2015-10-06 16:27:25 +02:00