Commit Graph

1312 Commits

Author SHA1 Message Date
Roeland Jago Douma e5edc58d11 Make lookup search explicit
Speedsup sharee lookup quite a bit.

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2021-04-20 08:37:48 +00:00
Julius Härtl 96287f336e Add appconfig to always show the unique label of a sharee
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Signed-off-by: npmbuildbot-nextcloud[bot] <npmbuildbot-nextcloud[bot]@users.noreply.github.com>
2021-03-18 13:07:03 +00:00
Daniel Calviño Sánchez ec454e7c2b Fix valid storages removed when cleaning remote storages
The remote URL of a share is always stored in the database with a
trailing slash. However, when a cloud ID is generated trailing slashes
are removed.

The ID of a remote storage is generated from the cloud ID, but the
"cleanup-remote-storage" command directly used the remote URL stored in
the database. Due to this, even if the remote storage was valid, its ID
did not match the ID of the remote share generated by the command and
ended being removed.

Now the command generates the ID of remote shares using the cloud ID
instead, just like done by the remote storage, so there is no longer a
mismatch.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2021-03-18 07:59:45 +00:00
Morris Jobke 4f18ff9815
Merge pull request #25944 from nextcloud/backport/25659/stable20
[stable20] catch notfound and forbidden exception in smb::getmetadata
2021-03-17 20:13:57 +01:00
Robin Appelman 7fd53b91c3
fix search in nested jails
Signed-off-by: Robin Appelman <robin@icewind.nl>
2021-03-16 15:22:22 +01:00
Vincent Petry 20ebdf4fe0 Log exceptions when creating share
Because the exceptions don't always contain a useful message for the UI,
but also because in some cases we need to find out what went wrong.

In some setups, a ShareNotFoundException might happen during creation
when we try to re-read the just written share. Usually related to Galera
Cluster where node syncing wait is not enabled.

Signed-off-by: Vincent Petry <vincent@nextcloud.com>
2021-03-15 15:06:43 +00:00
Robin Appelman 326f7ac857 catch notfound and forbidden exception in smb::getmetadata
Signed-off-by: Robin Appelman <robin@icewind.nl>
2021-03-05 07:54:09 +00:00
Vincent Petry 9c7d733c01
Also add missing oc_share_external.share_type column
Signed-off-by: Vincent Petry <vincent@nextcloud.com>
2021-01-07 09:39:10 +01:00
Vincent Petry 9c54467c94
Adjust share_external table
Add column "parent" if missing.
Drop column "lastscan" if exists.

Signed-off-by: Vincent Petry <vincent@nextcloud.com>
2021-01-07 09:38:59 +01:00
Julius Härtl 61b574b130
Show unique displayname context in the user share list entries
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2021-01-05 10:05:52 +01:00
Julius Härtl e155943a3b
Resolve conflict in addShare parameters
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2020-12-14 11:11:00 +01:00
Julius Härtl 3cf7041c94
Adjust default
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2020-12-14 11:10:59 +01:00
Julius Härtl ff544a2880
Do not register share menu in cases where the files app has not been registered yet
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2020-12-14 11:10:59 +01:00
Julius Härtl 58f6238af2
Move columns to bigint
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2020-12-14 11:10:58 +01:00
Julius Härtl 40a8bb53b1
Migrate files_sharing to migrations and move remote_id to a string in share_external
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2020-12-14 11:10:58 +01:00
Julius Härtl 62ecb57c7f
Move remoteId of remote reshares to string
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2020-12-14 11:10:58 +01:00
Roeland Jago Douma 37df208bd7 Limit shared cache search if it is just a file
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2020-11-20 07:27:47 +00:00
Maxence Lange d4ea5fd63f circleId too short in some request
Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
2020-11-18 07:57:22 +00:00
Christoph Wurst 1941f1b1a8
Revert "[stable20] circleId too short in some request" 2020-11-17 14:20:02 +01:00
Maxence Lange 6db68e9ba3 circleId too short in some request
Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
2020-11-17 10:28:24 +00:00
Morris Jobke 54fb4c28c4
Merge pull request #23419 from nextcloud/backport/23350/stable20
[stable20] Inidicate preview availability in share api responses
2020-11-04 08:45:44 +01:00
Richard Steinmetz 4baeaeccdb Indicate preview availability in share api responses
Signed-off-by: Richard Steinmetz <richard@steinmetz.cloud>
Signed-off-by: npmbuildbot-nextcloud[bot] <npmbuildbot-nextcloud[bot]@users.noreply.github.com>
2020-11-03 19:55:35 +00:00
Roeland Jago Douma 5e496cd2e8 Fix invalid usages of the new dispatcher
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2020-10-30 08:57:07 +00:00
John Molakvoæ (skjnldsv) 2aa69ba895 Also expire share type email
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
2020-10-20 09:35:45 +00:00
John Molakvoæ (skjnldsv) a9a552ec95 Expose CLOUD federation for local users as well
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
2020-10-12 18:51:53 +00:00
Morris Jobke c9639f3956
Merge pull request #22898 from nextcloud/fix/16696/add-spaces-and-fix-variable-name
Fix variable name and add spaces around path in info log line
2020-09-17 11:55:07 +02:00
Morris Jobke 681e51c0ef
Merge pull request #22902 from nextcloud/fix/16696/proper-target-path-for-share-event
Create proper target path for shared storage fopen event
2020-09-17 11:53:28 +02:00
Morris Jobke 5eb808b763
Create proper target path for shared storage fopen event
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2020-09-17 09:52:31 +02:00
Morris Jobke 930c97a0ef
Fix variable name and add spaces around path in info log line
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2020-09-17 08:58:10 +02:00
Robin Appelman cfde74442c
optimize View::getPath if we already know the storage id
Signed-off-by: Robin Appelman <robin@icewind.nl>
2020-09-16 13:49:07 +02:00
Robin Appelman 244fd6ae49
disable update checking for shared storages
update checking is already handled by the share source

