Commit graph

121 commits

Author SHA1 Message Date
Arthur Schiwon
46a33249ff
consider local external storages, too
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2021-01-05 09:10:39 +01:00
Arthur Schiwon
edeb2467e1
enables the file name check also to match name of mountpoints
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2021-01-05 09:10:37 +01:00
Arthur Schiwon
48608db9be
avoid empty null default with value that will be inserted anyways
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2020-11-24 17:40:14 +01:00
Arthur Schiwon
793a52dd14
inform the user when flow config data exceeds thresholds
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2020-11-09 18:15:02 +01:00
Joas Schilling
cc36cc3f3f 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-08 07:44:10 +00:00
Arthur Schiwon
ace667bce7 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-25 08:44:19 +00:00
Julius Härtl
aeff8a84f1 Add app config to disable user flows
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2020-03-25 10:46:08 +00:00
Daniel Calviño Sánchez
2106e6ce04 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-17 14:09:58 +00:00
blizzz
41fd0aaa26
Merge pull request #19516 from nextcloud/backport/19510/stable18
[stable18] Continue with next foreach iteration
2020-02-19 10:01:30 +01:00
Julius Härtl
fa43d766e8 Continue with next foreach iteration
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2020-02-17 11:00:13 +00:00
Julius Härtl
e56441d6c5 Reduce flow logging at INFO level
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2020-02-14 13:22:10 +00:00
Arthur Schiwon
501e1aadd5 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-02-10 14:11:05 +00:00
Arthur Schiwon
02c0a8fbed log Flow activity
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2020-02-10 14:11:05 +00:00
Joas Schilling
13068ba3c5 Fix "Call to undefined method OCA\\WorkflowEngine\\Entity\\File::t()"
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-01-29 09:44:34 +00:00
Arthur Schiwon
029999049c make the mime type checker for flow available to regular users
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2020-01-09 15:30:47 +00: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 +01: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 +01: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 +01: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 +01: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 +01: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 +01: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 +01: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 +01: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 +01: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 +01: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 +01:00
Joas Schilling
511a4ba66f
Improve mimetype detection in workflow components
Signed-off-by: Joas Schilling <coding@schilljs.com>
2019-12-10 09:11:43 +01: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 +01: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 +01: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 +01:00
Arthur Schiwon
7a7a415fdc
expose user of running flows
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2019-11-28 13:51:20 +01: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 +01:00
Julius Härtl
d10b313186
Rename to flow
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2019-11-26 22:00:03 +01: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 +01: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 +01:00
Jan-Christoph Borchardt
cef0e622fb
Add Flow app icon
Signed-off-by: Jan-Christoph Borchardt <hey@jancborchardt.net>
2019-11-07 17:09:32 +01: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 +01: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 +01: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 +01: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 +02: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 +02:00
Joas Schilling
0f3de7828e
Don't call basename on null
Signed-off-by: Joas Schilling <coding@schilljs.com>
2019-10-01 17:30:52 +02: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 +02:00
Joas Schilling
744b635d5c
Correctly detect the mimetype from uploads
Signed-off-by: Joas Schilling <coding@schilljs.com>
2019-09-26 17:43:47 +02: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 +02: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 +02: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 +02: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 +02: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 +02: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 +02:00