Liam Dennehy
68e41a3aae
trashbin:cleanup exceptions for invalid options
...
* throw on no parameters provided
* throw on --all-users and userid provided
Signed-off-by: Liam Dennehy <liam@wiemax.net>
2018-06-28 22:31:27 +02:00
Liam Dennehy
6bc3d3781d
Default behaviour when no users are specified on trashbin:cleanup
...
* Add option --all-users to explicitly clean all trashbins
* Reject no users on commandline and no --all-users
* Warn when --all-users and userids are specified
Signed-off-by: Liam Dennehy <liam@wiemax.net>
2018-06-28 17:14:45 +02:00
Morris Jobke
ab266a7798
Merge pull request #9626 from lars-sh/patch-1
...
Workaround for interrupting expired files deletion
2018-06-25 16:44:55 +02:00
Lars Knickrehm
436c4f8954
Improved logging statement
2018-06-24 13:41:16 +02:00
Roeland Jago Douma
608456d2a9
Previews on for all trashbin files
...
* Previews possible for all files in the trashbin
* Set caching
* Use the fileid to find the file
* Fix test
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2018-06-05 10:17:22 +02:00
Lars Knickrehm
e360885eb0
Workaround for interrupting expired files deletion
...
Workaround avoiding "Error while running background job (class: OCA\Files_Trashbin\BackgroundJob\ExpireTrash, arguments: ): {"Exception":"OCP\\Files\\NotPermittedException","Message":"","Code":0,"Trace":"#0 \/var\/www\/cloud\/apps\/files_trashbin\/lib\/Trashbin.php(590): OC\\Files\\Node\\File->delete() [...]"
2018-05-28 00:59:20 +02:00
Georg Ehrke
367ca563b4
allow admins to override FreeBusy capabilities without modifying ShareAPI capabilities
...
Signed-off-by: Georg Ehrke <developer@georgehrke.com>
2018-05-22 19:16:26 +02:00
Roeland Jago Douma
5eb72a8a57
Support fileid propfind on trash endpoint
...
Fixes #9416
In order to support previews on mobile clients they will need the fileid
of files in the trashbin.
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2018-05-11 20:45:03 +02:00
Roeland Jago Douma
58219638d7
Trashbin propfind respond to oc:size
...
In order to display the total size of folders also in the clients (and
web) we should return the oc:size.
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2018-05-10 16:12:33 +02:00
Roeland Jago Douma
48034bdc4a
Merge pull request #9427 from nextcloud/bugfix/noid/no_listing_if_not_in_debug_trash_version
...
If not in debug disable principal listing
2018-05-10 09:31:19 +02:00
Roeland Jago Douma
17f1653ceb
If not in debug disable principal listing
...
Trashbin and Version should have the same behaviour as the other
collections.
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2018-05-08 20:52:14 +02:00
Roeland Jago Douma
21d4ce926e
Propfind for deletion time of trash files
...
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2018-05-08 09:08:43 +02:00
Roeland Jago Douma
7f194be3ab
Merge pull request #9202 from nextcloud/feature/1332/trashbin_dav
...
Trashbin endpoint in DAV
2018-05-01 14:24:38 +02:00
Arthur Schiwon
38a90130ce
move log constants to ILogger
...
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2018-04-26 10:45:52 +02:00
Roeland Jago Douma
c625fc5931
Add folder for trashbin
...
The trashbin home now contains 2 entries restore and trash.
Made all files strict. Added more types.
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2018-04-25 20:25:10 +02:00
Roeland Jago Douma
dadc740db5
Use getType to determine type of entry
...
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2018-04-25 20:25:10 +02:00
Roeland Jago Douma
d5937e0fd6
Add propfind properties to trashbin
...
* get original filename (without the weird timestamp)
* get original location
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2018-04-25 20:25:10 +02:00
Roeland Jago Douma
cb617c4949
Add special restore folder
...
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2018-04-25 20:25:10 +02:00
Roeland Jago Douma
f7ca6149d6
Emptry trashbin
...
A delete on a users trashbin will empty it (the trashbin won't be
deleted of course)
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2018-04-25 20:25:10 +02:00
Roeland Jago Douma
09940bcde6
List trashbin in DAV
...
First steps for #1332
* Add a new DAV collection
* List all files in the trashbin for this user
* Deleting files from trashbin
* Get files from trashbin (just read)
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2018-04-25 20:25:10 +02:00
Morris Jobke
dd34cb7540
Less deprecated calls to OCP\Util::writeLog
...
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2018-04-22 20:41:49 +02:00
Roeland Jago Douma
83873e3da1
Remove deprecated URL functions for OCP\Util
...
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2018-03-13 22:04:08 +01:00
Julius Härtl
44b002665c
Remove deprecated isEnabled call from files_trashbin
...
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2018-01-31 14:13:15 +01:00
Morris Jobke
eb51f06a3b
Use ::class statement instead of string
...
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2018-01-29 12:03:47 +01:00
Morris Jobke
a661f043e1
Remove unneeded semicolon and parentheses
...
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2018-01-26 23:46:40 +01:00
Morris Jobke
c005fc6755
Cleanup unused code
...
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2018-01-26 15:25:19 +01:00
Morris Jobke
c1e4f9f305
Use type casting instead of *val() method
...
It should be up to 6x faster
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2018-01-26 11:35:42 +01:00
Morris Jobke
0a56d2185e
Return value immediately instead of assigning to a one-time variable
...
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2018-01-26 00:02:03 +01:00
Morris Jobke
2a38605545
Properly log the full exception instead of only the message
...
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2018-01-23 10:57:21 +01:00
Arthur Schiwon
65d7468bf3
check userExists later, saves lookups for appData_INSTANCEID userids
...
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2017-12-01 11:47:56 +01:00
Morris Jobke
31c5c2a592
Change @georgehrke's email
...
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2017-11-06 20:38:59 +01:00
Morris Jobke
0eebff152a
Update license headers
...
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2017-11-06 16:56:19 +01:00
Morris Jobke
5987099d2a
Remove unneeded check if app is enabled
...
App code will not be executable if the app is not enabled, because the autoloader refuses to load that class.
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2017-10-23 23:47:06 +02:00
Bjoern Schiessle
6e69881512
allow apps to control the trash bin
...
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
2017-09-15 11:32:45 +02:00
Joas Schilling
d703744d4a
Fix comparisions in the trashbin app
...
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-08-01 13:56:12 +02:00
Roeland Jago Douma
549845aa73
Delete trash using node API to trigger preview deletion
...
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2017-07-24 11:14:12 +02:00
Morris Jobke
b4fa812a3d
Improve logging of trash bin inconsistencies
...
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2017-06-23 16:09:00 -05:00
Morris Jobke
23cc309606
Handle more error cases
...
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2017-05-02 13:43:48 +02:00
Morris Jobke
c54a59d51e
Remove unused use statements
...
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2017-04-22 19:23:31 -05:00
Morris Jobke
1729e4471f
Update comments to Nextcloud
...
* based on PR by @Ardinis
* see #4311
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2017-04-11 23:16:27 -05:00
Roeland Jago Douma
6e6cbae37c
Merge pull request #3998 from nextcloud/backport-27032
...
Use the expected method depending on the target being a file or folder
2017-03-23 21:59:39 +01:00
Juan Pablo Villafáñez
713faa0fc0
Use the expected method depending on the target being a file or folder
...
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2017-03-22 18:02:09 -06:00
Morris Jobke
fb87aa61e7
fix path for files from root folder
...
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2017-03-22 17:17:37 -06:00
Victor Dubiniuk
17bed297db
In the real world id is an initial filename
...
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2017-03-20 00:06:32 -06:00
Bjoern Schiessle
79d362f4a6
delete files right away in case of a encryption exception
...
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
2017-03-14 12:11:28 +01:00
Morris Jobke
a4ad8af6e3
Add proper default value for datadir
...
* better safe than sorry
* fixes #3091
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2017-01-19 19:49:41 -06:00
Roeland Jago Douma
6f96af0fce
Merge pull request #2819 from nextcloud/trash-ext-link-uselinkowner
...
Fallback to share link owner when no owner found
2016-12-23 14:36:34 +01:00
Vincent Petry
34d466b2f6
Fallback to share link owner when no owner found
...
When creating link shares from external storage, the filesystem cannot
find an owner in some scenarios (ex: system-wide mounts). In such
cases, fall back to using the current user's trashbin which happens to
also be the user who created the link share.
Fixes an issue where this scenario made deletion impossible due to
missing user information.
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
2016-12-22 10:48:32 +01:00
Bjoern Schiessle
a1d6f3068a
make code more robust
...
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
2016-12-21 18:02:19 +01:00
Bjoern Schiessle
60810b44bc
check for class name in case class is not loaded
...
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
2016-12-21 17:28:50 +01:00