diff --git a/config.json b/config.json index 140595224..2eab319b6 100644 --- a/config.json +++ b/config.json @@ -26,7 +26,12 @@ "preview_data": true, "glue_crawler": true, "confidentiality_dropdown" : true, - "topics_dropdown" : true + "topics_dropdown" : true, + "auto_approval_for_confidentiality_level" : { + "Unclassified" : true, + "Official" : true, + "Secret" : true + } } }, "worksheets": { diff --git a/frontend/src/modules/Datasets/views/DatasetCreateForm.js b/frontend/src/modules/Datasets/views/DatasetCreateForm.js index ebb2a41bb..b5485fae5 100644 --- a/frontend/src/modules/Datasets/views/DatasetCreateForm.js +++ b/frontend/src/modules/Datasets/views/DatasetCreateForm.js @@ -396,22 +396,27 @@ const DatasetCreateForm = (props) => { - - - Enabled - - - Disabled - - + {config.modules.datasets.features + .auto_approval_for_confidentiality_level[ + values.confidentiality + ] === true && ( + + + Enabled + + + Disabled + + + )} diff --git a/frontend/src/modules/Datasets/views/DatasetEditForm.js b/frontend/src/modules/Datasets/views/DatasetEditForm.js index b1838e780..c778f00d6 100644 --- a/frontend/src/modules/Datasets/views/DatasetEditForm.js +++ b/frontend/src/modules/Datasets/views/DatasetEditForm.js @@ -482,22 +482,27 @@ const DatasetEditForm = (props) => { - - - Enabled - - - Disabled - - + {config.modules.datasets.features + .auto_approval_for_confidentiality_level[ + values.confidentiality + ] === true && ( + + + Enabled + + + Disabled + + + )} diff --git a/frontend/src/modules/Datasets/views/DatasetImportForm.js b/frontend/src/modules/Datasets/views/DatasetImportForm.js index 888053f47..afe64ac0c 100644 --- a/frontend/src/modules/Datasets/views/DatasetImportForm.js +++ b/frontend/src/modules/Datasets/views/DatasetImportForm.js @@ -409,22 +409,27 @@ const DatasetImportForm = (props) => { - - - Enabled - - - Disabled - - + {config.modules.datasets.features + .auto_approval_for_confidentiality_level[ + values.confidentiality + ] === true && ( + + + Enabled + + + Disabled + + + )}