aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files_sharing/lib
Commit message (Collapse)AuthorAgeFilesLines
...
* | Unify share type sorting when getting shares of a file or with subfilesDaniel Calviño Sánchez2019-10-251-1/+1
| | | | | | | | Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
* | Remove unneeded calls to "ShareManager::shareProviderExists()"Daniel Calviño Sánchez2019-10-251-13/+3
|/ | | | | | | | | "ShareManager::getSharesBy()" already checks if the share provider exists before returning the shares and, if the provider does not exist, it returns an empty array. Therefore it is not needed to explicitly check if the provider exists or not. Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
* Include the share in the Files_Sharing::loadAdditionalScripts eventDaniel Calviño Sánchez2019-10-171-1/+2
| | | | | | | | This provides a better context for apps using the event, for example to load one script or another depending on whether the share is a file or a folder. Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
* Move over OCSShareAPIMIddleware to pure DIRoeland Jago Douma2019-10-161-8/+1
| | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* List share download activity under sharingJoas Schilling2019-10-101-2/+6
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Fix shares read permissionsJohn Molakvoæ (skjnldsv)2019-10-041-5/+21
| | | | | | | A user with reshare permissions on a file is now able to get any share of that file (just like the owner). Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
* Add checks for whether a user with access to a share can delete itJohn Molakvoæ (skjnldsv)2019-10-041-9/+89
| | | | Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
* Extract check for whether a user with access to a share can edit itJohn Molakvoæ (skjnldsv)2019-10-041-1/+28
| | | | Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
* Prevent non owners to update others link sharesJohn Molakvoæ (skjnldsv)2019-10-041-50/+50
| | | | Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
* Use same settings for mail share as link sharesJohn Molakvoæ (skjnldsv)2019-10-041-20/+13
| | | | Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
* Merge pull request #17021 from nextcloud/bye-spreed-hello-talkJoas Schilling2019-09-112-4/+4
|\ | | | | Bye Spreed namespace, hello Talk!
| * Bye Spreed namespace, hello Talk!Joas Schilling2019-09-052-4/+4
| | | | | | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* | Correctly check for new default rootJoas Schilling2019-09-041-3/+3
| | | | | | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* | Properly initialize the CacheJail for sharingJulius Härtl2019-09-031-1/+1
|/ | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
* Add expiration event for sharesJohn Molakvoæ (skjnldsv)2019-08-212-1/+21
| | | | Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
* Unify the permission checking in one place onlyJoas Schilling2019-07-031-31/+3
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Correctly check share permissions when updating a re-sub-shareJoas Schilling2019-06-271-3/+13
| | | | | | | | | | Before this change the node you shared was checked for permissions. This works when you reshare the folder that was shared with you. However when you reshared a subfolder (e.g. as public link), you could afterwards update the permissions and grant create+update permissions although the share you receive was read-only. Signed-off-by: Joas Schilling <coding@schilljs.com>
* add "askForPassword" on capabilities for sharingtobiasKaminsky2019-05-131-0/+6
| | | | Signed-off-by: tobiasKaminsky <tobias@kaminsky.me>
* Fix public upload by also load the semaphore methodMorris Jobke2019-05-071-0/+1
| | | | Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Do not allow JavaScript "eval" in the public share auth page with TalkDaniel Calviño Sánchez2019-04-101-2/+0
| | | | | | | | Talk no longer uses JavaScript "eval", so the Content Security Policy can now be configured to prevent its use in the public share authentication page when the password is protected by Talk. Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
* do not returns shared_with === currentUserMaxence Lange2019-04-011-1/+1
| | | Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
* fixing share formatMaxence Lange2019-03-311-1/+1
| | | Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
* issue during last pushMaxence Lange2019-03-311-1/+1
| | | Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
* returns reshares in APIMaxence Lange2019-03-311-9/+29
| | | Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
* Fix unnecessary boolean castMorris Jobke2019-03-061-1/+1
| | | | Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Merge pull request #13790 from fretn/masterMorris Jobke2019-03-061-1/+1
|\ | | | | Fix for crashing occ files:scan
| * Fix for crashing occ files:scanfretn2019-01-241-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | Search sharees on lookup server when explicitly requested by userChristoph Wurst2019-02-261-0/+2
| | | | | | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* | Merge pull request #13514 from nextcloud/fix-public-grid-toggleMorris Jobke2019-02-251-0/+2
|\ \ | | | | | | Fix grid toggle button on public page
| * | Fix grid toggle button on public pageJohn Molakvoæ (skjnldsv)2019-02-211-0/+2
| | | | | | | | | | | | Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
* | | Show sharing recommendationsChristoph Wurst2019-02-251-1/+157
|/ / | | | | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* | Fix writable public folder shareJulius Härtl2019-02-191-0/+1
| | | | | | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
* | Catch Request exception in testRemoteUrlRoeland Jago Douma2019-02-151-0/+3
| | | | | | | | | | | | | | Else the background job fails hard if the remote has for example an invalid certificate. Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* | add myself as @authorJonas Sulzer2019-01-311-0/+1
| | | | | | | | Signed-off-by: Jonas Sulzer <jonas@violoncello.ch>
* | code stylingJonas Sulzer2019-01-311-2/+1
| | | | | | | | Signed-off-by: Jonas Sulzer <jonas@violoncello.ch>
* | restructure codeJonas Sulzer2019-01-311-26/+23
| | | | | | | | Signed-off-by: Jonas Sulzer <jonas@violoncello.ch>
* | only show "Add to your Nextcloud" on share link if federation is activatedJonas Sulzer2019-01-311-2/+14
|/ | | | Signed-off-by: Jonas Sulzer <jonas@violoncello.ch>
* Add caching headers for public previewsJulius Härtl2019-01-021-2/+6
| | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
* Fix typo in "incoming"Joas Schilling2018-12-051-2/+2
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Merge pull request #12624 from nextcloud/bugfix/noid/validate-all-rich-objectsMorris Jobke2018-12-041-1/+1
|\ | | | | Validate all rich objects
| * Fix wrong used typeJoas Schilling2018-11-231-1/+1
| | | | | | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* | Merge pull request #12628 from ↵Morris Jobke2018-11-301-0/+12
|\ \ | | | | | | | | | | | | nextcloud/bugfix/act-317/missing-activity-for-user-self-unshare Parse activity when a user self-unshares a file
| * | Parse activity when a user self-unshares a fileJoas Schilling2018-11-231-0/+12
| |/ | | | | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* | Add interface to allow storages from opting out of encryptionRobin Appelman2018-11-292-2/+4
| | | | | | | | | | | | As opposed to hard-coding a list of excluded storages Signed-off-by: Robin Appelman <robin@icewind.nl>
* | add capabilities for multiple share linksBjoern Schiessle2018-11-261-0/+1
|/ | | | Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
* Handle permission in update of share betterRoeland Jago Douma2018-11-201-0/+4
| | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Rollback to default list viewJohn Molakvoæ (skjnldsv)2018-11-151-2/+2
| | | | Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
* Merge pull request #12398 from nextcloud/fix/12378Morris Jobke2018-11-131-6/+15
|\ | | | | change "Download" to "Download all files" for shared folders
| * change "Download" to "Download all files" for shared foldersJonas Sulzer2018-11-101-6/+15
| | | | | | | | | | | | fixes #12378 Signed-off-by: Jonas Sulzer <jonas@violoncello.ch>
* | Use the defined func()->count() instead of manual countingJoas Schilling2018-11-081-1/+1
|/ | | | Signed-off-by: Joas Schilling <coding@schilljs.com>