Commit graph

1391 commits

Author SHA1 Message Date
szaimen
13e7efff90 Revert "Add non-breaking space in the file size"
Signed-off-by: szaimen <szaimen@e.mail.de>
2022-02-10 21:38:30 +00:00
John Molakvoæ
fcb82f6d42
Merge pull request #30687 from nextcloud/backport/30499/stable22 2022-01-17 08:57:36 +01:00
Carl Schwan
3067a70086 Add non-breaking space in the file size
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2022-01-14 22:34:08 +00:00
Vincent Petry
e4b650fa11 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-14 16:09:00 +00:00
Carl Schwan
54924c8dab Handle LocalServerException when scanning external shares
When remoteIsOwnCloud trows LocalServerException, the storage is
unavailable and instead of crashing the scanner, ignore the specific
storage.

Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2022-01-09 17:43:33 +00:00
Joas Schilling
22ea174f96
Fix passing on the parameter
Signed-off-by: Joas Schilling <coding@schilljs.com>
2022-01-07 09:30:26 +01:00
Carl Schwan
8cb63f3283 Handle external share with invalid host
remoteIsOwnCloud might throw an exception when the host is localhost.
Handle this case instead of aborting completely. The behavior is the
same as that is done 10 lines under it

Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2021-12-29 17:13:06 +00:00
Vincent Petry
c7e3ee9e0e Discard share notification for non-existing groups
Group shares might exist even after a group got deleted.

This fix catches the situation and discards the notification for the
obsolete group.

Signed-off-by: Vincent Petry <vincent@nextcloud.com>
Co-authored-by: Joas Schilling <coding@schilljs.com>
2021-12-17 07:07:01 +00:00
Joas Schilling
3879c2eb1e Limit more contact searches
Signed-off-by: Joas Schilling <coding@schilljs.com>
2021-12-13 14:23:04 +00:00
Robin Appelman
904fce3c87 code checker fixes for instanceOfStorage
Signed-off-by: Robin Appelman <robin@icewind.nl>
2021-12-06 01:11:44 +01:00
Robin Appelman
73a8ea2d4e background scan the source storage when a background scan on a storage jail is triggered
Signed-off-by: Robin Appelman <robin@icewind.nl>
2021-12-06 01:11:44 +01:00
John Molakvoæ
3663ceb363
Emit event on link share action
Signed-off-by: John Molakvoæ <skjnldsv@users.noreply.github.com>
2021-11-17 10:25:10 +01:00
Pytal
8eb921c60e
Merge pull request #28785 from nextcloud/backport/28377/stable22
[stable22] Scan the shared external storage source on access
2021-09-10 10:22:28 -07:00
Arthur Schiwon
0571d41df5
use specific email getter where necessary
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2021-09-10 13:22:27 +02:00
John Molakvoæ (skjnldsv)
ccf9cc964c Return proper watcher if SharedStorage originates from ExternalMount
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
2021-09-10 08:14:28 +00:00
John Molakvoæ
e2a4dc818c
Merge pull request #28209 from nextcloud/backport/27751/stable22 2021-08-19 14:46:01 +02:00
Vincent Petry
f60ea8a260
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-08-10 13:37:37 +02:00
Vincent Petry
33b01187cd
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-08-10 13:27:59 +02:00
Vincent Petry
2e76d98e13
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-08-10 13:27:59 +02:00
Vincent Petry
df0ca2f1db
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-08-10 13:27:59 +02:00
Vincent Petry
701de23857
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-08-10 13:27:58 +02:00
Vincent Petry
37a65237ea
Fix re-accepting or re-rejecting remote group shares
When accepting a group share, a sub-share entry is created which also
has a different id.

When accepting or rejecting the sub-share, simply update the "accepted"
flag instead of trying to re-insert the entry.

Adjust getShare to also properly validate group share membership
when called on a sub-share id.

