First check which users have a shares and for which providers and then
only load these shares.
Avoid doing at most 5 SQL queries for each users a share was shared with if
there are no shares.
Signed-off-by: Carl Schwan <carlschwan@kde.org>
Update expected values in ManagerTest to reflect the new behavior
where share expiration dates are set to 23:59:59 instead of 00:00:00.
Signed-off-by: nfebe <fenn25.fn@gmail.com>
Fix possible dead locks when running the propagator caused by two
requests updating the same amount rows in transactions.
- Lock rows always in the same deterministic order by sorting the
path_hash first
- On all database outside of sqlite, also do first a SELECT FOR UPDATE
to lock all the rows used in batch UPDATE calls, afterward to decrease
the risk of two requests trying to lock the same rows
Signed-off-by: Carl Schwan <carlschwan@kde.org>
Those are not Unit tests but integration tests with bad side effects on
other tests. I failed to clean them up so removing them.
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
When requesting previews, which we don't find in oc_previews, search in
IAppData first before creating them.
Move the logic from MovepreviewJob to PreviewMigrationService and reuse
that in the Preview Generator.
At the same time rename MovePreviewJob to PreviewMigrationJob as it is a
better name.
Signed-off-by: Carl Schwan <carl.schwan@nextcloud.com>
(cherry picked from commit 6149168129)
Add InstallationCompletedEvent class in public API (OCP namespace) that
provides installation details: data directory, admin username, and admin
email. Event will be dispatched after successful installation.
Include comprehensive unit tests covering all event scenarios.
Signed-off-by: Misha M.-Kupriyanov <kupriyanov@strato.de>
This feature was not used in 8 years and from frontend did not even
properly work anymore and was implemented using deprecated API.
So get rid of it.
The last version that was using a changelog from the changelog server
was Nextcloud 20.
We use the firstrunwizard nowadays for informing about Nextcloud
changes in new releases.
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
We do not support Oracle 11 anymore but at least Oracle 12c (12.2).
So the limitation is gone (Oracle now supports up to 128 character long
names).
Instead we are now limited by MySQL (64 characters) and PostgreSQL (63
characters).
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
Currently apps are broken if they have exports in the JS entry point,
because they then will import from the entry point but because they do
not know about the Nextcloud cache buster they will import without cache
buster.
This results in two problem:
1. The module might be outdated (old cached)
2. The module is duplicated, so the module will be loaded twice and will
have two different - out of sync - states. This also means it will
re-run sideeffects of the entry point.
To fix this we generate an import map which basically maps the plain
entry point script to the script with cache buster added.
(Some background: Bundler will try to minimize chunks (reduce page
loading time) so they can inline modules into entry points and thus
extend the entry point exports and then this issue would be caused).
For example:
```js
// entry.mjs
console.error('called')
async function onClick() {
await import('./chunk.mjs')
}
export const name = 'foo'
// chunk.mjs
import { name } from './entry.mjs'
console.error(name)
```
When calling `onClick` without this fix the output will be:
> called
> called
> foo
With this fix:
> called
> foo
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>