Commit Graph

6011 Commits

Author SHA1 Message Date
Lukas Reschke 4cc3180429 Move null user test first
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
2021-06-02 17:13:01 +02:00
Lukas Reschke 4b48154b80 Import namespaced MockObject
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
2021-06-02 15:32:41 +02:00
Lukas Reschke 37543c0530 Use MockObject instead of PHPUnit_Framework_MockObject_MockObject
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
2021-06-02 15:22:54 +02:00
Lukas Reschke 9ed3522685 else if -> elseif
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
2021-06-02 15:22:03 +02:00
Lukas Reschke dfd9d5f504 Use self::getUniqueID instead of uniqid
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
2021-06-02 15:19:53 +02:00
Lukas Reschke 4abf1226ba Adjust tests to use different user IDs
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
2021-06-02 15:01:25 +02:00
Lukas Reschke 39974acc5e Dont allow reusing usernames
We have cases in which app developers forget to delete user data when a user is being deleted. This could be problematic as future users with the same username could then access this data.

This mitigates this risk a bit by not allowing reusing of usernames. That said, we still need to fix occurrences of these issues by deleting missed data.

Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
2021-06-02 15:01:24 +02:00
Christoph Wurst b29c3aa03f
Merge pull request #25658 from nextcloud/dav-respect-disallow-sharing-with-groups
Dav respect disallow sharing with groups
2021-06-01 12:07:29 +02:00
François Freitag b0847abcc2 Rewrite requesttoken.spec.js with Jest
[Jest](https://jestjs.io/) is a test runner that focuses on simplicity.
It instruments babel to transform modules and test them.

Using Jest simplifies the existing configuration and allows dropping a
bunch of workarounds, as well as following the shared Babel
configuration for new code.

Signed-off-by: François Freitag <mail@franek.fr>
2021-05-30 10:44:34 +02:00
Thomas Citharel 1c0d975654
Make dav respect disallowing sharing with groups
Closes #25390

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2021-05-26 11:19:59 +02:00
blizzz 1b47886abb
Merge pull request #27035 from nextcloud/techdebt/26866/userscontroller-accountmanager-api
do not use private AccountManager in UsersController
2021-05-25 21:22:37 +02:00
Morris Jobke 726d01843e
Merge pull request #26600 from hosting-de/feature/occ-tags
Add commands to manage tags via OCC
2021-05-25 16:54:06 +02:00
Arthur Schiwon 847ed37afc
do not use private AccountManager in UsersController
- extends IAccountProperty for verificationData getters and setters
- implementation thereof ^
- and of course adaption of UsersController

Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2021-05-25 14:35:38 +02:00
Johannes Leuker d606799ee2 Add commands to manage tags via OCC
list, add, delete, edit

Signed-off-by: Johannes Leuker <j.leuker@hosting.de>
2021-05-25 11:29:32 +02:00
Morris Jobke f1dbabd910
Merge pull request #26727 from nextcloud/group-exclude-link-share
Add option to exclude groups from creating link shares
2021-05-21 15:35:39 +02:00
Valdnet 1627eb45bb
l10n: Fix test 2021-05-20 09:26:38 +02:00
Julius Härtl 35b910cf8e
Merge pull request #26322 from nextcloud/recent-search
Use file search for recent files and optimize getting share types
2021-05-18 09:44:08 +02:00
Roeland Jago Douma ee3dc57cbd
Merge pull request #26626 from J0WI/strict-security
Make Security module strict
2021-05-18 08:43:13 +02:00
blizzz 0ab5b3e265
Merge pull request #26679 from nextcloud/bugfix/noid/fix-unauthorized-ocs-status-in-provisioning
Fix unauthorized OCS status in provisioning
2021-05-13 23:39:20 +02:00
Robin Appelman b1dca57a1c
load share settings from the share manager in more places
Signed-off-by: Robin Appelman <robin@icewind.nl>
2021-05-12 16:11:28 +02:00
Joas Schilling b6c6527705
Fix unauthorized OCS status in provisioning
Signed-off-by: Joas Schilling <coding@schilljs.com>
2021-05-12 08:16:07 +02:00
Arthur Schiwon 8413ed9475
allow to set valid scopes only in AccountProperty
the auto-fallback to v2-local is removed as well to react on wrong input

Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2021-05-12 01:31:15 +02:00
Christoph Wurst 6a5d89c1ac
Merge pull request #26758 from J0WI/more-strict
Some more strict_types
2021-04-28 09:28:19 +02:00
Christoph Wurst 99f0b10421
Merge pull request #26591 from nextcloud/techdebt/noid/less-ilogger
Less ILogger
2021-04-27 15:38:12 +02:00
Joas Schilling 48c50277a9
Merge pull request #26718 from nextcloud/bugfix/noid/fix-ratelimit-template
Fix ratelimit template
2021-04-27 15:18:02 +02:00
Joas Schilling c52a026f55
Merge pull request #26572 from nextcloud/bugfix/noid/throw-401-when-authentication-is-provided-and-invalid
Throw "401 Unauthenticated" when authentication is provided but invalid
2021-04-27 14:37:28 +02:00
Joas Schilling df47445c01
Fix unit tests
Signed-off-by: Joas Schilling <coding@schilljs.com>
2021-04-27 14:34:32 +02:00
Joas Schilling 174f4dd043
Fix ratelimit template
Signed-off-by: Joas Schilling <coding@schilljs.com>
2021-04-27 13:55:34 +02:00
Joas Schilling aa651fd629
Merge pull request #26259 from nextcloud/feature/noid/validate-website-to-be-valid
Validate the website field input to be a valid URL
2021-04-26 13:56:01 +02:00
J0WI 8323cbb9e5 Use strict
Signed-off-by: J0WI <J0WI@users.noreply.github.com>
2021-04-26 12:45:12 +02:00
Morris Jobke 012f791c8f
Merge pull request #26375 from nextcloud/techdebt/noid/symfony-component-translation-pluralization-rules-is-deprecated
"Symfony\Component\Translation\PluralizationRules" is deprecated
2021-04-22 21:20:16 +02:00
Joas Schilling d80cc76ee7
Validate the website field input to be a valid URL
Signed-off-by: Joas Schilling <coding@schilljs.com>
2021-04-22 16:34:13 +02:00
Joas Schilling 4ed296db9f
Fix Authentication test
Signed-off-by: Joas Schilling <coding@schilljs.com>
2021-04-22 15:36:34 +02:00
John Molakvoæ 3da956bcdc
Merge pull request #23529 from Simounet/feat/23397-settings-new-user-modal
Settings: new user row replaced by a modal
2021-04-21 16:38:46 +02:00
Robin Appelman effb7dc8ba
set mimetype for objects uploaded to object storages
Signed-off-by: Robin Appelman <robin@icewind.nl>
2021-04-21 15:25:58 +02:00
Simounet 45c3b2a478
Settings: new user row replaced by a modal
Signed-off-by: Simounet <contact@simounet.net>
2021-04-21 14:42:46 +02:00
Robin Appelman 0d5f4edc22
adjust tests
Signed-off-by: Robin Appelman <robin@icewind.nl>
2021-04-21 14:09:07 +02:00
Morris Jobke d2ea068552
Merge pull request #26669 from nextcloud/nickvergessen-patch-1
Fix PHP CS
2021-04-21 14:07:17 +02:00
John Molakvoæ 31d88209f7
Merge pull request #25991 from nextcloud/update-acceptance-tests-to-selenium3 2021-04-21 09:31:29 +02:00
Joas Schilling 2a11713337 Update CredentialsManagerTest.php
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2021-04-21 08:33:10 +02:00
Morris Jobke 9e8690d912
Merge pull request #26654 from nextcloud/bugfix/noid/fix-security-credentials-manager-test
Fix security credentials manager test
2021-04-20 22:03:52 +02:00
Roeland Jago Douma 5ee9e1f784 Move 2FA registration to IBootstrap
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2021-04-20 21:01:16 +02:00
Joas Schilling 7f70f3e182
Fix support tests
2) Test\Support\Subscription\RegistryTest::testDelegateIsHardUserLimitReachedWithoutSupportAppAndUserCount with data set #0 (35, 15, 2, false)
Cannot stub or mock class or interface "Test\Support\Subscription\UserInterface" which does not exist

