Skip to content
Snippets Groups Projects
Unverified Commit 785fcf96 authored by Alexander Turinske's avatar Alexander Turinske
Browse files

Add group-level scan execution policy validation

- use same mechanism as project-level
- update configuration to allow for group-level

Changelog: added

EE: true
parent c42ab05e
No related merge requests found
......@@ -6,6 +6,7 @@ import { POLICY_TYPE_COMPONENT_OPTIONS } from './constants';
const SCHEMA_DICT = {
[POLICY_TYPE_COMPONENT_OPTIONS.scanExecution.urlParameter]: {
[NAMESPACE_TYPES.PROJECT]: getSingleScanExecutionPolicySchema,
[NAMESPACE_TYPES.GROUP]: getSingleScanExecutionPolicySchema,
},
};
......
......@@ -50,7 +50,7 @@ describe('PolicySchemaExtension', () => {
it.each`
title | policyType | namespaceType | itRegistersASchema | schemaFunction
${'does'} | ${POLICY_TYPE_COMPONENT_OPTIONS.scanExecution.urlParameter} | ${NAMESPACE_TYPES.PROJECT} | ${true} | ${getSingleScanExecutionPolicySchema}
${'does not'} | ${POLICY_TYPE_COMPONENT_OPTIONS.scanExecution.urlParameter} | ${NAMESPACE_TYPES.GROUP} | ${false} | ${() => ({})}
${'does'} | ${POLICY_TYPE_COMPONENT_OPTIONS.scanExecution.urlParameter} | ${NAMESPACE_TYPES.GROUP} | ${true} | ${getSingleScanExecutionPolicySchema}
${'does not'} | ${POLICY_TYPE_COMPONENT_OPTIONS.scanResult.urlParameter} | ${NAMESPACE_TYPES.PROJECT} | ${false} | ${() => ({})}
${'does not'} | ${POLICY_TYPE_COMPONENT_OPTIONS.scanResult.urlParameter} | ${NAMESPACE_TYPES.GROUP} | ${false} | ${() => ({})}
`(
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment