diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 5a850b2ab3ae68f5f7870013e0d9a9ffd8af133b..4428fc16e6063a87b90005d186883e9ce87a4d6b 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -59,4 +59,4 @@ variables: OPT_IN_TEST_MAX_PHP: '1' OPT_IN_TEST_PREVIOUS_MAJOR: '1' OPT_IN_TEST_NEXT_MINOR: '1' - _CSPELL_WORDS: "jaypanify,multivar,varchar" + _CSPELL_WORDS: "jaypanify,multivar,varchar,ripd" diff --git a/config/install/restrict_ip.settings.yml b/config/install/restrict_ip.settings.yml index 84d3277f50c1c4e936fc7d6e19ba85e03b6577d5..71b69c1068b126d9db29a608a6f00754c67ebed5 100644 --- a/config/install/restrict_ip.settings.yml +++ b/config/install/restrict_ip.settings.yml @@ -32,4 +32,4 @@ white_black_list: 0 country_white_black_list: 0 # A string indicating which countries should be white/black listed -country_list: '' +country_list: null diff --git a/config/schema/restrict_ip.schema.yml b/config/schema/restrict_ip.schema.yml index 4adec527cd5539eda56586c1307fad67ad80931f..84899315f5680e25c21eb18a11498db82ae166c8 100644 --- a/config/schema/restrict_ip.schema.yml +++ b/config/schema/restrict_ip.schema.yml @@ -1,6 +1,8 @@ restrict_ip.settings: type: config_object label: 'Restrict IP settings' + constraints: + FullyValidatable: ~ mapping: enable: type: boolean @@ -40,3 +42,6 @@ restrict_ip.settings: country_list: type: string label: 'A colon separated list of countries that should be white/black listed' + nullable: true + constraints: + CountryCode: [] \ No newline at end of file diff --git a/restrict_ip.install b/restrict_ip.install index 31c6035ac73938929395b8d831bc0ac6572dbd53..c9e308fbce399accdc505a13e76017f7b0e5273f 100644 --- a/restrict_ip.install +++ b/restrict_ip.install @@ -135,3 +135,10 @@ function restrict_ip_update_500001(): void { $schema->addPrimaryKey('restrict_ip_whitelisted_ip_addresses', ['path']); } } + +/** + * Resave config. + */ +function restrict_ip_update_500002(): void { + \Drupal::configFactory()->getEditable('restrict_ip.settings')->save(); +}