Signed-off-by: Robin Appelman <robin@icewind.nl>
2020-09-15 16:42:40 +02:00
Robin Appelman 928cee2ae7
only get the permissions from the share source if it's not already cached
this prevents having to setup the share source when doing metadata stuff on the share root

Signed-off-by: Robin Appelman <robin@icewind.nl>
2020-09-09 13:48:48 +02:00
Christoph Wurst 1f7f93a695
Update license headers for Nextcloud 20 (again)
There are still lots of outdated headers, so time for another round of
updates.

Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-09-07 14:37:44 +02:00
Julius Härtl f96853a19c
Do not fail if share for mountpoint is no longer available
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2020-09-03 11:17:59 +02:00
Robin Appelman af381a9a93
remove unneeded if
Signed-off-by: Robin Appelman <robin@icewind.nl>
2020-08-28 11:43:23 +02:00
Roeland Jago Douma 7e6f04490e
Merge pull request #22393 from nextcloud/fix/license-headers-20
Update the license headers for Nextcloud 20
2020-08-24 22:03:00 +02:00
John Molakvoæ (skjnldsv) 6d576a9100
Fix missing FN from federated contact
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
2020-08-24 15:15:32 +02: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 fedf9c69d9
Use matching parameter names form interfaces and implementations
Found by Psalm 3.14.1

Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2020-08-19 18:16:35 +02:00
Roeland Jago Douma 6ed4c8a946
Improve recent file fetching
Fixes #16876

Before we'd just fetch everything from all storages we'd have access to.
Then we'd sort. And filter in php. Now this of course is tricky if a
user shared just a file with you and then has a ton of activity.

Now we try to contruct the prefix path. So that the filtering can happen
right away in the databae.

Now this will make the DB more busy. But it should help overall as in
most cases less queries are needed then etc.

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2020-08-18 05:56:06 +02:00
John Molakvoæ 565ccb08cd
Merge pull request #22109 from nextcloud/feature/20931/followup-1 2020-08-17 22:13:45 +02:00
Georg Ehrke 5b26487f14
Expose status via Collaborators API
Signed-off-by: Georg Ehrke <developer@georgehrke.com>
2020-08-14 17:04:52 +02:00
Daniel Kesselberg 6f8147b18f
Fix some MissingDocblockType or InvalidDocblock warnings.
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
2020-08-14 15:10:48 +02:00
Robin Appelman 5f58cefbd7
merge file activity settings into a single 'favorite changed' item
Signed-off-by: Robin Appelman <robin@icewind.nl>
2020-08-13 00:01:34 +02:00
Robin Appelman a11769e0e3
move share notifcation settings to files group
Signed-off-by: Robin Appelman <robin@icewind.nl>
2020-08-13 00:01:30 +02:00
Joas Schilling d4a4d5c6ef
When no user is logged in null is used
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-07-29 09:42:54 +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
Christoph Wurst b641f25606
Migrate files sharing to the PSR container
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-07-16 15:52:46 +02:00
Morris Jobke c4b53538af
Better event description for BeforeTemplateRenderedEvent in files and files_sharing
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2020-07-15 20:15:51 +02:00
Julius Härtl 217a69ebf9
Add BeforeTemplateRenderedEvent for files_sharing
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2020-07-15 13:55:26 +02:00