summaryrefslogtreecommitdiffstats
path: root/tests/lib/Share20
Commit message (Collapse)AuthorAgeFilesLines
* Use the language of the recipient for the share notificationJoas Schilling2017-09-081-0/+11
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Move pre_shared and post_shared events to EventDispatcherRoeland Jago Douma2017-08-032-86/+237
| | | | | | | | * Now listeners for those events get proper share objects. * Legacy hooks still fired * Updated tests Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Send an email once a file/folder is shared with a userMorris Jobke2017-07-281-7/+40
| | | | | | | * only if user has set an email address * only for user shares (no group shares for now) Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Emit hook postUnshareFromSelf when the recipient of a share unshares itPauli Järvinen2017-07-202-0/+86
| | | | | | - This kind of hook signal used to be emitted in the old Share library but it was missing from Share 2.0 Signed-off-by: Pauli Järvinen <pauli.jarvinen@gmail.com>
* Fix emitting of legacy hook post_unsharePauli Järvinen2017-07-161-1/+1
| | | | | | - When a file was unshared, the legacy hook pre_unshare fired twice and the hook post_unshare did not fire at all. This was obviously a copy-paste error. Signed-off-by: Pauli Järvinen <pauli.jarvinen@gmail.com>
* Improve wording of various error messagesJan-Christoph Borchardt2017-06-211-22/+22
| | | | Signed-off-by: Jan-Christoph Borchardt <hey@jancborchardt.net>
* Fix unknown share tokenJoas Schilling2017-06-131-0/+5
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Add missing unit test for updateShare with email shareDaniel Calviño Sánchez2017-04-241-0/+75
| | | | Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
* Add missing hook checkDaniel Calviño Sánchez2017-04-241-2/+13
| | | | Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
* Fix double hashing of shared link passwordsDaniel Calviño Sánchez2017-04-241-0/+6
| | | | | | | | | | The plain text password for a shared links was hashed and, then, the hashed password was hashed again and set as the final password. Due to this the password introduced in the "Authenticate" page for the shared link was always a wrong password, and thus the file could not be accessed. Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
* Get proper accesslist for userFolderRoeland Jago Douma2017-04-201-2/+1
| | | | | | | If the accesslist is requested for a users root folder we should properly construct the path Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Add more tests for the share helperJoas Schilling2017-04-131-0/+111
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Activate the testJoas Schilling2017-04-131-1/+1
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Adjust docs and make !$currentAccess simplerJoas Schilling2017-04-131-4/+12
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Fix share manager testJoas Schilling2017-04-131-13/+24
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Fix default share providerJoas Schilling2017-04-131-10/+10
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Fix tests for ShareHelperJoas Schilling2017-04-131-44/+70
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Add shareHelper testRoeland Jago Douma2017-04-131-0/+94
| | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Add mail element to access listRoeland Jago Douma2017-04-132-4/+0
| | | | | | | | * 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-132-41/+232
| | | | | | | | * 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>
* Fix testsRoeland Jago Douma2017-04-131-0/+6
| | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Add owner to access listRoeland Jago Douma2017-04-131-1/+1
| | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Add getAccessList to ShareManagerRoeland Jago Douma2017-04-131-1/+82
| | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* update unit testsBjoern Schiessle2017-04-071-7/+10
| | | | Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
* Merge pull request #3844 from nextcloud/unshare_eventJoas Schilling2017-03-212-171/+189
|\ | | | | Unshare event
| * Add LegacyHooksRoeland Jago Douma2017-03-172-171/+189
| | | | | | | | | | | | | | Use a helper class to listen to the eventDispatcher calls from the share manager to emit the old \OC_Hooks Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* | Merge pull request #3884 from nextcloud/downstream-26956Joas Schilling2017-03-202-0/+115
|\ \ | | | | | | Skip null groups in group manager
| * | Skip null groups in group manager (#26871) (#26956)Vincent Petry2017-03-172-0/+115
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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-1/+1
|/ | | Signed-off-by: Maxence Lange <maxence@nextcloud.com>
* also create mail share if public links are disabledBjoern Schiessle2017-01-041-0/+110
| | | | Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
* Don't resolve public share token if public sharing is disabledLukas Reschke2016-12-201-52/+98
| | | | | | Otherwise disabling sharing does prevent access to the view controllers but one can still access the shares using the public preview route or the public WebDAV endpoint. Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
* add method to check if a share provider for a given type is loadedBjoern Schiessle2016-11-011-0/+40
| | | | Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
* Add defaultShareProvider & federatedshareprovider testsRoeland Jago Douma2016-11-011-0/+91
| | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Add Manager unit testsRoeland Jago Douma2016-11-011-6/+77
| | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Add getShareTypesInFolder to optimize folder listeningRobin Appelman2016-10-311-0/+9
| | | | Signed-off-by: Robin Appelman <icewind@owncloud.com>
* Fix DateTime comparissonRoeland Jago Douma2016-10-211-1/+1
| | | | | | | Datetime now returns microseconds. But if the database doesn't store those comparing them for equality most likely fails. Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Fix typehintRoeland Jago Douma2016-10-101-2/+2
| | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Cleanup test caseThomas Müller2016-10-101-10/+15
| | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Prefilter inaccessible shares in DefaultShareProvider::getSharedWith()Vincent Petry2016-10-061-23/+158
| | | | | | | | | | | 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 getMock ManagerTestRoeland Jago Douma2016-09-131-1/+1
|
* Fix getMock ShareRoeland Jago Douma2016-09-071-2/+3
|
* Fix getMock shareRoeland Jago Douma2016-09-062-206/+219
|
* Merge remote-tracking branch 'upstream/master' into master-sync-upstreamLukas Reschke2016-06-271-18/+0
|\
| * Add explicit delete permission to link sharesVincent Petry2016-06-241-18/+0
| | | | | | | | | | | | | | | | | | | | | | | | Link shares always allowed deletion, however internally the permissions were stored as 7 which lacked delete permissions. This created an inconsistency in the Webdav permissions. This fix makes sure we include delete permissions in the share permissions, which now become 15. In case a client is still passing 7 for legacy reasons, it gets converted automatically to 15.
* | remove old hook, no longer neededBjoern Schiessle2016-06-271-19/+16
| |
* | check password for link sharesBjoern Schiessle2016-06-271-6/+14
| |
* | add hide file list optionBjoern Schiessle2016-06-091-1/+0
|/
* use share initiator as fall back to access the fileBjörn Schießle2016-05-203-5/+11
| | | | | 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 tests/ to PSR-4 (#24731)Joas Schilling2016-05-203-0/+4817
* Move a-b to PSR-4 * Move c-d to PSR-4 * Move e+g to PSR-4 * Move h-l to PSR-4 * Move m-r to PSR-4 * Move s-u to PSR-4 * Move files/ to PSR-4 * Move remaining tests to PSR-4 * Remove Test\ from old autoloader