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 година
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 година
Joas Schilling
d4a4d5c6ef
When no user is logged in null is used
Signed-off-by: Joas Schilling <coding@schilljs.com>
пре 3 година
Morris Jobke
0763a17332
Move federated_share_added into a typed event
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
пре 3 година
Joas Schilling
89ed2c37bf
Update share type constant usage
Signed-off-by: Joas Schilling <coding@schilljs.com>
пре 3 година
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 година
Christoph Wurst
28f8eb5dba
Add visibility to all constants
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
пре 4 година
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 година
Christoph Wurst
14c996d982
Use elseif instead of else if
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
пре 4 година
Christoph Wurst
1a9330cd69
Update the license headers for Nextcloud 19
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
пре 4 година
Christoph Wurst
b80ebc9674
Use the short array syntax, everywhere
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
пре 4 година
Christoph Wurst
5bf3d1bb38
Update license headers
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
пре 4 година
Roeland Jago Douma
e16321368f
Fixes
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
пре 4 година
Joas Schilling
dcdbea54e6
Respect the accepted flag for group and user shares
Signed-off-by: Joas Schilling <coding@schilljs.com>
пре 4 година
Morris Jobke
4b49e2eb52
Fix unnecessary boolean cast
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
пре 5 година
fretn
7efcd11b8e
Fix for crashing occ files:scan
when $share === false then (int)$share['share_type'] will always be equal to (int)0
which results in following crash:
[root@server nextcloud] sudo -u apache php occ files:scan someuser
The current PHP memory limit is below the recommended value of 512MB.
Starting scan for user 1 out of 1 (someuser)
An unhandled exception has been thrown:
TypeError: Argument 1 passed to OC\OCS\DiscoveryService::discover() must be of the type string, null given, called in /var/www/html/nextcloud/apps/files_sharing/lib/External/Manager.php on line 382 and defined in /var/www/html/nextcloud/lib/private/OCS/DiscoveryService.php:65
Stack trace:
0 /var/www/html/nextcloud/apps/files_sharing/lib/External/Manager.php(382): OC\OCS\DiscoveryService->discover(NULL, 'FEDERATED_SHARI...')
1 /var/www/html/nextcloud/apps/files_sharing/lib/External/Manager.php(527): OCA\Files_Sharing\External\Manager->sendFeedbackToRemote(NULL, NULL, NULL, 'decline')
2 /var/www/html/nextcloud/apps/files_sharing/lib/External/Storage.php(216): OCA\Files_Sharing\External\Manager->removeShare('files/Someth...')
3 [internal function]: OCA\Files_Sharing\External\Storage->checkStorageAvailability()
4 /var/www/html/nextcloud/lib/private/Files/Storage/Wrapper/Wrapper.php(505): call_user_func_array(Array, Array)
5 [internal function]: OC\Files\Storage\Wrapper\Wrapper->__call('checkStorageAva...', Array)
6 /var/www/html/nextcloud/lib/private/Files/Storage/Wrapper/Wrapper.php(505): call_user_func_array(Array, Array)
7 /var/www/html/nextcloud/apps/files_sharing/lib/External/Scanner.php(89): OC\Files\Storage\Wrapper\Wrapper->__call('checkStorageAva...', Array)
8 /var/www/html/nextcloud/apps/files_sharing/lib/External/Scanner.php(44): OCA\Files_Sharing\External\Scanner->scanAll()
9 /var/www/html/nextcloud/lib/private/Files/Utils/Scanner.php(245): OCA\Files_Sharing\External\Scanner->scan('', true, 3)
10 /var/www/html/nextcloud/apps/files/lib/Command/Scan.php(172): OC\Files\Utils\Scanner->scan('/someuser', true, NULL)
11 /var/www/html/nextcloud/apps/files/lib/Command/Scan.php(249): OCA\Files\Command\Scan->scanFiles('someuser', '/someuser', false, Object(Symfony\Component\Console\Output\ConsoleOutput), false, true, false)
12 /var/www/html/nextcloud/3rdparty/symfony/console/Command/Command.php(251): OCA\Files\Command\Scan->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
13 /var/www/html/nextcloud/core/Command/Base.php(162): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
14 /var/www/html/nextcloud/3rdparty/symfony/console/Application.php(946): OC\Core\Command\Base->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
15 /var/www/html/nextcloud/3rdparty/symfony/console/Application.php(248): Symfony\Component\Console\Application->doRunCommand(Object(OCA\Files\Command\Scan), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
16 /var/www/html/nextcloud/3rdparty/symfony/console/Application.php(148): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
17 /var/www/html/nextcloud/lib/private/Console/Application.php(213): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
18 /var/www/html/nextcloud/console.php(96): OC\Console\Application->run()
19 /var/www/html/nextcloud/occ(11): require_once('/var/www/html/n...')
20 {main}[root@server nextcloud]
Signed-off-by: fretn <frederikdelaere+github@gmail.com>
пре 5 година
Bjoern Schiessle
412f6a6ecc
fix unit tests
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
пре 5 година
Bjoern Schiessle
3942d731d2
update unit tests
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
пре 5 година
Bjoern Schiessle
7d2add622e
unshare from self
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
пре 5 година
Bjoern Schiessle
f5a816262c
accept/decline group shares
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
пре 5 година
Bjoern Schiessle
b23032e4c5
implement federated group shares
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
пре 6 година
Bjoern Schiessle
41a1528888
implement decline share
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
пре 6 година
Bjoern Schiessle
bbce8c3ea1
adjust to latest api version
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
пре 6 година
Bjoern Schiessle
db428ea547
send accept share notification (WIP)
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
пре 6 година
Morris Jobke
eb51f06a3b
Use ::class statement instead of string
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
пре 6 година
Morris Jobke
0eebff152a
Update license headers
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
пре 6 година
Bjoern Schiessle
e78040d250
improved error handling
check if table was updated successfully and only then send a notification
mail and return "true".
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
пре 6 година
Robin Appelman
7fa02905aa
still remove the federated share even if we cant notify the remote
Signed-off-by: Robin Appelman <robin@icewind.nl>
пре 6 година
Joas Schilling
b5beaf7ef4
Use the share_folder config for remote shares
Signed-off-by: Joas Schilling <coding@schilljs.com>
пре 7 година
Daniel Hansson
119e8474b6
fix for sharing
Signed-off-by: Daniel Hansson <daniel@techandme.se>
пре 7 година
Morris Jobke
c54a59d51e
Remove unused use statements
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
пре 7 година
Bjoern Schiessle
449011dae7
remove discovery manager in favour of the OCSDiscoveryService
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
пре 7 година
Roeland Jago Douma
a1ed8207e9
HTTPHelper is deprecated
Use the IClientService instead
пре 7 година
Joas Schilling
0215b004da
Update with robin
пре 7 година
Joas Schilling
813f0a0f40
Fix apps/
пре 7 година
Robin Appelman
2a72eff9ee
Fix getting the certificate bundle for dav external storage (#25274)
* Fix getting the certificate bundle for dav external storages
* Log the original exception in dav external storage
пре 8 година
Lukas Reschke
aba539703c
Update license headers
пре 8 година
Joas Schilling
3a716ae91c
Move lib/ to PSR-4
пре 8 година
Björn Schießle
20852fd8c0
remove reshares and the mapping in the federated_reshares table on unshare from self
пре 8 година
Björn Schießle
81e3787f9c
close cursor after select to avoid db lock
пре 8 година
Stefan Weil
16df1c5188
apps: Fix typos (found by codespell) (#23862)
Signed-off-by: Stefan Weil <sw@weilnetz.de>
пре 8 година
Lukas Reschke
933f60e314
Update author information
Probably nice for the people that contributed to 9.0 to see themselves in the AUTHORS file :)
пре 8 година
Lukas Reschke
59028cced0
Add autodiscovery support to server-to-server sharing
Adds autodiscovery support to server-to-server sharing as specified in the specification. If no discovery data is found it is using the fallback ownCloud endpoints for legacy support.
пре 8 година
Joas Schilling
2263b8b693
Remove the notification if accepting/declining failed because of 404
пре 8 година
Joas Schilling
c769f5775d
Create the actions with the correct ID
пре 8 година
Joas Schilling
3ff88c8c84
Revert "Disable the remote sharing notifications until they work properly"
This reverts commit 6bc93c7401
.
Conflicts:
apps/files_sharing/lib/external/manager.php
пре 8 година
Joas Schilling
ee02165005
Move the notification API to public namespace
пре 8 година
Thomas Müller
682821c71e
Happy new year!
пре 8 година
Björn Schießle
964fa1fce3
use hooks to auto add server to the list of trusted servers once a federated share was created
пре 8 година
Lukas Reschke
8f09d5b67c
Update license headers
пре 8 година