Commit Graph

51 Commits

Author SHA1 Message Date
John Molakvoæ (skjnldsv) 3824e6f631
fixup! fixup! Sharing: redirect to download after authentification if requested
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
2018-03-01 13:17:08 +01:00
John Molakvoæ (skjnldsv) 7bcc821642
fixup! Fixed tests
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
2018-02-28 19:03:00 +01:00
John Molakvoæ (skjnldsv) 8c69d783e0
Fixed tests
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
2018-02-28 17:35:42 +01:00
Morris Jobke 7bc3c2e057
Merge pull request #7363 from nextcloud/default-share-perms
Let the admin configure the default share permissions
2018-02-27 13:44:34 +01:00
Bjoern Schiessle 3285becdc1
fix unit tests
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
2018-02-27 12:29:25 +01:00
Julius Härtl 4a1cbefc90
Fix files_sharing tests
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2018-02-27 12:25:53 +01:00
Morris Jobke 31c5c2a592
Change @georgehrke's email
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2017-11-06 20:38:59 +01:00
Morris Jobke 0eebff152a
Update license headers
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2017-11-06 16:56:19 +01:00
Morris Jobke c733cdaa65
Use ::class in test mocks of encryption app
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2017-10-26 13:56:56 +02:00
Morris Jobke ab36980d20
Use ::class in test mocks of dav app
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2017-10-26 10:16:12 +02:00
Morris Jobke 43e498844e
Use ::class in test mocks
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2017-10-24 17:45:32 +02:00
blizzz 2d62f97f1b Merge pull request #6328 from nextcloud/split-sharees-api-logic
Splits off the logic from sharees endpoint thus making it available from within Nc/via PHP.
2017-10-04 15:43:44 +02:00
Arthur Schiwon c43685e6fc
shareeAPIController unit test clean up and last fixes
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2017-09-26 23:10:25 +02:00
Arthur Schiwon f2c8e1ed2f
remove unused method
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2017-09-26 23:10:25 +02:00
Arthur Schiwon a7a651f4a4
move splitUserRemote unit tests
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2017-09-26 23:10:25 +02:00
Arthur Schiwon 3888b3a285
adapt unit test for ensuring exception
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2017-09-26 23:10:24 +02:00
Arthur Schiwon a28b1d91f9
split off former searchSharee unit test
also moves registering default plugins to Server for proper unit testing

Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2017-09-26 23:10:24 +02:00
Arthur Schiwon 4a315ede81
adjust ShareeAPIController invalid-input search unit test
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2017-09-26 23:10:24 +02:00
Arthur Schiwon 38ff7eaece
adjust ShareeAPIController search test
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2017-09-26 23:10:24 +02:00
Arthur Schiwon 3d1d03a511
split off getEmail tests
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2017-09-26 23:10:24 +02:00
Arthur Schiwon c92f7ee767
split off getRemote unit tests
adds two small fixes → they actually work \o/

Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2017-09-26 23:10:24 +02:00
Arthur Schiwon b35760de27
split off getGroups unit tests
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2017-09-26 23:10:24 +02:00
Arthur Schiwon dd9e191d37
split off getUsers unit tests
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2017-09-26 23:10:23 +02:00
Roeland Jago Douma 05c37526a7
Fix tests
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2017-09-25 21:44:42 +02:00
Morris Jobke 7eba0a2720
Fix comment
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2017-09-21 20:10:36 +02:00
Roeland Jago Douma 6e7865d05b
Update to new test case
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2017-08-16 21:23:32 +02:00
Roeland Jago Douma 685f272212
Add unit tests
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2017-08-10 16:25:58 +02:00
Joas Schilling f28511cac6
Add unit test
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-06-14 15:32:34 +02:00
Joas Schilling a0ada9aab4
Don't use deprecated getMock() anymore
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-04-20 12:30:21 +02:00
Lukas Reschke 727688ebd9
Adjust existing bruteforce protection code
- Moves code to annotation
- Adds the `throttle()` call on the responses on existing annotations

Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
2017-04-14 13:42:40 +02:00
Morris Jobke 5b4adf66e5
Move OC_Defaults to OCP\Defaults
* currently there are two ways to access default values:
  OCP\Defaults or OC_Defaults (which is extended by
  OCA\Theming\ThemingDefaults)
