Commit Graph

54 Commitit

Tekijä SHA1 Viesti Päivämäärä
Andy Scherzinger
1e04619675
chore: Add SPDX header
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2024-06-06 22:53:41 +02:00
Robin Appelman
5685d68bd3
add more checks to ensure mounts aren't empty
Signed-off-by: Robin Appelman <robin@icewind.nl>
2023-09-12 16:50:24 +02:00
Robin Appelman
2ea41dab93
repair -1 folder sizes for object store background scan
Signed-off-by: Robin Appelman <robin@icewind.nl>
2023-05-10 19:33:26 +02:00
Robin Appelman
1626a56dda
adjusts tests for CloudIdManager
Signed-off-by: Robin Appelman <robin@icewind.nl>
2022-08-31 15:47:00 +02:00
Carl Schwan
fa48430feb
Revert "Revert "Remove inefficient fed share scanner""
This reverts commit 6667007bf2.

Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2022-08-03 15:17:51 +02:00
Carl Schwan
6667007bf2 Revert "Remove inefficient fed share scanner"
This reverts commit ce31914314.

Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2022-06-10 10:29:42 +02:00
Côme Chilliet
948f0740ff
Remove at() matcher in files_sharing tests
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2022-05-24 15:20:52 +02:00
Robin Appelman
d81713e5c1
simplify setup of circular SetupManager<->Manager
Signed-off-by: Robin Appelman <robin@icewind.nl>
2022-03-04 16:30:09 +01:00
Robin Appelman
22875bf367
move logic to decide what to setup to setupmanager
Signed-off-by: Robin Appelman <robin@icewind.nl>
2022-03-04 16:30:03 +01:00
Robin Appelman
1c468129af
adjust tests to new fs setup
Signed-off-by: Robin Appelman <robin@icewind.nl>
2022-03-04 16:29:59 +01:00
Vincent Petry
ce31914314
Remove inefficient fed share scanner
Remove scanAll which relies on the "shareinfo" endpoint that returns the
full cache tree.
The latter can become big for big shares and result in timeouts.
Furthermode, the full tree would be retrieved again for each and every
detected change which can become expensive quickly.

Signed-off-by: Vincent Petry <vincent@nextcloud.com>
2022-01-10 11:33:28 +01:00
Robin Appelman
ef93d2ea1c
update tests
Signed-off-by: Robin Appelman <robin@icewind.nl>
2021-10-19 11:31:08 +02:00
Vincent Petry
f6f2f63016
Fix remote share deletion when deleting user
When deleting a user, we should only delete the direct remote user
shares or the remote group based subshares.

Signed-off-by: Vincent Petry <vincent@nextcloud.com>
2021-07-27 14:32:51 +02:00
Vincent Petry
dac676c14e
Replace ILogger with LoggerInterface in remote share manager
Signed-off-by: Vincent Petry <vincent@nextcloud.com>

Co-authored-by: Carl Schwan <carl@carlschwan.eu>
2021-07-27 13:04:39 +02:00
Vincent Petry
e67e90afce
Fix remote group share decline+accept code path
When declining a remote group share through the dialog that appears when
notifications are off, the mount point is now correctly saved when
re-accepting.

Signed-off-by: Vincent Petry <vincent@nextcloud.com>
2021-07-27 12:20:03 +02:00
Vincent Petry
e8f4a524a2
Fix external share manager with multiple user groups
Use query builder with proper matching for finding the group names.

Signed-off-by: Vincent Petry <vincent@nextcloud.com>
2021-07-27 12:19:26 +02:00
Vincent Petry
15f41a6b72
Fix remote group share API interactions
Accepting and declining can now be done repeatedly on both the parent
group share and sub-share with the same effects.

Added unit tests to cover these cases, and also when the same operation
is repeated.

Signed-off-by: Vincent Petry <vincent@nextcloud.com>
2021-07-27 12:19:26 +02:00
Vincent Petry
cff8ae7ded
Add logging to external shares manager
Instead of just returning false, also log the exception to make
debugging database issues easier.

Signed-off-by: Vincent Petry <vincent@nextcloud.com>
2021-07-27 12:19:24 +02:00
Vincent Petry
7130a98e47
Fix received federated group shares
Fix pending shares endpoint to consider user-specific sub-entries
for group shares whenever a share was accepted or declined.

Added unit test for adding remote group shares.

Fixed "removeUserShares" to not send a remote request as we never send
remote requests for group shares.

