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>
2021-02-18 13:31:24 +07:00
Christoph Wurst
77a8ba0d11
Migrate WFE to the new PSR logger
...
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2021-02-11 16:17:37 +07:00
Christoph Wurst
c1d4f8161b
Migrate internal classes to the OCP db col types
...
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2021-01-12 14:09:13 +07:00
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>
2021-01-11 13:14:41 +07:00
Christoph Wurst
8b64e92b92
Bump doctrine/dbal from 2.12.0 to 3.0.0
...
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2021-01-08 11:45:19 +07:00
Arthur Schiwon
04cd1348ec
consider local external storages, too
...
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2020-12-15 11:50:04 +07:00
Arthur Schiwon
14bbec5fa7
enables the file name check also to match name of mountpoints
...
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2020-12-15 00:05:42 +07:00
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>
2020-11-30 16:43:57 +07:00
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>
2020-11-25 15:11:03 +07:00
Arthur Schiwon
21a53de451
avoid empty null default with value that will be inserted anyways
...
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2020-11-23 21:20:27 +07:00
Arthur Schiwon
1eb86e46fd
inform the user when flow config data exceeds thresholds
...
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2020-10-28 14:07:14 +07:00
Christoph Wurst
f464ef050b
Fix type errors detected by Psalm
...
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-10-14 15:40:12 +07:00
Morris Jobke
fe08f406b2
Merge pull request #23096 from nextcloud/bugfix/noid/mimetypes2
...
Also check the path based mimetype for flow rule checks
2020-10-05 22:01:00 +07: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 +07:00
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>
2020-09-29 16:01:50 +07:00
J0WI
1639289b95
Update urls to stackoverflow.com to "HTTPS"
...
Signed-off-by: J0WI <J0WI@users.noreply.github.com>
2020-09-17 17:38:27 +07:00
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>
2020-09-07 15:17:48 +07:00
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>
2020-08-24 13:44:01 +07:00
Morris Jobke
c0be7e329f
Prefer typed event over string based ones
...
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2020-08-10 15:22:55 +07:00
Arthur Schiwon
692e6a6838
File entity to implement IIcon
...
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2020-08-07 00:14:50 +07:00
Arthur Schiwon
b59efb61bd
Flow File entity implements IContextPortation
...
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2020-08-05 15:21:57 +07: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 +07:00
Roeland Jago Douma
c97e85c6da
Merge pull request #21547 from nextcloud/enhancement/workflowengine-bootstrap
...
Migrate WFE to the new bootstrap mechanism
2020-07-02 21:03:14 +07:00
Roeland Jago Douma
2464a60879
Merge pull request #21590 from nextcloud/debt/noid/unused-method
...
Remove unused method.
2020-07-02 20:58:20 +07: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 +07: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 +07:00
Joas Schilling
d7c0b9cced
Also always return in app commands
...
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-06-26 15:12:11 +07:00
Daniel Kesselberg
dcee9fbf35
Remove unused method.
...
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
2020-06-25 23:36:54 +07:00
Christoph Wurst
1428853c86
Move the event listener into a dedicated class
...
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-06-24 10:54:13 +07:00
Christoph Wurst
7c0c180a56
Migrate WFE to new bootstrap mechanism
...
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-06-24 10:54:03 +07:00
Arthur Schiwon
3706eae777
flow to not use deprecated event dispatcher methods
...
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2020-06-19 23:03:07 +07:00
Julius Härtl
11329dcb42
Flow: Include root folder for shared storages when fetching system tags
...
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2020-06-15 08:28:12 +07:00
Roeland Jago Douma
28f8a445e4
Move the systemtags to core/src
...
* Move to the handlebar loader from webpack
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Signed-off-by: npmbuildbot[bot] <npmbuildbot[bot]@users.noreply.github.com>
2020-05-28 19:05:09 +07:00
Christoph Wurst
28f8eb5dba
Add visibility to all constants
...
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-04-10 16:54:27 +07:00
Christoph Wurst
1584c9ae9c
Add visibility to all methods and position of static keyword
...
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-04-10 16:51:06 +07:00
Christoph Wurst
caff1023ea
Format control structures, classes, methods and function
...
To continue this formatting madness, here's a tiny patch that adds
unified formatting for control structures like if and loops as well as
classes, their methods and anonymous functions. This basically forces
the constructs to start on the same line. This is not exactly what PSR2
wants, but I think we can have a few exceptions with "our" style. The
starting of braces on the same line is pracrically standard for our
code.
This also removes and empty lines from method/function bodies at the
beginning and end.
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-04-10 14:19:56 +07:00
Christoph Wurst
14c996d982
Use elseif instead of else if
...
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-04-10 10:35:09 +07:00
Christoph Wurst
afbd9c4e6e
Unify function spacing to PSR2 recommendation
...
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-04-09 13:54:22 +07:00
Christoph Wurst
2a529e453a
Use a blank line after the opening tag
...
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-04-09 11:50:14 +07:00
Christoph Wurst
41b5e5923a
Use exactly one empty line after the namespace declaration
...
For PSR2
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-04-09 11:48:10 +07:00
Christoph Wurst
74936c49ea
Remove unused imports
...
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-03-25 22:08:08 +07:00
Julius Härtl
e4829236cf
Add app config to disable user flows
...
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2020-03-21 08:58:41 +07:00
Daniel Kesselberg
b3780bcedd
Annotate $additionalScopes so the IDE knows what type $scopeCandidate is.
...
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
2020-03-17 15:27:22 +07:00
Roeland Jago Douma
e193e14a08
Merge pull request #19989 from nextcloud/fix-single-ScopeContext-passed-to-setScopes
...
Fix single "ScopeContext" passed to "setScopes"
2020-03-17 15:08:25 +07:00
Daniel Calviño Sánchez
46e374860b
Fix single "ScopeContext" passed to "setScopes"
...
"setScopes" expects an array, but a single "ScopeContext" was being
passed instead.
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2020-03-16 16:48:25 +07:00
Daniel Kesselberg
e44b58ed8b
Hide card for apps store if disabled
...
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
Signed-off-by: npmbuildbot[bot] <npmbuildbot[bot]@users.noreply.github.com>
2020-03-16 11:37:38 +07:00
Julius Härtl
761a663667
Continue with next foreach iteration
...
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2020-02-17 08:10:11 +07:00
Julius Härtl
b11f5a0915
Reduce flow logging at INFO level
...
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2020-02-14 12:00:22 +07:00
Roeland Jago Douma
1b07dcf35c
Merge pull request #18904 from nextcloud/enh/noid/flow-logging
...
Log Flow activity
2020-02-10 15:09:51 +07:00
Joas Schilling
bbc9381358
Fix "Call to undefined method OCA\\WorkflowEngine\\Entity\\File::t()"
...
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-01-29 09:22:42 +07:00
Arthur Schiwon
e008444887
always require a message paramter for data logging
...
also ensure it plays well with current log reader
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2020-01-28 13:00:13 +07:00
Arthur Schiwon
46aaeb4561
log Flow activity
...
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2020-01-28 10:58:57 +07:00
Arthur Schiwon
4a0926f5de
make the mime type checker for flow available to regular users
...
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2020-01-09 12:29:26 +07:00
Roeland Jago Douma
25d4f3230d
Use the new Events in Flow
...
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2020-01-02 16:40:49 +07:00
Julius Härtl
75b217cf8d
Remove style loading of non-existing file
...
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2020-01-02 11:07:36 +07:00
Julius Härtl
e7ad044826
Validate check array in the backend
...
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2019-12-27 08:45:39 +07:00
Arthur Schiwon
2799064573
report list of entities without array keys to frontend
...
lead to a blank flow settings page when a third party entity was
registered.
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2019-12-21 00:46:37 +07:00
blizzz
5a986f02a3
Merge pull request #18162 from nextcloud/enh/noid/url-fileentity
...
flow file entity to provide the internal URL
2019-12-19 13:00:39 +07:00
Arthur Schiwon
0a00903261
Flows that are managing themselves do not necessarily set the entity
...
for instance files_automatedtagging, which works on a lower level. Fixes a
Call to a member function isLegitimatedForUserId() on null.
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2019-12-18 09:35:03 +07:00
Arthur Schiwon
1378614f67
pass the proper storage-internal path
...
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2019-12-17 15:00:44 +07:00
Arthur Schiwon
8b18b0c97d
lower to debug, since we fire two events, so it is legitimate
...
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2019-12-16 15:30:50 +07:00
Arthur Schiwon
ea7294f7d5
do not add (user) flows twice
...
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2019-12-16 15:30:18 +07:00
Arthur Schiwon
f8394e3551
flow file entity to provide the internal URL
...
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2019-12-13 12:33:35 +07:00
Joas Schilling
4a151c545a
Allow to specify apps that somethign is a dir
...
Signed-off-by: Joas Schilling <coding@schilljs.com>
2019-12-10 09:11:43 +07:00
Joas Schilling
511a4ba66f
Improve mimetype detection in workflow components
...
Signed-off-by: Joas Schilling <coding@schilljs.com>
2019-12-10 09:11:43 +07:00
Julius Härtl
c3061e6929
Make sure event names is always an array
...
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2019-12-06 10:32:55 +07:00
Julius Härtl
260f0fab4d
Set fileInfo in the rule matcher
...
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2019-11-28 13:51:21 +07:00
Arthur Schiwon
b3749fbe16
add convenience interfaces so entities can provide presentable details
...
the File entity starts with a display text (used by talk)
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2019-11-28 13:51:21 +07:00
Arthur Schiwon
7a7a415fdc
expose user of running flows
...
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2019-11-28 13:51:20 +07:00
Arthur Schiwon
7210852f07
allow user flows when the acting user is legitimate, but not its owner
...
for instance, when a sharee changes a file, the owner can act upon
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2019-11-28 13:51:16 +07:00
Julius Härtl
d10b313186
Rename to flow
...
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2019-11-26 22:00:03 +07:00
Roeland Jago Douma
68748d4f85
Some php-cs fixes
...
* Order the imports
* No leading slash on imports
* Empty line before namespace
* One line per import
* Empty after imports
* Emmpty line at bottom of file
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2019-11-22 20:52:10 +07:00
Arthur Schiwon
2efe8aad38
relax dependency on GenericEvent, instead stay compatible with old events
...
* also fixes tagging events
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2019-11-13 14:23:39 +07:00
Jan-Christoph Borchardt
cef0e622fb
Add Flow app icon
...
Signed-off-by: Jan-Christoph Borchardt <hey@jancborchardt.net>
2019-11-07 17:09:32 +07:00
Arthur Schiwon
9c766cf03f
do not break on Checkers that do not need specific context info
...
request time, for example
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2019-10-29 18:03:57 +07:00
Julius Härtl
8a0164b6b9
Adjust user UserWorkflowController methods to AWorflowController
...
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2019-10-29 18:03:56 +07:00
Julius Härtl
6830daf104
Decode list of events when returning them
...
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2019-10-29 18:03:54 +07:00
Julius Härtl
99c30453dd
Ignore unavailable entity/operation classes
...
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2019-10-15 12:54:22 +07:00
Joas Schilling
d4d3725bfe
Only cache the mimetype if the file exists
...
Otherwise files access control will cache "application/octet-stream"
for all the target node on:
rename, move, copy and all other methods which create a new item
To check this:
1. Add an automated tagging rule which tags on mimetype NOT "httpd/unix-directory"
2. Add an access control rule which checks for any mimetype
3. Create a folder and rename it, the folder should not be tagged, but it is
Signed-off-by: Joas Schilling <coding@schilljs.com>
2019-10-14 10:05:45 +07:00
Joas Schilling
0f3de7828e
Don't call basename on null
...
Signed-off-by: Joas Schilling <coding@schilljs.com>
2019-10-01 17:30:52 +07:00
Joas Schilling
f23d49266f
Merge pull request #17286 from nextcloud/bugfix/noid/correctly-detect-mimetype-from-uploads
...
Correctly detect the mimetype from uploads
2019-09-27 10:51:10 +07:00
Joas Schilling
744b635d5c
Correctly detect the mimetype from uploads
...
Signed-off-by: Joas Schilling <coding@schilljs.com>
2019-09-26 17:43:47 +07:00
Joas Schilling
2959e15c7a
Fix "Cannot add a NOT NULL column with default value NULL"
...
Signed-off-by: Joas Schilling <coding@schilljs.com>
2019-09-26 15:51:55 +07:00
Julius Härtl
e7e9166efe
Add endpoint to test operations before submitting
...
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2019-09-10 09:01:22 +07:00
Julius Härtl
72a7fe8185
Fix type hinting on setFileInfo
...
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2019-09-10 08:52:13 +07:00
Arthur Schiwon
d363654132
fix order/entity types when setting the context
...
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2019-09-10 00:52:27 +07:00
Arthur Schiwon
5610f73b7a
File entity supports tagging events now
...
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2019-09-09 23:59:31 +07:00
Arthur Schiwon
ae1cc1d14d
entities equip the RuleMatcher on the events they are aware of
...
Operations will receive the matcher instance
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2019-09-09 22:56:06 +07:00
Arthur Schiwon
849d025d09
let a dedicate service serve a stateful process
...
* includes making ICheck not requiring any context setter
* and IFileCheck extending the IEntityCheck as entity data can be handed in
via Dispatcher
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2019-09-09 22:56:05 +07:00
Arthur Schiwon
4cd931fcc6
require IChecks to receive entity context
...
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2019-09-09 22:56:05 +07:00
Arthur Schiwon
fd2de58503
seperate setFileInfo from ICheck
...
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2019-09-09 22:56:05 +07:00
Julius Härtl
687edb4bc8
No need to get the class since the entity is already the class string
...
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2019-09-09 22:56:05 +07:00
Julius Härtl
32279ed062
Extend missing check classes
...
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2019-09-09 22:56:05 +07:00
Arthur Schiwon
36624def94
add type hint for IDE
...
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2019-09-09 22:56:04 +07:00
Arthur Schiwon
c2a52813e2
extends ICheck with scope and entity support, provide them as initialState
...
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2019-09-09 22:56:04 +07:00
Arthur Schiwon
d2c8b939d5
WFE as proxy listen to relevent events and forwards them
...
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2019-09-09 22:56:04 +07:00
Arthur Schiwon
bed518e8ab
introduce GenericEntityEvent and adapt File entity
...
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2019-09-09 22:56:04 +07:00
Arthur Schiwon
0d7f7e5495
kill old non-OCS Controller
...
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2019-09-09 22:56:04 +07:00
blizzz
dcfe4ab2cc
fix parameter for OCSExcpetion
...
Signed-off-by: blizzz <blizzz@arthur-schiwon.de>
Co-Authored-By: Julius Härtl <jus@bitgrid.net>
2019-09-09 22:56:04 +07:00
blizzz
ce4f3598ff
use correct builder instance
...
Signed-off-by: blizzz <blizzz@arthur-schiwon.de>
Co-Authored-By: Julius Härtl <jus@bitgrid.net>
2019-09-09 22:56:03 +07:00