* our code used a mixture of both of them, which made
  it hard to work on theme values
* this extended the public interface with the missing
  methods and uses them everywhere to only rely on the
  public interface

Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2017-04-09 21:43:01 -05:00
Roeland Jago Douma 7e95837097 Merge pull request #3955 from nextcloud/downstream-27113
Can we get some faster phpunit execution?
2017-03-21 11:27:00 +01:00
Thomas Müller 5bfce597a9
[CI] Can we get some faster phpunit execution? (#27113)
* Don't backup globals and static attributes

* Unset global variable to remove impact on followup tests

Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2017-03-20 12:34:05 -06:00
Joas Schilling 35f6b8716e Merge pull request #3884 from nextcloud/downstream-26956
Skip null groups in group manager
2017-03-20 12:27:38 +01:00
Maxence Lange 69694012ab shares-circles
Signed-off-by: Maxence Lange <maxence@nextcloud.com>
2017-03-17 18:48:33 -01:00
Vincent Petry 377fdf3860
Skip null groups in group manager (#26871) (#26956)
* 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>
2017-03-17 00:07:03 -06:00
Robin Appelman fa49c4a13b
Add a single public api for resolving a cloud id to a user and remote and back
Signed-off-by: Robin Appelman <robin@icewind.nl>
2017-02-08 15:17:02 +01:00
Arthur Schiwon b4d779977a
fix tests
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2016-12-22 19:33:09 +01:00
Vincent Petry 14256d631c
Use group display name in sharing API + UI 2016-12-22 18:35:32 +01:00
Lukas Reschke 7b3855a375
Add config switch
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
2016-11-21 11:30:02 +01:00
Roeland Jago Douma 965981486f
Fixes not allowed increasing of link share permissions
Fixes the following:

1. user0 shares folder with user1 (RO but with sharing permissions)
2. user1 shares by link
3. user1 send 'publicUpload=true' OCS request to the link share

before this increased the permissions of the link share. Which should
not happen.

now: API reponds with an error that the permissions can't be increased.

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2016-11-13 20:29:34 +01:00
Joas Schilling cbc6118f51
Only check the sharing backends for file/folder items
Signed-off-by: Joas Schilling <coding@schilljs.com>
2016-11-10 16:46:01 +01:00
Roeland Jago Douma 55af6b45f7
More tests
* PreviewController test
* PublicPreview test
* Versions Preview test
* Trash Preview test

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2016-11-03 14:00:33 +01:00
Bjoern Schiessle 6d7520b1e2
unit tests updated and new added
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
2016-11-01 19:54:41 +01:00
Bjoern Schiessle 392c8a115f
unified way to display remote shares and mail shares
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
2016-11-01 19:54:40 +01:00
Morris Jobke 01a85a98f2 Merge pull request #1876 from nextcloud/shareesAPI_email
Add ShareesAPI E-mail search
2016-10-25 13:53:59 +02:00
Roeland Jago Douma a28528a254
Add ShareesAPI E-mail search
* Allow to search for SHARE_TYPE_EMAIL (4)
* Added tests

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2016-10-24 14:59:32 +02:00
Roeland Jago Douma f589f1a1d6
Move files_sharing Controllers => Controller
lib/Controller is the default location for controllers. So lets put them
all in there.

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2016-10-24 11:46:25 +02:00
Roeland Jago Douma ea07bbc562
Move Share20OCS to ShareAPIController
It was already a controller just still residing in its old location.

* Moved ShareAPIController to user plain userID instead of user object
* Moved Share20OCS to ShareAPIController
* Removed initisation of class from Application.php and leave it to the
AppFramework
* Fixed tests

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2016-10-24 09:52:34 +02:00
Vincent Petry ec9fd67bc5
Allow space for federated share id search 2016-08-30 11:11:59 +02:00