3) Test\Support\Subscription\RegistryTest::testDelegateIsHardUserLimitReachedWithoutSupportAppAndUserCount with data set #1 (35, 45, 15, false)
Cannot stub or mock class or interface "Test\Support\Subscription\UserInterface" which does not exist

4) Test\Support\Subscription\RegistryTest::testDelegateIsHardUserLimitReachedWithoutSupportAppAndUserCount with data set #2 (35, 45, 5, true)
Cannot stub or mock class or interface "Test\Support\Subscription\UserInterface" which does not exist

5) Test\Support\Subscription\RegistryTest::testDelegateIsHardUserLimitReachedWithoutSupportAppAndUserCount with data set #3 (35, 45, 55, false)
Cannot stub or mock class or interface "Test\Support\Subscription\UserInterface" which does not exist

Had to use the Database user backend, as using multiple interfaces is deprecated:
https://github.com/sebastianbergmann/phpunit/issues/3955
> This functionality should be deprecated as "having to use it" is almost always a symptom of bad design.
> More importantly, though, the support for the creation of test doubles that implement multiple interfaces
> resulted in code that is hard to maintain.

Signed-off-by: Joas Schilling <coding@schilljs.com>
2021-04-20 17:36:15 +02:00
Joas Schilling c6978bac80
Fix security credentials manager test
Signed-off-by: Joas Schilling <coding@schilljs.com>
2021-04-20 17:04:24 +02:00
Joas Schilling 79ebc7f24c
Fix test by defining plurals
Signed-off-by: Joas Schilling <coding@schilljs.com>
2021-04-20 16:43:43 +02:00
Joas Schilling 5a514a9a41
Correctly replace all PHP placeholders with the parameters
Signed-off-by: Joas Schilling <coding@schilljs.com>
2021-04-20 16:42:05 +02:00
blizzz 92ca49d21d
save a whitespace today
Co-authored-by: Joas Schilling <213943+nickvergessen@users.noreply.github.com>
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2021-04-20 14:03:01 +02:00
Arthur Schiwon f8d1ee5cfa
ignore mail shares of related remote share results
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2021-04-20 14:02:35 +02:00
J0WI ca7b37ce5a Make Security module strict
Signed-off-by: J0WI <J0WI@users.noreply.github.com>
2021-04-19 17:31:12 +02:00
Daniel Calviño Sánchez 4b376a107b Add automatic handling of "ElementNotInteractable" exceptions
In the WebDriver protocol, when a command fails because it can not
interact with the target element, an "element not interactable" error is
generated. It can be a transitive issue (for example, due to an
animation), so when the error is received the command should be tried
again, just like done, for example, with "ElementNotVisible" exceptions.

However, the last version of the "instaclick/php-webdriver" library
compatible with the Selenium Driver of Mink did not support yet that
WebDriver error. And even if Chrome is run using the old protocol an
unknown "element not interactable" error can be received anyway in some
cases. When an unknown error is received by the
"instaclick/php-webdriver" library it is thrown as a generic Exception
so, until the library can be updated, the message of generic exceptions
is checked and the command is retried if it matched.

For the time being "element not interactable" errors are handled like
"ElementNotVisible" exceptions; this may need to change once the error
is better understood.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2021-04-19 16:35:11 +02:00