Commit Graph

5837 Commits

Author SHA1 Message Date
Morris Jobke f94af85749
Merge pull request #23788 from nextcloud/techdebt/noid/only-run-phpunit-when-php-changed
Only run phpunit when "php" changed
2020-10-30 13:06:50 +01:00
Joas Schilling 8a3d9e52e3
Also run for .sh and .json (when not package or package-lock)
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-10-30 10:30:50 +01:00
Joas Schilling be357ecd78
Also run all tests when drone config is modified
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-10-30 09:47:27 +01:00
Joas Schilling 0de48617ec
Only run phpunit when php, xml or test files are modified
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-10-30 09:46:53 +01:00
Robin Appelman de7026f6e4
use file name instead of path in 'not allowed to share' message
Signed-off-by: Robin Appelman <robin@icewind.nl>
2020-10-29 16:43:21 +01:00
Morris Jobke 7ed11b6dfa
Merge pull request #23765 from nextcloud/techdebt/noid/sudadmin-events-into-typed-events
Add typed events for adding and removing a subadmin
2020-10-29 11:18:01 +01:00
Morris Jobke 765ee60eea
Change tests to typed event listener
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2020-10-28 23:10:23 +01:00
Morris Jobke 6e35457fcc
Remove unused private ForwardEmitter and LegacyEmitter
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2020-10-28 22:23:39 +01:00
Morris Jobke e4f53ff91b
Add typed events for adding and removing a subadmin
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2020-10-28 21:55:08 +01:00
Roeland Jago Douma cf1af5b83b
Merge pull request #23496 from lynn-stephenson/fix/related-key-issue
Fixes related key issue.
2020-10-27 20:23:07 +01:00
Roeland Jago Douma eadce7fadd
Merge pull request #23601 from nextcloud/techdebt/noid/comments-manager-improvements
Comments manager improvements/extensions needed by Talk
2020-10-27 19:57:55 +01:00
Morris Jobke a7470576cf
Merge pull request #23614 from nextcloud/tests/22305/unreliable-app-files-sharing-338
Disable unreliable app-files-sharing.feature:108
2020-10-22 12:19:39 +02:00
Morris Jobke 19950cb23c
Merge pull request #23613 from nextcloud/tests/22305/unreliable-app-files-feature-108
Disable unreliable app-files.feature:108
2020-10-22 12:18:12 +02:00
Joas Schilling 1f1244fdcc
Fix PHP CS
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-10-22 11:00:54 +02:00
Joas Schilling 8600e51df5
Fix manager creation and testing
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-10-22 10:54:03 +02:00
Morris Jobke dff9853d36
Disable unreliable app-files-sharing.feature:108
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2020-10-21 22:07:13 +02:00
Morris Jobke 8128913dff
Disable unreliable app-files.feature:108
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2020-10-21 21:53:29 +02:00
John Molakvoæ 766590d204
Merge pull request #23173 from nextcloud/feat/comments-sidebar-vue 2020-10-20 20:46:21 +02:00
John Molakvoæ (skjnldsv) 6cd7549509
Bump @nextcloud/vue to 3.0.0
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
Signed-off-by: npmbuildbot[bot] <npmbuildbot[bot]@users.noreply.github.com>
2020-10-20 18:02:45 +02:00
Joas Schilling 4bc821edd9
PSR logger for accounts
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-10-20 17:41:47 +02:00
John Molakvoæ (skjnldsv) 3e1916080a
Add ICommentsManager::load method
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
2020-10-20 14:39:28 +02:00
Roeland Jago Douma ffd76d05c9
Merge pull request #23374 from nextcloud/bugfix/noid/app-fetch-retry
Only retry fetching app store data once every 5 minutes in case it fails
2020-10-20 09:21:51 +02:00
ACTom 2d175586b4
fix php-cs check fail(tests/lib/IntegrityCheck/CheckerTest.php)
Signed-off-by: ACTom <i@actom.me>
2020-10-18 00:38:57 +08:00
ACTom 47ebcdff9e
fix Test\IntegrityCheck\CheckerTest tests fail
Signed-off-by: ACTom <i@actom.me>
2020-10-18 00:38:48 +08:00
Julius Härtl 4512c73293
Only retry fetching app store data once every 5 minutes in case it fails
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2020-10-16 14:32:58 +02:00
Morris Jobke cce716f9f3
Clear cached app config while waiting for the SCSSCache to finish processing the file
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2020-10-16 13:28:00 +02:00
lynn-stephenson a3bdb0c4cb
Implement unit tests for versions 1 and 2.
Signed-off-by: lynn-stephenson <lynn.stephenson@protonmail.com>
2020-10-15 21:23:24 -08:00
Joas Schilling 0ad4ad31e1
Fix more tests
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-10-13 08:16:17 +02:00
Joas Schilling 49ff48fcd3
Use PSR logger in authentication
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-10-12 22:07:04 +02:00
Morris Jobke f5a52e941c
Overwrite also the new command bus name to execute them in sync in the tests
Followup to #23245

Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2020-10-12 21:04:00 +02:00
Morris Jobke 91d445909a
Fix code style
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2020-10-12 14:54:51 +02:00
Robin Windey 6a1f8fb3be
Fix typo 'shared' 2020-10-12 14:19:41 +02:00
Morris Jobke 3b82c6cc84
Merge pull request #23184 from nextcloud/bugfix/noid/make-sure-getUsersFavoritingObject-can-be-run-without-a-user
Make sure getUsersFavoritingObject can be run without a user
2020-10-07 13:08:02 +02:00
Joas Schilling 9f99f859a1
Make sure getUsersFavoritingObject can be run without a user
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-10-06 16:49:23 +02:00
Christoph Wurst d9015a8c94
Format code to a single space around binary operators
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-10-05 20:25:24 +02:00
Roeland Jago Douma b976cd5535
Merge pull request #21821 from nextcloud/enh/bootstrap/initial_state
Bootstrap: add initial state registration
2020-10-04 11:09:18 +02:00
Roeland Jago Douma 1896f37465
Merge pull request #22937 from nextcloud/enh/allow_configuring_token_auth_activity_interval
Allow configuring the activity update interval of token
2020-10-04 10:37:41 +02:00
Roeland Jago Douma f4707d178e
Merge pull request #23047 from nextcloud/techdebt/noid/warn-on-database-abuse
Log the number of queries built and executed
2020-10-04 10:07:49 +02:00
Roeland Jago Douma f865a3a1c2
Move initial state provider to boostrap
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2020-10-04 09:35:33 +02:00
Roeland Jago Douma 76a7600e2e
Allow configuring the activity update interval of token
On some systems with a lot of users this creates a lot of extra DB
writes.
Being able to increase this interval helps there.

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2020-10-04 09:31:41 +02:00
Joas Schilling 95a301ea57
Fix tests
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-10-02 10:37:18 +02:00
Joas Schilling 7255666557
Set status is also there now
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-10-02 09:12:03 +02:00
Joas Schilling c25063dc07
Don't break when the IP is empty
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-09-10 14:20:27 +02:00
Morris Jobke cd563023db
Merge pull request #22657 from nextcloud/bugfix/noid/quota-trash-creation
Check if quota should be applied to path when creating directories
2020-09-09 17:37:28 +02:00
Morris Jobke e6fca0a519
Fix code style
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2020-09-09 17:36:58 +02:00
Morris Jobke 22ff60e088
Merge pull request #22564 from nextcloud/bugfix/noid/show-avatars-again
The privacy setting is only about syncing to other servers
2020-09-09 17:35:13 +02:00
Julius Härtl 74747163d6
Make sure tests cover the new mkdir behaviour on 0 quota
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2020-09-08 11:35:32 +02:00
Joas Schilling c2bef528ef
Remove unused members and imports
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-09-08 10:45:35 +02:00
Christoph Wurst adf100a42f
Fix undefined class property access after upgrade from 19 to 20
The serialized data in 19 has one property less and this was not
considered in the code. Hence adding a fallback. Moreover I'm changing
the deserialization into an array instead of object, as that is the
safer option.

Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-09-07 13:31:24 +02:00
John Molakvoæ 593d64d935
Merge pull request #17456 from brad2014/feature/brad2014/12391-improve-imip-mail-message-take-2 2020-09-04 19:53:02 +02:00
Joas Schilling a4b2403e29
The privacy setting is only about syncing to other servers
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-09-03 15:46:21 +02:00
Daniel Calviño Sánchez 96821945fb
Adjust acceptance tests to changes in @nextcloud/vue 2.6.3
The menu button and the menu of a share are no longer direct childs of
the actions of the share row. The menu button is now a child of a
".trigger" element, while the menu is a direct child of the body and has
an id defined in the "aria-describedby" attribute of the ".trigger"
element.

