Commit Graph

5731 Commits

Author SHA1 Message Date
Daniel Calviño Sánchez 1464ace788 Add unit tests for "validateExpirationDateInternal"
They were copied and adjusted as needed from the tests for
"validateExpirationDate".

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2020-11-16 13:16:59 +00:00
Daniel Calviño Sánchez 709abd4fc7 Add explicit time to test date for clarity
This shows in a clearer way that the expected expiration date is the
original one, but without time.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2020-11-16 13:16:56 +00:00
Daniel Calviño Sánchez 731cce4542 Add unit test for expiration date with date and with default
This adds back what was being actually tested in the unit test fixed in
the previous commit.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2020-11-16 13:16:55 +00:00
Daniel Calviño Sánchez 115a988cd2 Fix unit test for expiration date without date but with default
The expiration date was explicitly given, so it was not testing what it
should. Moreover, "link_defaultExpDays" needs to be mapped when testing
the default value (even if it will just fallback to the value of
"shareapi_expire_after_n_days").

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2020-11-16 13:16:53 +00:00
Daniel Calviño Sánchez eaa43d22e2 Fix unit test method name
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2020-11-16 13:16:52 +00:00
Daniel Calviño Sánchez 4e418100bf Fix unit test for verifying enforced valid expiration date.
The enforced expiration date was not actually enabled, as for that
"shareapi_default_expire_date" needs to be explicitly set to "yes".

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2020-11-16 13:16:51 +00:00
Daniel Calviño Sánchez 20c72ac03e Fix unit test for verifying enforced expire date too far in the future
The test should fail if no exception was thrown, and no exception was
thrown due to a missing configuration parameter. However, the use of
"addToAssertionCount(1)" made the test pass even if no exception was
thrown and, therefore, to silently fail.

Now the missing configuration parameter was added and the test will fail
if the expected exception is not thrown.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2020-11-16 13:16:49 +00:00
Daniel Calviño Sánchez 22357a72e5 Add unit tests to enforce a relaxed default share expiration date
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2020-11-16 13:16:48 +00:00
Daniel Calviño Sánchez b75c171ee2 Remove wrong and misleading comment
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2020-11-16 13:16:47 +00:00
Daniel Calviño Sánchez d6ba3b2f7c Remove extra spaces
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2020-11-16 13:16:45 +00:00
Daniel Calviño Sánchez 76bbbca220 Fix typo in variable name
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2020-11-16 13:16:44 +00:00
Daniel Calviño Sánchez 446c90879f Fix typos in method names
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2020-11-16 13:16:42 +00:00
Joas Schilling dabed84bd4
Fix unique key in test table
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-11-12 12:57:52 +01:00
Joas Schilling e3b3ff6d43
Skip the insertIfNotExists() tests on Oracle because it doesn't work with clob
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-11-12 12:57:51 +01:00
Joas Schilling 3ec48cd59f
Easier debugging and spell fix
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-11-12 12:57:50 +01:00
Joas Schilling f58ffadb34
Use a different column for the primary key as we can not insert it on oracle
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-11-12 12:57:50 +01:00
Julius Härtl a35b0956f1
Add github action for oci8
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2020-11-12 12:57:50 +01:00
Morris Jobke bcb6a71548
Merge pull request #24044 from nextcloud/backport/24042/stable20
[stable20] Fix sharing tab state not matching resharing admin settings
2020-11-11 13:45:46 +01:00
Daniel Calviño Sánchez f58174fdd8 Add acceptance tests for reshares by link when resharing is disabled
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2020-11-11 11:51:28 +01:00
Daniel Calviño Sánchez 7d7169fdbe Add acceptance tests for reshares when resharing is disabled
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2020-11-11 11:51:28 +01:00
Joas Schilling 19816fe85f Don't leave cursors open when tests fail
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-11-10 14:18:02 +00:00
Joas Schilling 5f3d62600e
Fix repair mimetype step to not leave stray cursors
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-11-10 10:27:09 +01:00
Joas Schilling adcc942553 Use query builder instead of OC_DB in OC\Files\*
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-11-09 11:01:09 +00:00
Joas Schilling 3f5d275e6d Also run for .sh and .json (when not package or package-lock)
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-10-30 12:12:39 +00:00
Joas Schilling 0a7fef6272 Also run all tests when drone config is modified
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-10-30 12:12:39 +00:00
Joas Schilling 53c18b8c26 Only run phpunit when php, xml or test files are modified
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-10-30 12:12:38 +00:00
Julius Härtl 367a7bd87e 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-22 14:14:49 +00:00
Morris Jobke 820881168d
Merge pull request #23621 from nextcloud/backport/23613/stable20
[stable20] Disable unreliable app-files.feature:108
2020-10-22 15:58:35 +02:00
Morris Jobke eba5eb8876 Disable unreliable app-files-sharing.feature:108
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2020-10-22 10:22:53 +00:00
Morris Jobke 78d233276f Disable unreliable app-files.feature:108
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2020-10-22 10:20:38 +00:00
Morris Jobke e95a1420f1
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 15:46:59 +02:00
Morris Jobke a7ff7c47ab Fix code style
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2020-10-12 18:08:36 +00:00
Robin Windey 06895ef8cc Fix typo 'shared' 2020-10-12 18:08:36 +00:00
Joas Schilling d68d62f052 Make sure getUsersFavoritingObject can be run without a user
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-10-07 11:10:38 +00:00
Roeland Jago Douma e0bc29d907 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-06 08:04:12 +00:00
Joas Schilling ac3a32f305 Set status is also there now
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-10-02 09:26:53 +00: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