diff options
author | Julius Härtl <jus@bitgrid.net> | 2019-09-06 16:23:45 +0200 |
---|---|---|
committer | Julius Härtl <jus@bitgrid.net> | 2019-09-10 09:01:25 +0200 |
commit | 98666a9f4d79a1d2bb8e9be318946e99bdcaa8b8 (patch) | |
tree | 5bf63d1d2b4e7544c47c52c0c38ab384e43d3fa9 /apps/workflowengine/src/components/Checks/request.js | |
parent | d6b3af9d776c224015f9e9d8a4d858acae6f8560 (diff) | |
download | nextcloud-server-98666a9f4d79a1d2bb8e9be318946e99bdcaa8b8.tar.gz nextcloud-server-98666a9f4d79a1d2bb8e9be318946e99bdcaa8b8.zip |
Move over checker plugins
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Diffstat (limited to 'apps/workflowengine/src/components/Checks/request.js')
-rw-r--r-- | apps/workflowengine/src/components/Checks/request.js | 70 |
1 files changed, 70 insertions, 0 deletions
diff --git a/apps/workflowengine/src/components/Checks/request.js b/apps/workflowengine/src/components/Checks/request.js new file mode 100644 index 00000000000..d2e4eaa3565 --- /dev/null +++ b/apps/workflowengine/src/components/Checks/request.js @@ -0,0 +1,70 @@ +/* + * @copyright Copyright (c) 2019 Julius Härtl <jus@bitgrid.net> + * + * @author Julius Härtl <jus@bitgrid.net> + * + * @license GNU AGPL version 3 or any later version + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * + */ + +import RequestUserAgent from './RequestUserAgent'; +import RequestTime from './RequestTime'; + +const RequestChecks = [ + { + class: 'OCA\\WorkflowEngine\\Check\\RequestURL', + name: t('workflowengine', 'Request URL'), + operators: [ + { operator: 'is', name: t('workflowengine', 'is') }, + { operator: '!is', name: t('workflowengine', 'is not') }, + { operator: 'matches', name: t('workflowengine', 'matches') }, + { operator: '!matches', name: t('workflowengine', 'does not match') } + ], + // TODO: implement component + }, + { + class: 'OCA\\WorkflowEngine\\Check\\RequestTime', + name: t('workflowengine', 'Request time'), + operators: [ + { operator: 'in', name: t('workflowengine', 'between') }, + { operator: '!in', name: t('workflowengine', 'not between') } + ], + // TODO: implement component + component: RequestTime + }, + { + class: 'OCA\\WorkflowEngine\\Check\\RequestUserAgent', + name: t('workflowengine', 'Request user agent'), + operators: [ + { operator: 'is', name: t('workflowengine', 'is') }, + { operator: '!is', name: t('workflowengine', 'is not') }, + { operator: 'matches', name: t('workflowengine', 'matches') }, + { operator: '!matches', name: t('workflowengine', 'does not match') } + ], + component: RequestUserAgent + }, + { + class: 'OCA\\WorkflowEngine\\Check\\UserGroupMembership', + name: t('workflowengine', 'User group membership'), + operators: [ + { operator: 'is', name: t('workflowengine', 'is member of') }, + { operator: '!is', name: t('workflowengine', 'is not member of') } + ], + // TODO: implement component + } +] + +export default RequestChecks |