summaryrefslogtreecommitdiffstats
path: root/apps/files_sharing/lib/MountProvider.php
Commit message (Collapse)AuthorAgeFilesLines
* Add SHARE_TYPE_SCIENCEMESHMichiel de Jong2023-03-081-0/+1
| | | | Signed-off-by: Michiel de Jong <michiel@unhosted.org>
* Read notes from share already loaded into memoryDariusz Olszewski2022-10-071-0/+7
| | | | Signed-off-by: Dariusz Olszewski <starypatyk@users.noreply.github.com>
* Multiple fixesCarl Schwan2022-07-311-2/+3
| | | | | | | | | | | - Fix tests - Use non deprecated event stuff - Add a bit of type hinting to the new stuff - More safe handling of instanceOfStorage (share might not be the first wrapper) - Fix resharing Signed-off-by: Carl Schwan <carl@carlschwan.eu>
* Add share attributes + prevent download permissionVincent Petry2022-07-281-5/+24
| | | | | | Makes it possible to store download permission Signed-off-by: Vincent Petry <vincent@nextcloud.com>
* Move CappedMemoryCache to OCPCarl Schwan2022-07-141-1/+1
| | | | | | | | This is an helpful helper that should be used in more place than just server and this is already the case with groupfodlers, deck, user_oidc and more using it, so let's make it public Signed-off-by: Carl Schwan <carl@carlschwan.eu>
* Add stricter psalm type for CappedMemoryCacheCarl Schwan2022-05-121-0/+1
| | | | Signed-off-by: Carl Schwan <carl@carlschwan.eu>
* cache the verification of the share mountpointRobin Appelman2022-04-211-2/+9
| | | | | | after the initial verification this can only really be invalidated by a system mount (external/group/etc) being created at the share target since any normal file/folder creation will already conflict with the share Signed-off-by: Robin Appelman <robin@icewind.nl>
* invalidate mount cache after share renameRobin Appelman2022-03-241-1/+3
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* add event for when a share is mountedRobin Appelman2021-08-241-1/+19
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* Update php licensesJohn Molakvoæ (skjnldsv)2021-06-041-1/+0
| | | | Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
* Update all license headers for Nextcloud 21Christoph Wurst2020-12-161-1/+2
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Include deck shares in sharing mountsJulius Härtl2020-12-091-0/+2
| | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
* Update the license headers for Nextcloud 20Christoph Wurst2020-08-241-1/+0
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Use matching parameter names form interfaces and implementationsMorris Jobke2020-08-191-3/+3
| | | | | | Found by Psalm 3.14.1 Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Update share type constant usageJoas Schilling2020-06-241-4/+4
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Always sort shares in a reliable wayJoas Schilling2020-06-081-3/+5
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Update license headers for 19Christoph Wurst2020-04-291-0/+1
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Format control structures, classes, methods and functionChristoph Wurst2020-04-101-1/+0
| | | | | | | | | | | | | | | 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>
* Unify function spacing to PSR2 recommendationChristoph Wurst2020-04-091-1/+1
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Update license headersChristoph Wurst2019-12-051-1/+2
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Make sure the super share also has a valid typeJoas Schilling2019-11-121-3/+5
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Only restrict loading of group and user shares for nowJoas Schilling2019-11-121-1/+3
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Respect the accepted flag for group and user sharesJoas Schilling2019-11-121-1/+11
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* cache parent exists status during share setupRobin Appelman2018-08-161-1/+4
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* only determine is sharing is disabled for a user onceRobin Appelman2018-08-161-1/+3
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* re-use view instances for shared storagesRobin Appelman2018-08-161-2/+13
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* more efficient unique share target generationRobin Appelman2018-08-161-2/+3
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* Add room shares to the MountProvider for sharesDaniel Calviño Sánchez2018-08-081-0/+1
| | | | | | | | The MountProvider for shares creates mount points for the files shared with the user, which makes possible to use the received shared files and folders as regular files and folders. Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
* Update license headersMorris Jobke2017-11-061-0/+2
| | | | Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Merge pull request #3884 from nextcloud/downstream-26956Joas Schilling2017-03-201-1/+17
|\ | | | | Skip null groups in group manager
| * Use DIJoas Schilling2017-03-171-1/+1
| | | | | | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
| * Skip null groups in group manager (#26871) (#26956)Vincent Petry2017-03-171-1/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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>
* | shares-circlesMaxence Lange2017-03-171-0/+3
|/ | | Signed-off-by: Maxence Lange <maxence@nextcloud.com>
* When grouping shares, sort by stime then id (#26777)Vincent Petry2016-12-191-1/+1
| | | | | | | If share times are equal, the first share should still win instead of having the shares swapped. Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
* let the share backend get the node cacheentry to save queriesRobin Appelman2016-11-171-0/+3
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* Move OC\Files\Storage\Shared to the right namespaceJoas Schilling2016-10-201-1/+1
|
* Make share target consistent when grouping group share with user shareVincent Petry2016-08-031-8/+19
| | | | | | | | | | | | | | | | In some situations, a group share is created before a user share, and the recipient renamed the received share before the latter is created. In this situation, the "file_target" was already modified and the second created share must align to the already renamed share. To achieve this, the MountProvider now groups only by "item_source" value and sorts by share time. This makes it so that the least recent share is selected as super-share and its "file_target" value is then adjusted in all grouped shares. This fixes the issue where this situation would have different "file_target" values resulting in two shared folders appearing instead of one.
* Improved share grouping readability + fixed testVincent Petry2016-08-031-8/+17
|
* Group shares with same source and targetRoeland Jago Douma2016-08-031-3/+67
| | | | | | | Fixes #24575 Note that this is a very limited solution and eventually we want smarter merging!
* Update with robinJoas Schilling2016-07-211-1/+1
|
* Fix apps/Joas Schilling2016-07-211-2/+4
|
* Filter out group shares for owner where owner is included (#25190)Vincent Petry2016-06-211-2/+3
|
* Catch exceptions while creating shared mounts (#25077)Robin Appelman2016-06-201-10/+23
|
* Update license headersLukas Reschke2016-05-261-0/+1
|
* Move lib/ to PSR-4Joas Schilling2016-05-251-0/+83