Commit Graph

49 Commits

Author SHA1 Message Date
Christoph Wurst 1b46621cd3
Update license headers for 18
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2019-12-20 09:23:25 +01:00
Roeland Jago Douma bb4264c565
config.php setting to always accept internal shares
Part of #18255

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2019-12-16 09:07:25 +01:00
Christoph Wurst 5bf3d1bb38
Update license headers
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2019-12-05 15:38:45 +01:00
Roeland Jago Douma 68748d4f85
Some php-cs fixes
* Order the imports
* No leading slash on imports
* Empty line before namespace
* One line per import
* Empty after imports
* Emmpty line at bottom of file

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2019-11-22 20:52:10 +01:00
Joas Schilling 60da25681e
Only restrict loading of group and user shares for now
Signed-off-by: Joas Schilling <coding@schilljs.com>
2019-11-12 17:37:00 +01:00
Joas Schilling 520042bbd0
Allow to accept group shares
Signed-off-by: Joas Schilling <coding@schilljs.com>
2019-11-12 17:36:58 +01:00
Joas Schilling dcdbea54e6
Respect the accepted flag for group and user shares
Signed-off-by: Joas Schilling <coding@schilljs.com>
2019-11-12 17:13:38 +01:00
Daniel Calviño Sánchez ea55f8eedd fixup! Get all shares as iterable
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2019-10-30 14:26:37 +01:00
Roeland Jago Douma 8085ca4cc4
Get all shares as iterable
Sometimes we need all shares or rather a specific subset of shares but
creating dedicated functions is a pain. This just returns an iterable
object for all shares so we can loop over them without allocating all
the memory on the system.

It should not be used by any user called code. But in an occ command or
background job it is fine IMO.

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2019-10-30 09:45:27 +01:00
Roeland Jago Douma 043b56cb7d
Having the contructor in the interface makes no sense...
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2019-10-29 19:29:38 +01:00
Joas Schilling b1a0d464ba
Merge pull request #16723 from nextcloud/fix/sharing/unshare-message
Add expiration event for shares
2019-08-26 12:58:51 +02:00
Joas Schilling b130a4c8fb
Make the sharing constants publicly available
Signed-off-by: Joas Schilling <coding@schilljs.com>
2019-08-23 13:54:19 +02:00
John Molakvoæ (skjnldsv) b557f52c22
Add expiration event for shares
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
2019-08-21 08:30:17 +02:00
Bjoern Schiessle f377a61f90 allow to add labels to shares
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
2018-11-01 02:15:07 +01:00
Roeland Jago Douma bc960bae02 Extend IShare to show hide download state
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2018-10-30 15:18:55 +01:00
Daniel Calviño Sánchez 88600f4ecf Add "sendPasswordByTalk" property to shares
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2018-07-24 13:56:28 +02:00
Bjoern Schiessle a93f2a648b
allow to add a personal note to a share
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
2018-07-21 15:02:18 +02:00
Morris Jobke 82021b2b1b
Merge pull request #5280 from nextcloud/shared-with-display-name
sharedWithDisplayName & sharedWithAvatar
2018-07-13 17:29:57 +02:00
Bjoern Schiessle b23032e4c5
implement federated group shares
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
2018-07-11 10:11:44 +02:00
Morris Jobke ced8789f5c
Fix PHPDoc
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2018-07-05 12:43:57 +02:00
John Molakvoæ (skjnldsv) 6a0552224d
getDeletedSharedWith method
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
2018-07-05 12:43:57 +02:00
Roeland Jago Douma d805959e81
Add API to undelete delete group shares
When a group share is deleted we keep track of this in the DB.
Right now it is only possible for a recipient to get back the share by
asking the sharer to delete it and to share it again. This doesn't
scale.

