Christoph Wurst
d9015a8c94
Format code to a single space around binary operators
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
3 vuotta sitten
John Molakvoæ (skjnldsv)
6adb19b296
Show filename on share link download
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
3 vuotta sitten
Morris Jobke
5eb808b763
Create proper target path for shared storage fopen event
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
3 vuotta sitten
Morris Jobke
930c97a0ef
Fix variable name and add spaces around path in info log line
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
3 vuotta sitten
Robin Appelman
cfde74442c
optimize View::getPath if we already know the storage id
Signed-off-by: Robin Appelman <robin@icewind.nl>
3 vuotta sitten
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>
3 vuotta sitten
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>
3 vuotta sitten
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>
3 vuotta sitten
Julius Härtl
f96853a19c
Do not fail if share for mountpoint is no longer available
Signed-off-by: Julius Härtl <jus@bitgrid.net>
3 vuotta sitten
Robin Appelman
af381a9a93
remove unneeded if
Signed-off-by: Robin Appelman <robin@icewind.nl>
3 vuotta sitten
John Molakvoæ (skjnldsv)
6d576a9100
Fix missing FN from federated contact
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
3 vuotta sitten
Christoph Wurst
2a054e6c04
Update the license headers for Nextcloud 20
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
3 vuotta sitten
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>
3 vuotta sitten
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>
3 vuotta sitten
Georg Ehrke
5b26487f14
Expose status via Collaborators API
Signed-off-by: Georg Ehrke <developer@georgehrke.com>
3 vuotta sitten
Daniel Kesselberg
6f8147b18f
Fix some MissingDocblockType or InvalidDocblock warnings.
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
3 vuotta sitten
Robin Appelman
5f58cefbd7
merge file activity settings into a single 'favorite changed' item
Signed-off-by: Robin Appelman <robin@icewind.nl>
3 vuotta sitten
Robin Appelman
a11769e0e3
move share notifcation settings to files group
Signed-off-by: Robin Appelman <robin@icewind.nl>
3 vuotta sitten
Joas Schilling
d4a4d5c6ef
When no user is logged in null is used
Signed-off-by: Joas Schilling <coding@schilljs.com>
3 vuotta sitten
Morris Jobke
0763a17332
Move federated_share_added into a typed event
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
4 vuotta sitten
Christoph Wurst
b641f25606
Migrate files sharing to the PSR container
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
3 vuotta sitten
Morris Jobke
c4b53538af
Better event description for BeforeTemplateRenderedEvent in files and files_sharing
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
4 vuotta sitten
Julius Härtl
217a69ebf9
Add BeforeTemplateRenderedEvent for files_sharing
Signed-off-by: Julius Härtl <jus@bitgrid.net>
4 vuotta sitten
Morris Jobke
7e281a07bb
Use IBootstrap for the app federatedfilesharing
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
4 vuotta sitten
Gary Kim
a2cedcefee
Add user input for link share labels
Signed-off-by: Gary Kim <gary@garykim.dev>
4 vuotta sitten
Roeland Jago Douma
1cf3280c8e
Lazy register the navigation
This makes sure that we do not translate unneeded strings on for example
webdav requests.
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
4 vuotta sitten
Joas Schilling
d7c0b9cced
Also always return in app commands
Signed-off-by: Joas Schilling <coding@schilljs.com>
4 vuotta sitten
Daniel Kesselberg
6b1af4ac8c
Pass $path to ocmPermissions2ncPermissions
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
4 vuotta sitten
Joas Schilling
89ed2c37bf
Update share type constant usage
Signed-off-by: Joas Schilling <coding@schilljs.com>
4 vuotta sitten
Joas Schilling
b740d283a9
Don't initialize Application directly
Signed-off-by: Joas Schilling <coding@schilljs.com>
4 vuotta sitten
Joas Schilling
56b04c65f7
Always sort shares in a reliable way
Signed-off-by: Joas Schilling <coding@schilljs.com>
4 vuotta sitten
Christoph Wurst
09a632242d
Do not only catch Exceptions but any Throwable during rmt share delete
When a remote share is deleted, we notify the remove instance. This may
trigger various error conditions, which we want to catch in order to
avoid undeletable shares. The try-catch, however, did only capture
exceptions, so things like TypeErrors were not caught and caused the
process to fail hard.
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
4 vuotta sitten
Daniel Calviño Sánchez
37f231333f
Fix reference to wrong class name
\OCP\IShare does not exist; the right name is \OCP\Share\IShare,
although it is already imported as IShare.
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
4 vuotta sitten
Roeland Jago Douma
ef34f72167
Have share permissions on link shares if it is enabled
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
4 vuotta sitten
John Molakvoæ (skjnldsv)
a26ca1e638
Do not filter id matching userId on non-user-share shares
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
Signed-off-by: npmbuildbot[bot] <npmbuildbot[bot]@users.noreply.github.com>
4 vuotta sitten
John Molakvoæ (skjnldsv)
ff20da637e
Fix federated link sharing permissions
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
Signed-off-by: npmbuildbot[bot] <npmbuildbot[bot]@users.noreply.github.com>
4 vuotta sitten
Roeland Jago Douma
d466a7b808
Allow to navigate to others with access from the sidebar
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Signed-off-by: npmbuildbot[bot] <npmbuildbot[bot]@users.noreply.github.com>
4 vuotta sitten
Christoph Wurst
cb057829f7
Update license headers for 19
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
4 vuotta sitten
Robin Appelman
7a4ea4a6b6
make php-cs happy
Signed-off-by: Robin Appelman <robin@icewind.nl>
4 vuotta sitten
Julius Härtl
5646f7c761
Link shares have reshare permission if outgoing federated shares are enabled
Signed-off-by: Julius Härtl <jus@bitgrid.net>
4 vuotta sitten
John Molakvoæ (skjnldsv)
7eceba7dae
Fix Sharing recommendation user display
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
Signed-off-by: npmbuildbot[bot] <npmbuildbot[bot]@users.noreply.github.com>
4 vuotta sitten
Robin Appelman
9735b5d61f
Add method to storage backends to get directory content with metadata
Currently you need to use `opendir` and then call `getMetadata` for
every file, which adds overhead because most storage backends already
get the metadata when doing the `opendir`.
While storagebackends can (and do) use caching to relief this problem,
this adds cache invalidation dificulties and only a limited number of
items are generally cached (to prevent memory usage exploding when
scanning large storages)
With this new methods storage backends can use the child metadata they
got from listing the folder to return metadata without having to keep
seperate caches.
Signed-off-by: Robin Appelman <robin@icewind.nl>
4 vuotta sitten
Joas Schilling
1b93d5f1db
PHP CS fixes
Signed-off-by: Joas Schilling <coding@schilljs.com>
4 vuotta sitten
Joas Schilling
685d7b0637
Directly use the class to get the service
Signed-off-by: Joas Schilling <coding@schilljs.com>
4 vuotta sitten
Joas Schilling
e45c87cd2e
Fix creating the share controller
Signed-off-by: Joas Schilling <coding@schilljs.com>
4 vuotta sitten
Joas Schilling
609b8aff12
Also disallow ; in remote urls
Signed-off-by: Joas Schilling <coding@schilljs.com>
4 vuotta sitten
Christoph Wurst
28f8eb5dba
Add visibility to all constants
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
4 vuotta sitten
Christoph Wurst
1584c9ae9c
Add visibility to all methods and position of static keyword
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
4 vuotta sitten
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>
4 vuotta sitten
Christoph Wurst
14c996d982
Use elseif instead of else if
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
4 vuotta sitten