summaryrefslogtreecommitdiffstats
path: root/lib/private/Share20
Commit message (Collapse)AuthorAgeFilesLines
* Move pre_shared and post_shared events to EventDispatcherRoeland Jago Douma2017-08-032-38/+65
| | | | | | | | * Now listeners for those events get proper share objects. * Legacy hooks still fired * Updated tests Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Use IUserLukas Reschke2017-08-021-0/+1
| | | | | | | | This is broken and will never work as the phan CI step pointed out. Pro-tip of the day: Check why CI fails before merging :see_no_evil: Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
* Send an email once a file/folder is shared with a userMorris Jobke2017-07-281-1/+100
| | | | | | | * 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>
* More phpstorm inspection fixesRoeland Jago Douma2017-07-241-1/+1
| | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Merge pull request #5797 from paulijar/share20-postUnshareFromSelfMorris Jobke2017-07-212-0/+17
|\ | | | | Dispatch event postUnshareFromSelf when the recipient of a share unshares it
| * Emit hook postUnshareFromSelf when the recipient of a share unshares itPauli Järvinen2017-07-202-0/+17
| | | | | | | | | | | | - 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>
* | Merge pull request #5734 from nextcloud/only-readable-chars-in-share-tokensJoas Schilling2017-07-191-6/+2
|\ \ | | | | | | Only use readable chars in Share Tokens
| * | Only use readable chars in Share TokensJoas Schilling2017-07-181-6/+2
| | | | | | | | | | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* | | Run phan over code baseLukas Reschke2017-07-192-0/+4
| |/ |/| | | | | Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
* | 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>
* | upstreamMaxence Lange2017-07-112-6/+12
|/ | | Signed-off-by: Maxence Lange <maxence@nextcloud.com>
* Improve wording of various error messagesJan-Christoph Borchardt2017-06-211-20/+20
| | | | Signed-off-by: Jan-Christoph Borchardt <hey@jancborchardt.net>
* 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>
* Fix unknown share tokenJoas Schilling2017-06-131-2/+2
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* filter missing groups in share providerRobin Appelman2017-06-121-0/+2
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* add new config switched for the global scale architectureBjoern Schiessle2017-05-291-1/+3
| | | | Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
* Merge pull request #4462 from danxuliu/fix-sharing-password-protected-linkRoeland Jago Douma2017-04-251-24/+31
|\ | | | | Fix sharing a password protected link
| * Extract updateSharePasswordIfNeeded functionDaniel Calviño Sánchez2017-04-241-22/+30
| | | | | | | | Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
| * Join if block to preceding if chainDaniel Calviño Sánchez2017-04-241-3/+2
| | | | | | | | | | | | | | If getShareType() returns "email" it can not also return "user", "group" nor "link", so the if block can be added to the preceding if chain. Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
| * Fix double hashing of shared link passwordsDaniel Calviño Sánchez2017-04-241-1/+1
| | | | | | | | | | | | | | | | | | | | 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>
* | Remove unused use statementsMorris Jobke2017-04-223-4/+0
|/ | | | Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* respect password policy for auto generated passwordsBjoern Schiessle2017-04-201-1/+3
| | | | Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
* allow admin to enforce password on mail sharesBjoern Schiessle2017-04-201-1/+2
| | | | Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
* Get proper accesslist for userFolderRoeland Jago Douma2017-04-201-2/+7
| | | | | | | 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 "Reply-To" on ShareByMailProvider mailsLukas Reschke2017-04-181-1/+3
| | | | | | Fixes https://github.com/nextcloud/server/issues/4209 Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
* Do not set full path if not currentAccessRoeland Jago Douma2017-04-131-6/+11
| | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Add samples to the docsJoas Schilling2017-04-131-0/+38
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Catch exceptions and use as many results as possibleJoas Schilling2017-04-131-24/+59
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Adjust docs and make !$currentAccess simplerJoas Schilling2017-04-132-10/+31
| | | | 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>
* Fix tests for ShareHelperJoas Schilling2017-04-131-0/+15
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Fix returned paths for remote sharesJoas Schilling2017-04-131-20/+9
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Also return the tokenJoas Schilling2017-04-131-5/+11
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Return the paths for the users without setting them all upJoas Schilling2017-04-133-38/+150
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Add mail element to access listRoeland Jago Douma2017-04-132-4/+12
| | | | | | | | * 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/+92
| | | | | | | | * 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>
* Added ShareHelperRoeland Jago Douma2017-04-131-0/+64
| | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Added to public interfaceRoeland Jago Douma2017-04-131-4/+11
| | | | 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-5/+62
| | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Do proper DIRoeland Jago Douma2017-04-111-1/+1
| | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* remove discovery manager in favour of the OCSDiscoveryServiceBjoern Schiessle2017-04-111-5/+1
| | | | Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
* properly quota table names in getSharesInFolderRobin Appelman2017-04-101-1/+1
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* update unit testsBjoern Schiessle2017-04-072-44/+29
| | | | Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
* setting to disable sending password by mailBjoern Schiessle2017-04-031-3/+5
| | | | Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
* set expire date for all share typesBjoern Schiessle2017-04-032-25/+48
| | | | Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
* add secure drop functionallity to mail sharesBjoern Schiessle2017-04-031-1/+3
| | | | Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
* allow password protected mail sharesBjoern Schiessle2017-04-031-2/+23
| | | | 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>
* Merge pull request #3844 from nextcloud/unshare_eventJoas Schilling2017-03-212-38/+107
|\ | | | | Unshare event