Signed-off-by: Vincent Petry <vincent@nextcloud.com>
2021-08-10 13:27:58 +02:00
Vincent Petry
4d0f0095ea
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-08-10 13:27:58 +02:00
Vincent Petry
08ab5d97da
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-08-10 13:27:57 +02:00
Guillaume COLSON
69f2b691cd No limit in the number of group shares
Signed-off-by: Guillaume COLSON <guillaume.colson@univ-lorraine.fr>
2021-07-15 15:24:05 +02:00
Morris Jobke
2690481cba
Use DI for files_sharing Cache
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2021-06-17 10:22:37 +02:00
Morris Jobke
095418493e
Use proper methods for display name retrieval
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2021-06-17 10:19:07 +02:00
blizzz
818fc95b03
Merge pull request #26571 from nextcloud/bugfix/noid/existing-link-no-reshare
Only allow removing existing shares that would not be allowed due to reshare restrictions
2021-06-16 15:26:12 +02:00
Julius Härtl
c0474ba364
Use product name in places where it is appropriate rather than the instance name
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2021-06-16 11:42:53 +02:00
Robin Appelman
9774fb1573
use searchoperation for storage filter instead of db expression
Signed-off-by: Robin Appelman <robin@icewind.nl>
2021-06-14 16:11:25 +02:00
Robin Appelman
e198dc1b20
rework search api to allow searching on multiple caches at once
Signed-off-by: Robin Appelman <robin@icewind.nl>
2021-06-14 16:11:22 +02:00
Louis Chemineau
ebf35fb38a Correctly check the reception of a remote feedback
Signed-off-by: Louis Chemineau <louis@chmn.me>
2021-06-09 15:37:18 +02:00
Julius Härtl
06bfbb4a8c
When changing the share owner, downgrade permissions where needed
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2021-06-09 10:32:36 +02:00
Julius Härtl
4a2804dae2
Drop share if moved to a parent share that does not allow resharing
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2021-06-09 10:32:36 +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
Joas Schilling
e4b5645883
Also make other shares listen to the "Allow sharing with groups"
Signed-off-by: Joas Schilling <coding@schilljs.com>
2021-05-26 11:19:58 +02:00
Morris Jobke
f1dbabd910
Merge pull request #26727 from nextcloud/group-exclude-link-share
Add option to exclude groups from creating link shares
2021-05-21 15:35:39 +02:00
Morris Jobke
b1ad3faf14
Merge pull request #25679 from nextcloud/drop/ocp-user
Drop \OCP\User
2021-05-21 15:05:38 +02:00
Christoph Wurst
8196420063
Drop \OCP\User
Inlines and remaining usages and drops the deprecated public API.

Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2021-05-21 15:00:34 +02:00
szaimen
35d978c2fc Rename External storages to External storage
Signed-off-by: szaimen <szaimen@e.mail.de>
2021-05-20 12:13:04 +02:00
Valdnet
9749968308
l10n: Unify spelling
Spelling unification in Nextcloud applications.
2021-05-20 09:22:08 +02:00
Morris Jobke
6f31d20f3d
Merge pull request #26580 from castillo92/patch-2
Fix casing of exception string
2021-05-18 09:29:45 +02:00
Robin Appelman
b1dca57a1c
load share settings from the share manager in more places
Signed-off-by: Robin Appelman <robin@icewind.nl>
2021-05-12 16:11:28 +02:00
Roeland Jago Douma
701294520a Add bruteforce protection to the shareinfo endpoint
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2021-05-12 09:34:45 +02:00
Valdnet
505863c55e
l10n: Change to a capital letter
Signed-off-by: Valdnet <47037905+Valdnet@users.noreply.github.com>
2021-04-27 12:38:28 +02:00
Roeland Jago Douma
dcd45427a6 Make lookup search explicit
Speedsup sharee lookup quite a bit.

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2021-04-19 20:05:21 +02:00
castillo92
12948aa217
Update ShareAPIController.php
Change to capital letters in an abbreviation.

Signed-off-by: castillo92 javiercizquierdo@gmail.com
2021-04-16 08:56:20 +02:00
Vincent Petry
af61486aea
Separate settings for remote share expiration
Added separate settings for default and enforced expiration date for
remote shares.

Signed-off-by: Vincent Petry <vincent@nextcloud.com>
2021-04-15 10:06:09 +02:00
Vincent Petry
b0aaafe259
Fix expire date capability for federated shares
Signed-off-by: Vincent Petry <vincent@nextcloud.com>
2021-04-15 10:02:03 +02:00
Vincent Petry
8680bafc5c
Implement expiration date for federated shares
Add expiration date field in UI.
Save expiration date when creating or updating federated share.
Read expiration date from DB in federated share provider.
Applies to both federated user and group shares.

Signed-off-by: Vincent Petry <vincent@nextcloud.com>
2021-04-15 10:02:00 +02:00