summaryrefslogtreecommitdiffstats
path: root/lib/private/Share20/DefaultShareProvider.php
Commit message (Collapse)AuthorAgeFilesLines
* Update license headersMorris Jobke2017-11-061-0/+6
| | | | Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* More phpstorm inspection fixesRoeland Jago Douma2017-07-241-1/+1
| | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Fix 500 Internal Server Error on writingJan-Philipp Litza2017-06-161-1/+1
| | | | | | | | | | | | | | | | | | | In some not yet completely determined configurations, the following error could occur while writing a file: Error: Call to a member function getUsers() on null /var/www/nextcloud/lib/private/Share20/Manager.php - line 1277: OC\Share20\DefaultShareProvider->getAccessList(Array, true) /var/www/nextcloud/lib/private/Share20/ShareHelper.php - line 51: OC\Share20\Manager->getAccessList(Object(OC\Files\Node\Folder), true, true) /var/www/nextcloud/apps/activity/lib/FilesHooks.php - line 616: OC\Share20\ShareHelper->getPathsForAccessList(Object(OC\Files\Node\File)) /var/www/nextcloud/apps/activity/lib/FilesHooks.php - line 196: OCA\Activity\FilesHooks->getUserPathsFromPath('/path/to/file', 'user') /var/www/nextcloud/apps/activity/lib/FilesHooks.php - line 157: OCA\Activity\FilesHooks->addNotificationsForFileAction('/path/to/file', 'file_changed', 'changed_self', 'changed_by') /var/www/nextcloud/apps/activity/lib/FilesHooksStatic.php - line 55: OCA\Activity\FilesHooks->fileUpdate('/path/to/file') /var/www/nextcloud/lib/private/legacy/hook.php - line 106: OCA\Activity\FilesHooksStatic fileUpdate(Array) /var/www/nextcloud/lib/private/Files/View.php - line 1245: OC_Hook emit('OC_Filesystem', 'post_update', Array) /var/www/nextcloud/lib/private/Files/View.php - line 1173: OC\Files\View->runHooks(Array, '/path/to/file', true) /var/www/nextcloud/lib/private/Files/View.php - line 679: OC\Files\View->basicOperation('file_put_conten...', '/path/to/file', Array, '<?xml version="...') /var/www/nextcloud/lib/private/Files/Node/File.php - line 64: OC\Files\View->file_put_contents('/path/to/file', '<?xml version="...') [...] Signed-off-by: Jan-Philipp Litza <janphilipp@litza.de>
* filter missing groups in share providerRobin Appelman2017-06-121-0/+2
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* Remove unused use statementsMorris Jobke2017-04-221-1/+0
| | | | Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Adjust docs and make !$currentAccess simplerJoas Schilling2017-04-131-1/+3
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Fix default share providerJoas Schilling2017-04-131-6/+7
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Return the paths for the users without setting them all upJoas Schilling2017-04-131-8/+46
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Add mail element to access listRoeland Jago Douma2017-04-131-1/+1
| | | | | | | | * Each provider just returns what they have so adding an element won't require changing everything * Added tests Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Offload acceslist creation to providersRoeland Jago Douma2017-04-131-3/+73
| | | | | | | | * This allows for effective queries. * Introduce currentAccess parameter to speciy if the users needs to have currently acces (deleted incomming group share). (For notifications) Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* properly quota table names in getSharesInFolderRobin Appelman2017-04-101-1/+1
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* update unit testsBjoern Schiessle2017-04-071-1/+1
| | | | Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
* set expire date for all share typesBjoern Schiessle2017-04-031-0/+3
| | | | Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
* add new password column to the share table in order to set passwords for ↵Bjoern Schiessle2017-04-031-3/+3
| | | | | | share by mails Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
* Skip null groups in group manager (#26871) (#26956)Vincent Petry2017-03-171-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Skip null groups in group manager (#26871) * Skip null groups in group manager * Also skip null groups in group manager's search function * Add more group null checks in sharing code * Add unit tests for null group safety in group manager * Add unit tests for sharing code null group checks * Added tests for null groups handling in sharing code * Ignore moveShare optional repair in mount provider In some cases, data is inconsistent in the oc_share table due to legacy data. The mount provider might attempt to make it consistent but if the target group does not exist any more it cannot work. In such case we simply ignore the exception as it is not critical. Keeping the exception would break user accounts as they would be unable to use their filesystem. * Adjust null group handing + tests * Fix new group manager tests Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Fix detecting deleted shares in object storeAndrius2017-03-091-1/+2
| | | While using the object store, the shares, that are moved to trashbin were still detected as accessible and cause broken shares to be shown in file/folder listing.
* commit transaction after select queryphisch2016-12-161-1/+1
| | | | Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
* always use numeric storage id in cacheentryRobin Appelman2016-12-131-1/+0
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* also work with group sharesRobin Appelman2016-11-171-1/+5
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* let the share backend get the node cacheentry to save queriesRobin Appelman2016-11-171-3/+18
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* Fix merging backend resultsRoeland Jago Douma2016-11-011-1/+2
| | | | | | | | * Merge share types correctly * Filter share types * Order share types Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Stricter signatureRoeland Jago Douma2016-10-311-1/+2
| | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Add getShareTypesInFolder to optimize folder listeningRobin Appelman2016-10-311-0/+43
| | | | Signed-off-by: Robin Appelman <icewind@owncloud.com>
* Merge pull request #1640 from nextcloud/less_queries_group_shareMorris Jobke2016-10-101-30/+49
|\ | | | | More efficient group share resolving
| * More efficient group share resolvingRoeland Jago Douma2016-10-061-30/+49
| | | | | | | | | | | | | | | | | | | | | | When resolving a group share to the user group share we used to do this on a per share basis. Now we try to do this for all group shares at once. Of course still chunked. Before: N incomming group shares this would mean 1 + N queries Now: N incomming roups shares this would mean 1 + 1 queries Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* | Prefilter inaccessible shares in DefaultShareProvider::getSharedWith()Vincent Petry2016-10-061-8/+38
|/ | | | | | | | | | | The DefaultShareProvider now does a DB-level check to find out whether file_source is accessible at all (deleted file) or whether it's in the trashbin of a home storage. One small corner case where the home storage id is in md5 form cannot be covered properly with this approach. Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
* Fix othersJoas Schilling2016-07-211-3/+4
|
* Update license headersLukas Reschke2016-05-261-0/+1
|
* use share initiator as fall back to access the fileBjörn Schießle2016-05-201-1/+1
| | | | | in case of federated re-shares the owner can be a remote user. Therefore we can't always use to owner to access the local file
* Move post_removeFromGroup to shareManagerRoeland Jago Douma2016-04-131-0/+38
| | | | | | | | The last sharing hook to be moved over. * Added unit tests * Removed old tests that relied on old behaviour * Removed old hooks.php
* Migrate post_groupDelete hook to share manager (#23841)Roeland Douma2016-04-121-0/+43
| | | | | | | | The hook now calls the share manager that will call the responsible shareProvider to do the proper cleanup. * Unit tests added Again nothing should change it is just to cleanup old code
* Migrate post_userDelete hook to share managerRoeland Jago Douma2016-04-041-1/+64
| | | | | | | | | | | | | This makes the post_userDelete hook call the sharemanager. This will cleanup to and from this user. * All shares owned by this user * All shares with this user (user) * All custom group shares * All link share initiated by this user (to avoid invisible link shares) Unit tests are added for the defaultshare provider as well as the federated share provider
* Remove dead functionRoeland Jago Douma2016-03-231-24/+0
| | | | | This was used when we did not have lazy shares yet. Now that we no longer support legacy shares this can go.
* Remove support for old shares in the default share providerRoeland Jago Douma2016-03-231-24/+3
| | | | | | | | | In 9.0 we converted the old shares to the new shares. So for 9.1 we can savely remove the fallback code. This code was required when there was no initiator set. * Fixed unit tests
* Move (new) sharing over to composer autoloaderRoeland Jago Douma2016-03-201-0/+852