From 7496816687bb59545ed4e301b3dab0e5b90fabab Mon Sep 17 00:00:00 2001 From: Marc Berger Date: Fri, 13 Dec 2024 16:09:35 -0800 Subject: [PATCH 1/6] feat(SHS-5944): Uninstall honeypot module --- config/default/core.extension.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/config/default/core.extension.yml b/config/default/core.extension.yml index c49acdc37..e6cb66002 100644 --- a/config/default/core.extension.yml +++ b/config/default/core.extension.yml @@ -84,7 +84,6 @@ module: google_analytics: 0 hal: 0 help: 0 - honeypot: 0 hook_event_dispatcher: 0 hs_actions: 0 hs_admin: 0 From bb8e504fe3eafbb8dc8d949dba66fdc7f44820e3 Mon Sep 17 00:00:00 2001 From: Marc Berger Date: Fri, 13 Dec 2024 16:13:15 -0800 Subject: [PATCH 2/6] feat(SHS-5944): Remove honeypot settings --- config/default/honeypot.settings.yml | 24 ------------------------ 1 file changed, 24 deletions(-) delete mode 100644 config/default/honeypot.settings.yml diff --git a/config/default/honeypot.settings.yml b/config/default/honeypot.settings.yml deleted file mode 100644 index 67d762de4..000000000 --- a/config/default/honeypot.settings.yml +++ /dev/null @@ -1,24 +0,0 @@ -_core: - default_config_hash: 9bVDfWSa_In6VzTXmy04jJ_3ZQobihKjO9isuuUCPaw -protect_all_forms: false -unprotected_forms: - - user_login_form - - search_form - - search_block_form - - views_exposed_form - - honeypot_settings_form -log: false -element_name: url -time_limit: 5 -expire: 300 -form_settings: - user_register_form: false - user_pass: false - node_hs_basic_page_form: false - node_hs_course_form: false - node_hs_event_form: false - node_hs_event_series_form: false - node_hs_news_form: false - node_hs_person_form: false - node_hs_publications_form: false - node_hs_research_form: false From 6a5040c005e2d0701bd1a3a820b4e69adad3886a Mon Sep 17 00:00:00 2001 From: Marc Berger Date: Fri, 13 Dec 2024 16:16:15 -0800 Subject: [PATCH 3/6] feat(SHS-5944): Remove honeypot cron settings --- .../default/ultimate_cron.job.honeypot_cron.yml | 17 ----------------- 1 file changed, 17 deletions(-) delete mode 100644 config/default/ultimate_cron.job.honeypot_cron.yml diff --git a/config/default/ultimate_cron.job.honeypot_cron.yml b/config/default/ultimate_cron.job.honeypot_cron.yml deleted file mode 100644 index aa33d73b9..000000000 --- a/config/default/ultimate_cron.job.honeypot_cron.yml +++ /dev/null @@ -1,17 +0,0 @@ -uuid: 0eb0926a-3423-4e67-ac29-7fe14e1c49d3 -langcode: en -status: true -dependencies: - module: - - honeypot -title: 'Default cron handler' -id: honeypot_cron -weight: 0 -module: honeypot -callback: 'honeypot#cron' -scheduler: - id: simple -launcher: - id: serial -logger: - id: database From e73b0b5649b56bf4d99d9a1aa1e3820b77338b3a Mon Sep 17 00:00:00 2001 From: Marc Berger Date: Fri, 13 Dec 2024 16:33:59 -0800 Subject: [PATCH 4/6] feat(SHS-5944): Add update hook to remove config and uninstall module --- .../su_humsci_profile.install | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/docroot/profiles/humsci/su_humsci_profile/su_humsci_profile.install b/docroot/profiles/humsci/su_humsci_profile/su_humsci_profile.install index 2999c05bf..554175bdf 100644 --- a/docroot/profiles/humsci/su_humsci_profile/su_humsci_profile.install +++ b/docroot/profiles/humsci/su_humsci_profile/su_humsci_profile.install @@ -1096,3 +1096,26 @@ function su_humsci_profile_update_9718() { // Uninstalls modules after removing configs to prevent updb errors. \Drupal::service('module_installer')->uninstall(['hs_webform', 'webform_ui', 'webform']); } + +/** + * Remove honeypot config and uninstall honeypot. + */ +function su_humsci_profile_update_9719() { + // Remove honeypot existing config - needs to be done before uninstall. + $config_factory = \Drupal::configFactory(); + + $config_names = [ + 'honeypot.settings', + 'ultimate_cron.job.honeypot_cron', + ]; + + foreach ($config_names as $config) { + $config_factory->getEditable($config)->delete(); + $message = t('Deleted @config', [ + '@config' => $config, + ]); + \Drupal::logger('su_humsci_profile')->notice($message); + } + + \Drupal::service('module_installer')->uninstall(['honeypot']); +} From 253a5defe2b3bd6572e25082d6eaa71f349666d8 Mon Sep 17 00:00:00 2001 From: Marc Berger Date: Wed, 18 Dec 2024 15:43:26 -0800 Subject: [PATCH 5/6] chore(SHS-5944): Remove dependency in profile and increase update hook number --- .../humsci/su_humsci_profile/su_humsci_profile.info.yml | 1 - .../profiles/humsci/su_humsci_profile/su_humsci_profile.install | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/docroot/profiles/humsci/su_humsci_profile/su_humsci_profile.info.yml b/docroot/profiles/humsci/su_humsci_profile/su_humsci_profile.info.yml index 7c07681af..d6bd33b62 100644 --- a/docroot/profiles/humsci/su_humsci_profile/su_humsci_profile.info.yml +++ b/docroot/profiles/humsci/su_humsci_profile/su_humsci_profile.info.yml @@ -95,7 +95,6 @@ install: - 'field_permissions:field_permissions' - 'focal_point:focal_point' - 'fontawesome:fontawesome' - - 'honeypot:honeypot' - 'humsci:hs_actions' - 'humsci:hs_basic_page' - 'humsci:hs_basic_page_display' diff --git a/docroot/profiles/humsci/su_humsci_profile/su_humsci_profile.install b/docroot/profiles/humsci/su_humsci_profile/su_humsci_profile.install index 375cecd42..4033ae26b 100644 --- a/docroot/profiles/humsci/su_humsci_profile/su_humsci_profile.install +++ b/docroot/profiles/humsci/su_humsci_profile/su_humsci_profile.install @@ -1120,7 +1120,7 @@ function su_humsci_profile_update_9719() { /** * Remove honeypot config and uninstall honeypot. */ -function su_humsci_profile_update_9719() { +function su_humsci_profile_update_9720() { // Remove honeypot existing config - needs to be done before uninstall. $config_factory = \Drupal::configFactory(); From 816b752419d98e717e8917fb61a8d2bac07dd8cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9s=20D=C3=ADaz=20Soto?= Date: Thu, 19 Dec 2024 11:50:14 -0600 Subject: [PATCH 6/6] fix(shs-5944): change update hook sequence number --- .../profiles/humsci/su_humsci_profile/su_humsci_profile.install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docroot/profiles/humsci/su_humsci_profile/su_humsci_profile.install b/docroot/profiles/humsci/su_humsci_profile/su_humsci_profile.install index 74ff5f5a0..a75fcae71 100644 --- a/docroot/profiles/humsci/su_humsci_profile/su_humsci_profile.install +++ b/docroot/profiles/humsci/su_humsci_profile/su_humsci_profile.install @@ -1179,7 +1179,7 @@ function su_humsci_profile_update_9720() { /** * Remove honeypot config and uninstall honeypot. */ -function su_humsci_profile_update_9720() { +function su_humsci_profile_update_9721() { // Remove honeypot existing config - needs to be done before uninstall. $config_factory = \Drupal::configFactory();