2019-10-02 07:18:17 -04:00
|
|
|
/**
|
2019-09-06 10:23:45 -04:00
|
|
|
* @copyright Copyright (c) 2019 Julius Härtl <jus@bitgrid.net>
|
|
|
|
|
*
|
|
|
|
|
* @author Julius Härtl <jus@bitgrid.net>
|
|
|
|
|
*
|
2022-01-11 11:18:11 -05:00
|
|
|
* @license AGPL-3.0-or-later
|
2019-09-06 10:23:45 -04:00
|
|
|
*
|
|
|
|
|
* 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
|
2021-03-31 06:15:40 -04:00
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
2019-09-06 10:23:45 -04:00
|
|
|
* 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/>.
|
|
|
|
|
*
|
|
|
|
|
*/
|
|
|
|
|
|
2019-09-09 09:04:51 -04:00
|
|
|
import RequestUserAgent from './RequestUserAgent'
|
|
|
|
|
import RequestTime from './RequestTime'
|
2019-09-09 10:20:33 -04:00
|
|
|
import RequestURL from './RequestURL'
|
2019-09-09 10:52:11 -04:00
|
|
|
import RequestUserGroup from './RequestUserGroup'
|
2019-09-06 10:23:45 -04:00
|
|
|
|
|
|
|
|
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') },
|
2019-11-13 07:05:10 -05:00
|
|
|
{ operator: '!matches', name: t('workflowengine', 'does not match') },
|
2019-09-09 10:20:33 -04:00
|
|
|
],
|
2019-11-13 07:05:10 -05:00
|
|
|
component: RequestURL,
|
2019-09-06 10:23:45 -04:00
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
class: 'OCA\\WorkflowEngine\\Check\\RequestTime',
|
|
|
|
|
name: t('workflowengine', 'Request time'),
|
|
|
|
|
operators: [
|
|
|
|
|
{ operator: 'in', name: t('workflowengine', 'between') },
|
2019-11-13 07:05:10 -05:00
|
|
|
{ operator: '!in', name: t('workflowengine', 'not between') },
|
2019-09-06 10:23:45 -04:00
|
|
|
],
|
2019-11-13 07:05:10 -05:00
|
|
|
component: RequestTime,
|
2019-09-06 10:23:45 -04:00
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
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') },
|
2019-11-13 07:05:10 -05:00
|
|
|
{ operator: '!matches', name: t('workflowengine', 'does not match') },
|
2019-09-06 10:23:45 -04:00
|
|
|
],
|
2019-11-13 07:05:10 -05:00
|
|
|
component: RequestUserAgent,
|
2019-09-06 10:23:45 -04:00
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
class: 'OCA\\WorkflowEngine\\Check\\UserGroupMembership',
|
|
|
|
|
name: t('workflowengine', 'User group membership'),
|
|
|
|
|
operators: [
|
|
|
|
|
{ operator: 'is', name: t('workflowengine', 'is member of') },
|
2019-11-13 07:05:10 -05:00
|
|
|
{ operator: '!is', name: t('workflowengine', 'is not member of') },
|
2019-09-09 10:52:11 -04:00
|
|
|
],
|
2019-11-13 07:05:10 -05:00
|
|
|
component: RequestUserGroup,
|
|
|
|
|
},
|
2019-09-06 10:23:45 -04:00
|
|
|
]
|
|
|
|
|
|
|
|
|
|
export default RequestChecks
|