In XPath 1.0 it does not seem possible to "backreference" a value or
create variables, so when the share menu or one of its item is needed
now the ".trigger" element is first found and then its XPath expression
is used to compose its "aria-describedby" attribute in the XPath
expression for the menu.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2020-09-03 09:09:26 +02:00
Brad Rubenstein 442af8c5d5 Minor cleanup: php-cs-fixer, tests, interface consistency
IMipPlugin.php Removed blank lines to make php-cs-fixer happy.
Minor cleanup:  bugs found by Psalm static checker
IEMailTemplate: The public interface to addBodyListItem also needs to include the new plainIndent parameter.
IMipPlugin: Fixes an undefined variable for events that do not have DTEND.  Also use explicit string conversion for parameters and properties in several places.

The new email template adds an additional blank line before "button" links in plain text, so the tests were fixed to include that additional blank line.

Signed-off-by: Brad Rubenstein <brad@wbr.tech>
2020-09-02 17:54:36 +02:00
Julius Härtl e0ae37745a
Do not expose direct editing if no master key is available
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2020-09-01 11:40:27 +02:00
Daniel Calviño Sánchez 034b7bd4a9 Fix clicks on actions menu of non opaque file rows in acceptance tests
When a row is added to the file list the opacity of the file row is
animated from transparent to fully opaque. As the file actions menu is a
descendant of the row but overflows it when the row is not fully opaque
clicks on the menu entries "fall-through" and are received instead by
the rows behind.