This endpoint makes it possible to get back the share.

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2018-07-05 12:43:56 +02:00
Bjoern Schiessle 957b27f282
replace \OCP\Federation\Exception\ShareNotFoundException with the generic \OCP\Share\Exception\ShareNotFound exception
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
2018-07-02 11:29:29 +02:00
Bjoern Schiessle 8889e14c7c
implement accept share notification
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
2018-07-02 11:29:28 +02:00
Maxence Lange 0009adae80 SharedWithDisplayName + SharedWithAvatar
Signed-off-by: Maxence Lange <maxence@nextcloud.com>
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2018-05-21 01:24:45 +02:00
Morris Jobke 0eebff152a
Update license headers
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2017-11-06 16:56:19 +01:00
Lukas Reschke b97f48f1af
Add exceptions to PHPDoc of interface
Improves static code analysis here and also keeps expectations proper.

Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
2017-09-10 20:01:36 +02:00
Lukas Reschke dfd8125aeb
Replace wrong PHPDocs
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
2017-08-01 08:20:16 +02:00
Jan-Christoph Borchardt fd63577089 Improve wording of various error messages
Signed-off-by: Jan-Christoph Borchardt <hey@jancborchardt.net>
2017-06-21 14:51:59 -05:00
Joas Schilling 629b7c0fc3
Adjust docs and make !$currentAccess simpler
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-04-13 12:58:52 +02:00
Joas Schilling 3c1365c0d1
Fix returned paths for remote shares
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-04-13 12:58:51 +02:00
Joas Schilling 91e650791d
Return the paths for the users without setting them all up
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-04-13 12:58:50 +02:00
Roeland Jago Douma 0c2dc3bc8c
Fix comments
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2017-04-13 12:58:50 +02:00
Roeland Jago Douma 2cbac3357b
Offload acceslist creation to providers
* 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>
2017-04-13 12:58:50 +02:00
Roeland Jago Douma 88299ec27c
Added to public interface
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2017-04-13 12:58:49 +02:00
Bjoern Schiessle 3323d01db1
update unit tests
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
2017-04-07 15:43:59 +02:00
Robin Appelman 2f03fcab4a
let the share backend get the node cacheentry to save queries
Signed-off-by: Robin Appelman <robin@icewind.nl>
2016-11-17 18:48:38 +01:00
Roeland Jago Douma f07d75a4dd
@since 9.2.0 to @since 11.0.0
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2016-11-15 18:51:52 +01:00
Robin Appelman 74024c8f28
fix phpdoc
Signed-off-by: Robin Appelman <robin@icewind.nl>
2016-11-09 16:59:03 +01:00
Bjoern Schiessle 318160647a
add method to check if a share provider for a given type is loaded
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
2016-11-01 19:54:39 +01:00
Roeland Jago Douma 5a00870a2b
Stricter signature
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2016-10-31 20:19:14 +01:00
Robin Appelman 3692769b0a
Add getShareTypesInFolder to optimize folder listening
Signed-off-by: Robin Appelman <icewind@owncloud.com>
2016-10-31 15:55:40 +01:00
Joas Schilling ba87db3fcc
Fix others 2016-07-21 18:13:57 +02:00
Lukas Reschke aba539703c
Update license headers 2016-05-26 19:57:24 +02:00
Roeland Jago Douma e74323ca90
Fix phpdoc 2016-05-10 12:43:35 +02:00
Roeland Jago Douma 6144ced7a0
Move post_removeFromGroup to shareManager
The last sharing hook to be moved over.

* Added unit tests
* Removed old tests that relied on old behaviour
* Removed old hooks.php
2016-04-13 15:00:12 +02:00
Roeland Douma 495a964ca2 Migrate post_groupDelete hook to share manager (#23841)
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
2016-04-12 09:46:25 +02:00
Roeland Jago Douma e0cee43cf0 Migrate post_userDelete hook to share manager
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
2016-04-04 14:15:38 +02:00
Roeland Jago Douma d883b877d1 Move OCP\Share over to PSR-4
Touching the code so moving it over to PSR-4
2016-03-30 22:55:03 +02:00