Joas Schilling
9ba091b348
fix(workflow): Check tag attribute
Signed-off-by: Joas Schilling <coding@schilljs.com>
3 years ago
Joas Schilling
5bc86dd6ac
techdebt(workflowengine): Remove transition event classes
Signed-off-by: Joas Schilling <coding@schilljs.com>
3 years ago
Joas Schilling
15fc42966c
Also check the scope when reading operations from the database
Signed-off-by: Joas Schilling <coding@schilljs.com>
3 years ago
Joas Schilling
c6700150d5
Validate the scope when validating operations
Signed-off-by: Joas Schilling <coding@schilljs.com>
3 years ago
Julius Härtl
aebf654214
perf(workflowengine): Cache query that is performed on every request
Signed-off-by: Julius Härtl <jus@bitgrid.net>
3 years ago
Robin Appelman
83cc8202b8
remove file exists check from `cacheAndReturnMimeType`
the method is only called if the file exists already
a check against storing the fallback mimetype is added as a safety instead
Signed-off-by: Robin Appelman <robin@icewind.nl>
5 years ago
Robin Appelman
c5a8246742
use mimetype from cache for workflow if available
Signed-off-by: Robin Appelman <robin@icewind.nl>
5 years ago
Côme Chilliet
a0f6a6545b
Use TimedJob from OCP instead of OC
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
3 years ago
Côme Chilliet
9ba9f9a7dc
Make sure to not pass null to DateTime::createFromFormat
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
3 years ago
Carl Schwan
d5c23dbb9f
Move CappedMemoryCache to OCP
This is an helpful helper that should be used in more place than just
server and this is already the case with groupfodlers, deck, user_oidc
and more using it, so let's make it public
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
4 years ago
Carl Schwan
30d7763edc
Use SettingsSection in workflowengine settings
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
4 years ago
Carl Schwan
ec6b83cc18
Add stricter psalm type for CappedMemoryCache
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
4 years ago
Louis Chemineau
64951ec14e
Change script loading order in worflowengine
Fix: https://github.com/nextcloud/server/issues/31709
Signed-off-by: Louis Chemineau <louis@chmn.me>
4 years ago
Côme Chilliet
ccab35f23f
Fix similar potential problems with fetchOne loops
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
4 years ago
Carl Schwan
cbf9064b8e
Fix psalm issues
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
4 years ago
Carl Schwan
695165260f
Add helper method in Wrapper
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
4 years ago
Carl Schwan
0479fff37c
The storage is not static anymore
Don't call twice $cache->getId
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
4 years ago
Carl Schwan
1f392d666a
Optimize FileSystemTags workflow for groupfolder
In https://github.com/nextcloud/server/pull/28774 we disabled the
caching for the groupfolder application since it worked due to the fact
that in groupfolders, getFileIds could be called with the same $cacheId
and path for actually different groupfolders.
This revert this change and instead add the folderId from the
groupFolder to the cacheId. This solve the issue of the uniqueness of
the cacheId inside GroupFolder. Downside is that we introduce
groupfolder specific implementation inside the server repo.
The seconf optimization is to not consider paths starting with
__groupfolders in executeCheck. This is due to the fact that files in
the groupfolder application call two times executeCheck one time with
the url __groupfolder/<folderId>/<path> and the other time with <path>.
The first time will always return an empty systemTags array while the
second call will return the correct system tags.
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
4 years ago
Carl Schwan
08bf47a5de
Fix RequestURL check for cli commands
Fix https://github.com/nextcloud/files_automatedtagging/issues/526
Fix https://github.com/nextcloud/groupfolders/issues/1855
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
4 years ago
John Molakvoæ (skjnldsv)
b664aad7ab
Move bundles to /dist
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
4 years ago
Robin Appelman
e95745c074
fix tests
Signed-off-by: Robin Appelman <robin@icewind.nl>
4 years ago
Joas Schilling
7a6d559f19
Detect mimetype by content only with content
Signed-off-by: Joas Schilling <coding@schilljs.com>
4 years ago
Arthur Schiwon
7d7ef1d2e6
fixes an undefined index when getAccessList returns an empty array
- [] is a valid return value that should be honored as having no access
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
4 years ago
Richard Steinmetz
8bd8e97181
Do not cache file ids in FileSystemTags inside group folders
Signed-off-by: Richard Steinmetz <richard@steinmetz.cloud>
5 years ago
Daniel Kesselberg
7492b3c24f
Set alias for result of cast column function
On OCI an expression like to_char(events) end up as $row['to_char(events)'] in the query result.
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
5 years ago
Vincent Petry
15a62c5237
Make "name" column nullable in workflow operations
The "name" column is now unused and the code is always inserting an
empty string. While this works with most databases, Oracle complains
because an empty string is equivalent to null.
To fix this, the column definition is changed to allow null values now.
Also added some logging in case of database exceptions, because without
this nothing would be logged to detect the above problem.
Signed-off-by: Vincent Petry <vincent@nextcloud.com>
5 years ago
John Molakvoæ (skjnldsv)
215aef3cbd
Update php licenses
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
5 years ago
szaimen
35d978c2fc
Rename External storages to External storage
Signed-off-by: szaimen <szaimen@e.mail.de>
5 years ago
François Freitag
d887851183
Prefer string $file over 1-element array in script()
The string syntax is more obvious. There should be one (and preferably
only one) way of doing things.
Signed-off-by: François Freitag <mail@franek.fr>
5 years ago
Roeland Jago Douma
bc961baa40
Move some settings over to the IInitialState
The old one has been deprecated. Part one of many.
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
5 years ago
dependabot-preview[bot]
eb502c02ff
Bump nextcloud/coding-standard from 0.3.0 to 0.5.0
Bumps [nextcloud/coding-standard](https://github.com/nextcloud/coding-standard ) from 0.3.0 to 0.5.0.
- [Release notes](https://github.com/nextcloud/coding-standard/releases )
- [Changelog](https://github.com/nextcloud/coding-standard/blob/master/CHANGELOG.md )
- [Commits](https://github.com/nextcloud/coding-standard/compare/v0.3.0...v0.5.0 )
Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
5 years ago
Christoph Wurst
77a8ba0d11
Migrate WFE to the new PSR logger
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
5 years ago
Christoph Wurst
c1d4f8161b
Migrate internal classes to the OCP db col types
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
5 years ago
Morris Jobke
24d436cb60
Remove unneeded casts that were found by Psalm
In preparation of the update of Psalm from 4.2.1 to 4.3.1+ (see https://github.com/nextcloud/server/pull/24521 )
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
5 years ago
Christoph Wurst
8b64e92b92
Bump doctrine/dbal from 2.12.0 to 3.0.0
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
5 years ago
Arthur Schiwon
04cd1348ec
consider local external storages, too
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
5 years ago
Arthur Schiwon
14bbec5fa7
enables the file name check also to match name of mountpoints
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
5 years ago
Morris Jobke
c44ec8c5d5
Only execute plain mimetype check for directories and do the fallback only for non-directories
Ref #23096
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
5 years ago
Julius Härtl
b06b0315c6
Files client and info bundles are always loaded so we don't need to load them again
Signed-off-by: Julius Härtl <jus@bitgrid.net>
5 years ago
Arthur Schiwon
21a53de451
avoid empty null default with value that will be inserted anyways
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
5 years ago
Arthur Schiwon
1eb86e46fd
inform the user when flow config data exceeds thresholds
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
5 years ago
Christoph Wurst
f464ef050b
Fix type errors detected by Psalm
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
5 years ago
Christoph Wurst
d9015a8c94
Format code to a single space around binary operators
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
6 years ago
Julius Härtl
63479684a5
Make sure to check the mimetype on the path if a secure one could not be detemined though the content
Signed-off-by: Julius Härtl <jus@bitgrid.net>
6 years ago
J0WI
1639289b95
Update urls to stackoverflow.com to "HTTPS"
Signed-off-by: J0WI <J0WI@users.noreply.github.com>
6 years ago
Joas Schilling
aa5e4aacc1
Don't use SELECT DISTINCT when to_char() is used in a WHERE statement
Nice bug in Oracle
Signed-off-by: Joas Schilling <coding@schilljs.com>
6 years ago
Arthur Schiwon
28c0eea8cb
fix possible leaking scope in Flow
- a configured flow can be brought into consideration, despite its event
was not fired
- it could either run through
- or run into a RuntimeException and killing processing of valid flows
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
6 years ago
Morris Jobke
c0be7e329f
Prefer typed event over string based ones
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
6 years ago
Arthur Schiwon
692e6a6838
File entity to implement IIcon
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
6 years ago
Arthur Schiwon
b59efb61bd
Flow File entity implements IContextPortation
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
6 years ago