File tree Expand file tree Collapse file tree 2 files changed +15
-7
lines changed
Controller/Adminhtml/FastlyCdn/Edge/Dictionary Expand file tree Collapse file tree 2 files changed +15
-7
lines changed Original file line number Diff line number Diff line change @@ -35,6 +35,8 @@ class ListAll extends Action
3535{
3636 const ADMIN_RESOURCE = 'Magento_Config::config ' ;
3737
38+ const NGWAF_DICTIONARY_NAME = "Edge_Security " ;
39+
3840 /**
3941 * @var Http
4042 */
@@ -96,6 +98,14 @@ public function execute()
9698 ]);
9799 }
98100
101+ // This dictionary represents NGWAF, used while migrating customers from WAF. Adobe is requesting that
102+ // their customers shouldn't be able to disable it, so we remove it from Admin listing.
103+ foreach ($ dictionaries as $ key => $ dictionary ) {
104+ if (isset ($ dictionary ->name ) && $ dictionary ->name === self ::NGWAF_DICTIONARY_NAME ) {
105+ array_splice ($ dictionaries , $ key , 1 );
106+ }
107+ }
108+
99109 return $ result ->setData ([
100110 'status ' => true ,
101111 'dictionaries ' => $ dictionaries
Original file line number Diff line number Diff line change @@ -72,13 +72,11 @@ define([
7272 listDictionaries ( active_version , false ) . done ( function ( response ) {
7373 $ ( '.loading-dictionaries' ) . hide ( ) ;
7474 if ( response . status !== false ) {
75- if ( response . status !== false ) {
76- if ( response . dictionaries . length > 0 ) {
77- dictionaries = response . dictionaries ;
78- processDictionaries ( response . dictionaries ) ;
79- } else {
80- $ ( '.no-dictionaries' ) . show ( ) ;
81- }
75+ if ( response . dictionaries . length > 0 ) {
76+ dictionaries = response . dictionaries ;
77+ processDictionaries ( response . dictionaries ) ;
78+ } else {
79+ $ ( '.no-dictionaries' ) . show ( ) ;
8280 }
8381 }
8482 } ) . fail ( function ( ) {
You can’t perform that action at this time.
0 commit comments