The opacity animation is a CSS animation, and it is not possible to know
if a row is appearing or not except from its opacity (the row will have
the "appear" CSS class even after the animation ended). Therefore it
should be waited until the row of the file is fully opaque before using
the menu.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2020-08-29 03:32:14 +02:00
Roeland Jago Douma 7b8364e001
Merge pull request #21288 from lmamane/master
Return correct loginname in credentials
2020-08-28 16:11:46 +02:00
Morris Jobke a0cbf16d9b
In case the group backend returns $limit or more results it is expected to contain more results
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2020-08-21 13:14:32 +02:00
Roeland Jago Douma 987f621173
Merge pull request #22331 from nextcloud/bugfix/noid/dont-use-deprecated-inigetwrapper
Don't use deprecated getIniWrapper() anymore
2020-08-20 19:45:47 +02:00
Morris Jobke 65b5e65185
Merge pull request #21529 from nextcloud/enh/encryption/improve_key_format
New SSE key format
2020-08-20 17:41:18 +02:00
Morris Jobke 590d461210
Remove unneeded import
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2020-08-20 16:53:34 +02:00
Morris Jobke 9e483ea949
Fix unit tests
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2020-08-20 16:35:38 +02:00
Joas Schilling b09620651c
Don't use deprecated getIniWrapper() anymore
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-08-20 16:35:38 +02:00
Lionel Elie Mamane 2c8e7912f3
adapt testGetLoginCredentialsInvalidTokenLoginCredentials() unit test to uid != loginname
Signed-off-by: Lionel Elie Mamane <lionel@mamane.lu>
2020-08-20 16:02:23 +02:00
Roeland Jago Douma 5340ab3a75
New SSE key format
* Encrypt the keys with the instance secret
* Store them as json (so we can add other things if needed)

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2020-08-20 15:42:43 +02:00
Morris Jobke 387cac4c5f
Properly inject IRouter into URLGenerator to properly encapsulate tests
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2020-08-19 22:00:47 +02:00
Morris Jobke 053ee7b386
Only load routes of the app which is requested
* Add fallback to load all routes if needed
* Move partial loaded routes test to proper place

Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2020-08-19 21:58:20 +02:00
Joas Schilling a9f22ac7b1
More test fixing
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-08-19 12:40:25 +02:00
Joas Schilling 41d8a7e05f
Fix unit tests
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-08-19 11:20:36 +02:00
Joas Schilling 3a71155fc5
Fix activity tests again
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-08-18 18:21:03 +02:00
Georg Ehrke 5b26487f14
Expose status via Collaborators API
Signed-off-by: Georg Ehrke <developer@georgehrke.com>
2020-08-14 17:04:52 +02:00
Gary Kim 5559570faf
Merge pull request #22242 from nextcloud/techdebt/noid/remove-deprecated-methods
Remove deprecated and unused method calls
2020-08-14 10:10:53 +08:00
Morris Jobke 8e249569af
Fix existing test and add a specific one for the new case
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2020-08-13 23:24:21 +02:00
Morris Jobke 16d83ab30a
Remove getLastJob from IJobList
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2020-08-13 21:50:06 +02:00
Morris Jobke 725fecee34
Merge pull request #21344 from nextcloud/fix/twofactor-cleanup-event
Emit an event for every disabled 2FA provider during cleanup
2020-08-13 07:25:01 +02:00
Morris Jobke 234b510652
Change PHPDoc type hint from PHPUnit_Framework_MockObject_MockObject to \PHPUnit\Framework\MockObject\MockObject
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2020-08-12 13:55:19 +02:00
Morris Jobke 8fc877ff7d
Merge pull request #22117 from nextcloud/activity-settings-grouping
allow grouping of activity settings
2020-08-11 11:24:23 +02:00
Daniel Kesselberg aa0e90f0c0
Exclude apps/files_external/3rdparty again
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
2020-08-10 21:49:50 +02:00
Daniel Kesselberg 2ae285daec
Rename Core/ to core/
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
2020-08-10 21:48:30 +02:00
Daniel Kesselberg 385613c3aa
Exclude apps/*/tests for coverage calculation
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
2020-08-10 13:40:16 +02:00
John Molakvoæ (skjnldsv) 9e962fb69f
Allow to update to nightly
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
2020-08-07 13:51:39 +02:00
Morris Jobke 06eb230d24
Merge pull request #22135 from nextcloud/enh/noid/occ-preview-repair
Add occ preview:migrate to migrate previews from the old flat structure to a subfolder structure
2020-08-07 11:09:16 +02:00
Morris Jobke 97c49b0b15
Add tests for occ preview:migrate - initial check for empty directories
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2020-08-07 10:42:09 +02:00
Morris Jobke 45428e4948
Add config option to enable multibucket preview distribution
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2020-08-06 22:31:39 +02:00
Morris Jobke 159f28cd52
Mount the old previews in a separate folder for the multi bucket setup and check in them before using the actual locations
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2020-08-06 22:19:21 +02:00
John Molakvoæ 5b6246f52a
Merge pull request #21598 from nextcloud/enh/20930/dashboard-drag 2020-08-06 08:17:52 +02:00
Morris Jobke 5a06e38564
Dashboard app is disabled and there is no need to redirect to files app
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2020-08-05 22:49:47 +02:00
Morris Jobke 519cd678ee
Merge pull request #22008 from elijahnyp/OCImage_Leak_Fix
Ensured large image is unloaded from memory when generating previews
2020-08-05 22:39:09 +02:00
Julius Härtl 4679926511
Redirect to files app after login in acceptance tests
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2020-08-05 17:01:29 +02:00
Robin Appelman 227e362842
allow grouping of activity settings
Signed-off-by: Robin Appelman <robin@icewind.nl>
2020-08-05 16:13:03 +02:00
Georg Ehrke 0fad921840
Add user-status app
Signed-off-by: Georg Ehrke <developer@georgehrke.com>
2020-07-31 16:45:27 +02:00
John Molakvoæ (skjnldsv) 3a31397ac2
Use `babel-loader-exclude-node-modules-except`
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
2020-07-31 11:00:33 +02:00
Joas Schilling bab4fb98eb
Fix overwriteService() for apps
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-07-28 09:38:43 +02:00
Elijah Martin-Merrill 56ed563b0c fix memory leak caused by not destroying image in Preview/Generate.php
Signed-off-by: Elijah Martin-Merrill <elijah@nyp-itsours.com>
2020-07-27 10:52:44 -04:00
Morris Jobke 34c027e443
Merge pull request #21940 from nextcloud/fix/14541/fix-fragile-acceptance-tests-part1
Revert "Disable fragile tests for now" partially
2020-07-24 01:04:13 +02:00
Morris Jobke a169bd243f
Merge pull request #21972 from nextcloud/techdebt/noid/cleanup-phpunit-warnings
Fix PHPUnit deprecation warnings
2020-07-23 21:38:22 +02:00
Morris Jobke 173f8abc7e
Merge pull request #21628 from nextcloud/external-to-s3-trashbin-fix
fix moving files from external storage to object store trashbin
2020-07-23 21:35:18 +02:00
Simon Spannagel d5b1297b55 Adjust tests to new e-mail layout
Signed-off-by: Simon Spannagel <simonspa@kth.se>
2020-07-23 20:22:48 +02:00
Morris Jobke 761cdf9877
Remove deprecated test of internal attributes via assertAttributeEquals in constructor tests
I removed the tests completely because they just test that the constructor assigns the values to the internal properties. Nothing that should be cared about from the outside.

See https://github.com/sebastianbergmann/phpunit/issues/3339#issuecomment-428843322

It is seen as bad practice to test internal stuff of objects instead of the actual input and output of mathod calls.

Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2020-07-23 17:11:29 +02:00
Morris Jobke 7e6c0ec284
Use assertEqualsCanonicalizing instead of deprecated assertEquals parameter
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2020-07-23 17:11:29 +02:00
Morris Jobke e4144e6b36
Remove deprecated test of internal attributes via assertAttributeEquals
See https://github.com/sebastianbergmann/phpunit/issues/3339#issuecomment-428843322

It is seen as bad practice to test internal stuff of objects instead of the actual input and output of mathod calls.

Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2020-07-23 17:11:29 +02:00
Morris Jobke 0123cd0ae3
Use assertStringContainsString instead of assertContains on strings
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2020-07-23 17:11:29 +02:00
Robin Appelman ad7798f9c9
use exceptions for error signaling in writeStream
this remove the ambiguity when writing zero length files

Signed-off-by: Robin Appelman <robin@icewind.nl>
2020-07-23 15:24:52 +02:00
Robin Appelman fcad692b4a
rollback cache rename if trashbin move fails
Signed-off-by: Robin Appelman <robin@icewind.nl>
2020-07-23 15:24:48 +02:00
Morris Jobke 346f647962
Merge pull request #21870 from nextcloud/fix/bootstrap-context-container-interfaces
Make the bootstrap context return ContainerInterface instances
2020-07-22 20:38:50 +02:00
Daniel Calviño Sánchez 9303390b66
Hide share link menu before copying the share link in acceptance tests
The (old) Firefox version used in the acceptance tests does not properly
render the share link menu. As the menu is taller than it should
sometimes it covers the copy link button, so it is not possible to click
it without hiding the share link menu. Moreover, in those cases the
share menu button is also covered by the share menu, so the menu needs
to be closed by pressing the "Esc" key.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2020-07-22 15:59:35 +02:00
Georg Ehrke f217b11443
Fix breaking changes of nc/vue update
Signed-off-by: Georg Ehrke <developer@georgehrke.com>
2020-07-22 15:55:59 +02:00
Christoph Wurst 91e7f12088
Adjust apps' code to use the ContainerInterface
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-07-21 20:43:18 +02:00
Morris Jobke 5cd5d3c55b
Revert "Disable fragile tests for now"
This reverts commit 40e04c8391.

Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2020-07-21 15:58:55 +02:00
Julius Härtl 6f32b59b23
Remove outdated ui-regression tests
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2020-07-20 09:27:46 +02:00
Roeland Jago Douma 7d7ba61625
Add real events to load additionalscripts
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2020-07-15 14:07:18 +02:00
Julius Härtl 81e5593133
Move to lazy panel registration during registration context
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2020-07-15 09:27:57 +02:00
Christoph Wurst f03f88b437
Delegate bootstrap registration lazily
* Keep the registration context
* Expose the context object for other components
* Ensure registration is only run once

Search providers are migrated for demonstration.

Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-07-14 15:33:32 +02:00
Roeland Jago Douma 10d862e243
Merge pull request #21759 from nextcloud/enh/lazy_subscription
Make the subscription registry lazy
2020-07-09 15:43:48 +02:00
Daniel Kesselberg d9f5fdb67a
Add DummySubscription for tests
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
2020-07-09 14:24:00 +02:00
Roeland Jago Douma 725872c23a
Make the subscription registry lazy
This will allow to do lazy registration here which should allow for
loading less (or at least only when needed!).

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2020-07-09 12:21:06 +02:00
Robin Appelman 37c334a2a6
ensure mounts are scanned during tests
Signed-off-by: Robin Appelman <robin@icewind.nl>
2020-07-09 11:14:44 +02:00
Roeland Jago Douma 43efac345e
Use the correct mountpoint to calculate
If we use the owners mount point this results in null. And then the rest
of the checks get called with null. Which doesn't work.

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2020-07-09 11:14:44 +02:00
Roeland Jago Douma 3f447b9c8c
Fix supporting defaults for routes
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2020-07-08 19:52:45 +02:00
Roeland Jago Douma edc1c77dd9
Do not create a RouteActionHandler object for each route
This is not required and doesn't allow us to be properly lazy. On top of
it this doesnt allow us to cache the routes (since closures/objects
can't be cached).

This is the first small step into cleaning up the routing we have

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2020-07-07 12:33:22 +02:00
Holger Hees e70249e089
Update SecurityMiddleware.php
OC::$WEBROOT can be empty in case if your nextcloud installation has no url prefix. This will result in an empty Location Header.

in other areas OC::$WEBROOT is always used together with an /
2020-07-06 21:34:46 +02:00
Morris Jobke e20db42a0c
Tags.php and the old sharing mechanism
The old sharing mechanism isn't working anymore, because it was replaced by Share 2.0. Also it was nowhere used so this removes the code paths and reduces complexity.

Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2020-07-06 14:12:12 +02:00
Morris Jobke d3d11cb826
Merge pull request #21626 from nextcloud/enhancement/injectible-callables
Callable parameter injection
2020-07-05 22:03:12 +02:00
Christoph Wurst 4a3ea04baa
Callable parameter injection
This is like what we have to DI and classes, but for callables.

The motivating factor is to get rid of *service locators* in the `boot`
method of apps as a new pattern is about to emerge where we have lots of
`query` calls on the app or server container in order to fetch some
services.

With this little helper it's possible to call another (public) method
and magically have everything injected.

Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-07-03 14:37:46 +02:00
Joas Schilling 19e1efd1dd
Merge pull request #21439 from nextcloud/feature/noid/move-autocomplete-filter-event-to-new-dispatcher-and-class
Move AutoComplete::filterResults to new event dispatcher and GenericE…
2020-07-03 10:03:34 +02:00
Roeland Jago Douma d53e005458
Merge pull request #21360 from nextcloud/root-storage-prevent-scanning
prevent the root storage from accidentally scanning user folders
2020-07-02 21:07:16 +02:00
Roeland Jago Douma 0157e30ad4
Merge pull request #21599 from nextcloud/debt/noid/type-to-types
Replace TYPE with TYPES
2020-07-02 12:21:01 +02:00
Roeland Jago Douma 0ac3a65f62
Merge pull request #21653 from nextcloud/bugfix/noid/fix-ipv6-remote-addresses-from-x-forwarded-for-header
Fix IPv6 remote addresses from X_FORWARDED_FOR headers before validating
2020-07-02 12:01:24 +02:00
Joas Schilling 74a9cadc50
Fix IPv6 remote addresses from X_FORWARDED_FOR headers before validating
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-07-02 11:13:13 +02:00
Joas Schilling 35c6b1236f
Move AutoComplete::filterResults to new event dispatcher and GenericEvent
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-07-01 09:57:33 +02:00
Daniel Kesselberg 87dd760a89
Replace TYPE with TYPES
As TYPE::* is deprecated.

Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
2020-06-30 23:46:22 +02:00
Joas Schilling 1336f44a68
Fix unit tests
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-06-26 16:13:09 +02:00
Joas Schilling b7060be18d
Fix robots "noindex, nofollow" signals
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-06-25 08:29:43 +02:00
Roeland Jago Douma 7d4682da40
Merge pull request #21379 from nextcloud/fix-share-permission-checkboxes-enabled-when-permissions-can-not-be-set
Fix share permission checkboxes enabled when permissions can not be set
2020-06-24 21:20:17 +02:00
Joas Schilling a2f34f46b2
Fix tests
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-06-24 18:13:37 +02:00
Joas Schilling 89ed2c37bf
Update share type constant usage
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-06-24 16:49:16 +02:00
Christoph Wurst 4488e846a5
Add unified search API
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-06-24 14:20:25 +02:00
Joas Schilling 95652d4469
Fix language in share notes email for users
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-06-23 22:01:40 +02:00
Joas Schilling 8ec1b8132e
Merge pull request #21452 from nextcloud/bugfix/21451/allow-autocomplete-by-displayname-again
Fix autocomplete for LDAP with `shareapi_only_share_with_group_members` on
2020-06-23 14:02:17 +02:00
blizzz 859941db32
Merge pull request #21479 from nextcloud/fix/21474/allow_specifying_cookie_type
Allow to specify the cookie type for appframework responses
2020-06-22 13:00:12 +02:00
Roeland Jago Douma fbf9772a3e
Allow to specify the cookie type for appframework responses
In general it is good to set them to Lax. But also to give devs more
control over them is not a bad thing.

Helps with #21474

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2020-06-22 08:38:44 +02:00
Roeland Jago Douma c006b5ff2a
Fix unit test of the ResponseTest
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2020-06-21 09:44:56 +02:00
Arthur Schiwon de61c7d302
acceptence tests shall specify which branch to pick when cloning apps
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2020-06-19 21:08:39 +02:00
Christoph Wurst 2b7b7144d4
Allow crash reporters registration during app bootstrap
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-06-19 10:38:26 +02:00
Joas Schilling 1151394739
Fix unit tests
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-06-18 11:33:43 +02:00
Christoph Wurst 69571fb536
Add dedicated API for apps' bootstrapping process
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-06-17 09:22:21 +02:00
Christoph Wurst 68794ebc92
Emit an event for every disabled 2FA provider during cleanup
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-06-16 14:38:33 +02:00
Christoph Wurst 5e52c110bb
Merge pull request #21416 from nextcloud/fix/user-deleted-token-cleanup
Clean up auth tokens when user is deleted
2020-06-16 10:01:29 +02:00
Christoph Wurst 3474afa938
Clean up auth tokens when user is deleted
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-06-15 19:24:04 +02:00
Julius Härtl 294e40db5f
Avoid duplicate matches in wide and exact results
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2020-06-15 09:34:57 +02:00
Joas Schilling b6d5979d0a
Increase timeout of the appstore requests
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-06-12 13:01:06 +02:00