Signed-off-by: Vincent Petry <vincent@nextcloud.com>
2021-07-27 12:19:23 +02:00
Julius Härtl
7179002600
Allow to get a local cloud id without going through the contacts manager
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2021-07-14 16:08:05 +02:00
John Molakvoæ (skjnldsv)
215aef3cbd
Update php licenses
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
2021-06-04 22:02:41 +02:00
Christoph Wurst
d89a75be0b
Update all license headers for Nextcloud 21
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-12-16 18:48:22 +01:00
Daniel Kesselberg
9e4d49d157
Fix variable name for test
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
2020-12-10 10:19:48 +01:00
Julius Härtl
aefe826202
Adjust default
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2020-12-08 16:06:10 +01:00
Arthur Schiwon
16a78f535a
set the display name of federated sharees from addressbook
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2020-11-24 11:30:11 +01:00
Christoph Wurst
2a054e6c04
Update the license headers for Nextcloud 20
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-08-24 14:54:25 +02:00
Morris Jobke
234b510652
Change PHPDoc type hint from PHPUnit_Framework_MockObject_MockObject to \PHPUnit\Framework\MockObject\MockObject
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2020-08-12 13:55:19 +02:00
Morris Jobke
0763a17332
Move federated_share_added into a typed event
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2020-07-23 08:33:17 +02:00
Joas Schilling
89ed2c37bf
Update share type constant usage
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-06-24 16:49:16 +02:00
Christoph Wurst
cb057829f7
Update license headers for 19
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-04-29 11:57:22 +02:00
Christoph Wurst
caff1023ea
Format control structures, classes, methods and function
To continue this formatting madness, here's a tiny patch that adds
unified formatting for control structures like if and loops as well as
classes, their methods and anonymous functions. This basically forces
the constructs to start on the same line. This is not exactly what PSR2
wants, but I think we can have a few exceptions with "our" style. The
starting of braces on the same line is pracrically standard for our
code.

This also removes and empty lines from method/function bodies at the
beginning and end.

Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-04-10 14:19:56 +02:00
Christoph Wurst
afbd9c4e6e
Unify function spacing to PSR2 recommendation
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-04-09 13:54:22 +02:00
Christoph Wurst
1a9330cd69
Update the license headers for Nextcloud 19
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-03-31 14:52:54 +02:00
Christoph Wurst
b80ebc9674
Use the short array syntax, everywhere
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-03-26 16:34:56 +01:00
Christoph Wurst
2ee65f177e
Use the shorter phpunit syntax for mocked return values
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-03-25 22:21:27 +01:00
Christoph Wurst
5bf3d1bb38
Update license headers
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2019-12-05 15:38:45 +01:00
Roeland Jago Douma
8d4346d656
Fix more tests
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2019-11-27 13:34:42 +01:00
Roeland Jago Douma
c007ca624f
Make phpunit8 compatible
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2019-11-27 13:34:41 +01:00
Roeland Jago Douma
68748d4f85
Some php-cs fixes
* Order the imports
* No leading slash on imports
* Empty line before namespace
* One line per import
* Empty after imports
* Emmpty line at bottom of file

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2019-11-22 20:52:10 +01:00
Bjoern Schiessle
412f6a6ecc
fix unit tests
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
2018-07-11 10:21:00 +02:00
Bjoern Schiessle
3942d731d2
update unit tests
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
2018-07-11 10:11:48 +02:00
Bjoern Schiessle
9365fd2534
fix external manager tests
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
2018-07-02 11:29:30 +02:00
Joas Schilling
bf2be08c9f
Fix risky tests without assertions
Signed-off-by: Joas Schilling <coding@schilljs.com>
2018-01-25 11:33:25 +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
43e498844e
Use ::class in test mocks
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2017-10-24 17:45:32 +02:00
Roeland Jago Douma
53bca14a27
Do proper DI
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2017-04-11 15:04:01 +02:00
Bjoern Schiessle
449011dae7
remove discovery manager in favour of the OCSDiscoveryService
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
2017-04-11 15:04:01 +02:00
Robin Appelman
fa49c4a13b
Add a single public api for resolving a cloud id to a user and remote and back
Signed-off-by: Robin Appelman <robin@icewind.nl>
2017-02-08 15:17:02 +01:00
Robin Appelman
3845d4ec9a
more robust test setup
Signed-off-by: Robin Appelman <robin@icewind.nl>
2016-10-12 16:12:34 +02:00
Roeland Jago Douma
cae87d028d
Fix tests 2016-08-24 21:30:42 +02:00