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
Morris Jobke
2ad95feab6
Merge pull request #21816 from nextcloud/techdebt/noid/federatedfilesharing-to-ibootstrap
...
Use IBootstrap for the app federatedfilesharing
2020-07-14 20:44:05 +02:00
Morris Jobke
7e281a07bb
Use IBootstrap for the app federatedfilesharing
...
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2020-07-14 16:34:43 +02:00
Gary Kim
a2cedcefee
Add user input for link share labels
...
Signed-off-by: Gary Kim <gary@garykim.dev>
2020-07-14 10:02:17 +08:00
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>
2020-07-09 10:12:53 +02:00
Roeland Jago Douma
1913b1b91f
Merge pull request #21591 from nextcloud/debt/noid/set-path-for-ocm-permissions
...
Pass $path to ocmPermissions2ncPermissions
2020-07-02 21:10:19 +02:00
Joas Schilling
d7c0b9cced
Also always return in app commands
...
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-06-26 15:12:11 +02:00
Daniel Kesselberg
6b1af4ac8c
Pass $path to ocmPermissions2ncPermissions
...
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
2020-06-25 23:42:36 +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
Joas Schilling
b740d283a9
Don't initialize Application directly
...
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-06-17 12:18:15 +02:00
Joas Schilling
56b04c65f7
Always sort shares in a reliable way
...
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-06-08 14:47:15 +02:00
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>
2020-06-02 09:21:09 +02:00
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>
2020-05-29 01:41:06 +02:00
Roeland Jago Douma
ef34f72167
Have share permissions on link shares if it is enabled
...
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2020-05-15 08:18:03 +02:00
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>
2020-05-05 21:36:46 +02:00
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>
2020-05-04 11:48:11 +00:00
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>
2020-04-29 17:53:35 +00: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
Morris Jobke
1738e17e20
Merge pull request #19793 from nextcloud/bugfix/noid/link-to-federated-reshare
...
Fix resharing of federated shares that were created out of links
2020-04-27 11:05:34 +02:00
Roeland Jago Douma
4114bce1e5
Merge pull request #17623 from j3l11234/master
...
Add support for download share on old android browser
2020-04-24 16:01:45 +02:00
Robin Appelman
7a4ea4a6b6
make php-cs happy
...
Signed-off-by: Robin Appelman <robin@icewind.nl>
2020-04-23 13:35:30 +02:00
Morris Jobke
f0ad46dec8
Merge pull request #20575 from nextcloud/fix/sharing-suggestions
...
Fix Sharing recommendation user display
2020-04-22 14:56:01 +02:00
Roeland Jago Douma
8f650feede
Merge pull request #20114 from nextcloud/techdebt/noid/allow-some-apps-to-have-root-urls
...
Allow some apps to have root URLs in their own routing file
2020-04-21 16:00:34 +02:00
Julius Härtl
5646f7c761
Link shares have reshare permission if outgoing federated shares are enabled
...
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2020-04-21 14:35:29 +02:00
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>
2020-04-21 07:48:10 +00:00
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>
2020-04-20 15:45:04 +02:00
Joas Schilling
1b93d5f1db
PHP CS fixes
...
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-04-18 11:21:28 +02:00
Joas Schilling
685d7b0637
Directly use the class to get the service
...
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-04-18 11:21:28 +02:00
Joas Schilling
e45c87cd2e
Fix creating the share controller
...
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-04-18 11:21:28 +02:00
Joas Schilling
609b8aff12
Also disallow ; in remote urls
...
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-04-14 18:56:06 +02:00
Christoph Wurst
28f8eb5dba
Add visibility to all constants
...
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-04-10 16:54:27 +02:00
Christoph Wurst
1584c9ae9c
Add visibility to all methods and position of static keyword
...
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-04-10 16:51:06 +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
14c996d982
Use elseif instead of else if
...
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-04-10 10:35:09 +02:00
Christoph Wurst
008e6d7e84
Merge pull request #20391 from nextcloud/refactor/spaces-cleanup
...
Remove all extra whitespace PSR2 does not like
2020-04-09 20:39:37 +02:00
Christoph Wurst
64510932b8
Merge pull request #20384 from nextcloud/techdebt/lowercase-keywords
...
Use php keywords in lowercase
2020-04-09 16:25:14 +02:00
Christoph Wurst
f4c09f299d
Make sure there is exactly one newline after imports
...
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-04-09 16:14:31 +02:00
Christoph Wurst
bcd13296de
Make sure every file ends with an empty newline
...
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-04-09 16:11:50 +02:00
Christoph Wurst
44577e4345
Remove trailing and in between spaces
...
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-04-09 16:07:47 +02:00
Christoph Wurst
36b3bc8148
Use php keywords in lowercase
...
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-04-09 14:04: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
41b5e5923a
Use exactly one empty line after the namespace declaration
...
For PSR2
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-04-09 11:48:10 +02:00
Christoph Wurst
2fbad1ed72
Fix (array) indent style to always use one tab
...
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-04-09 10:16:08 +02:00
Christoph Wurst
85e369cddb
Fix multiline comments
...
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-04-08 22:24:54 +02:00
Joas Schilling
f878ea9606
Remove user name from public sharing page
...
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-04-01 17:14:38 +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
463b388589
Merge pull request #20170 from nextcloud/techdebt/remove-unused-imports
...
Remove unused imports
2020-03-27 17:14:08 +01: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
74936c49ea
Remove unused imports
...
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-03-25 22:08:08 +01:00
Christoph Wurst
37786c4d74
Convert share event to an interaction event
...
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-03-25 16:16:45 +01:00
Roeland Jago Douma
e6ec084a58
Auto accept group shares for users added to a group
...
In case auto accepting is enabled (the default). Users that are newly
added to a group should not have to accept those shares.
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2020-03-25 08:51:27 +01:00
Julius Härtl
87393a760e
Remove unused properties in ShareesAPIController
...
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2020-03-20 10:43:56 +01:00
Joas Schilling
6edb93fc4a
Allow the video player on the hide download
...
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-03-19 15:14:00 +01:00
Joas Schilling
8db32805be
Fix willReturnOnConsecutiveCalls
...
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-03-13 11:11:00 +01:00
Joas Schilling
3930ab8e8a
Don't allow anchors and queries in remote urls
...
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-03-12 13:44:48 +01:00
John Molakvoæ
9fda1ee39f
Merge pull request #19777 from nextcloud/fix/viewer-public
...
Properly emit Viewer event on files and files_sharing
2020-03-12 08:47:14 +01:00
Joas Schilling
24d0fb9fcd
Merge pull request #19861 from nextcloud/bugfix/noid/load-remote-shares-also-when-one-is-down
...
Don't break when one remote share is down
2020-03-11 09:36:57 +01:00
John Molakvoæ (skjnldsv)
92a6530c0f
Properly emit Viewer event on files and files_sharing
...
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
2020-03-11 09:28:27 +01:00
John Molakvoæ (skjnldsv)
6c968fe77d
Fix import order and formatting
...
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
2020-03-11 09:27:20 +01:00
Joas Schilling
f4918f208e
Unify the code a bit
...
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-03-10 19:36:57 +01:00
Joas Schilling
bbef026aa0
Use contacts name on federated activities
...
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-03-10 19:36:56 +01:00
Joas Schilling
886293fdcc
Don't break when one remote share is down
...
getFileInfo can also return false
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-03-09 17:00:31 +01:00
Roeland Jago Douma
7613681627
Don't try to format deleted shares
...
Fixes #15455
The issue is that we have a fallback for shares to use the target. So
when the target exists again we happily format it (not that the shares
are still invalid).
This just tries to get the node. If we can't then boom.
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2020-03-02 09:18:04 +01:00
Joas Schilling
a792a31448
Allow single file downloads so the video player works again
...
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-02-28 16:25:09 +01:00
Joas Schilling
841f2f3b04
Allow to overwrite share target mountpoints
...
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-02-17 09:04:19 +01:00
Roeland Jago Douma
302ea0650e
Merge pull request #19349 from nextcloud/bugfix/noid/prevent-download-on-secure-view
...
Prevent archieved download on secure view
2020-02-08 10:18:24 +01:00
Joas Schilling
35d4ca4d5d
Prevent archieved download on secure view
...
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-02-07 12:46:23 +01:00
Roeland Jago Douma
260892eb3b
Disable link shares of disabled users
...
Fixes #10869
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2020-02-07 07:47:38 +01:00
Roeland Jago Douma
8f15e2d57a
Use the target for file notifications
...
The node is not yet accessible if you did not accept the share yet.
So trying to get it results in an acception.
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2020-01-24 12:43:17 +01:00
Julius Härtl
eb4c42d3d1
Make auto accepting the default and provide setting to enforce the share acceptance process
...
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2020-01-16 22:07:51 +01:00
Julius Härtl
fa966ebaf1
Remove global share accepter since auto-accepting is the default
...
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2020-01-16 22:07:51 +01:00
Roeland Jago Douma
960d89ae31
Listen to the right even for auto share accept
...
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2020-01-15 23:10:21 +01:00
Roeland Jago Douma
fc77f530d7
Don't show link shares hash in inherited share list
...
This adds no value at all. Just showing the text "(Shared link)" now.
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2020-01-15 09:21:53 +01:00
Christoph Wurst
6127c288e8
Fix license headers
...
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-01-13 14:23:49 +01:00
Maxence Lange
554c4a7cf8
moving ->getParent earlier
...
Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
2020-01-08 08:56:14 -01:00
Julius Härtl
445274cf93
Add pending share list to frontend
...
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2020-01-07 19:35:45 +01:00
Roeland Jago Douma
fbed6a3416
A pending shares overview
...
Now that we accept shares we should show an overview of shares that are
pending. This first part is the small API to get a list of the currently
pending shares.
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2020-01-07 08:53:33 +01:00
Roeland Jago Douma
fb6b84b5c9
Accept shares when you open mail
...
Fixes #18380
When you open a direct share to yourself. We should autoaccept the
share.
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2020-01-06 16:48:21 +01:00
Roeland Jago Douma
1672ff3bef
Do not use $_GET
...
The appframework is more than capable of handling this properly.
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2020-01-05 20:13:11 +01:00
Maxence Lange
441b81a3af
confirm resharing rights if viewer is current owner
...
Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
2020-01-02 11:34:20 -01:00
Christoph Wurst
1b46621cd3
Update license headers for 18
...
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2019-12-20 09:23:25 +01:00
Roeland Jago Douma
b86990988e
Use the user from the notification
...
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2019-12-18 08:37:03 +01:00
Roeland Jago Douma
e7dc91002f
Allow users to specify to accept (internal) shares by default
...
Fixes #18255
A new user setting allows a user to always accept (internal) shares. For
example if they don't like accepting shares manually ;)
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2019-12-17 10:49:29 +01:00