From 6213ac72f10dd9c5e6f7819a97f52b48471ead59 Mon Sep 17 00:00:00 2001 From: ovidiu Date: Wed, 8 Nov 2023 15:04:56 +0200 Subject: [PATCH 1/4] disabled tfa --- conf/cmi/core.extension.yml | 1 - conf/cmi/tfa.settings.yml | 46 ---------------------------- conf/cmi/user.role.admin.yml | 4 +-- conf/cmi/user.role.authenticated.yml | 2 -- 4 files changed, 2 insertions(+), 51 deletions(-) delete mode 100644 conf/cmi/tfa.settings.yml diff --git a/conf/cmi/core.extension.yml b/conf/cmi/core.extension.yml index 47922c1..34d6324 100644 --- a/conf/cmi/core.extension.yml +++ b/conf/cmi/core.extension.yml @@ -122,7 +122,6 @@ module: taxonomy: 0 telephone: 0 text: 0 - tfa: 0 token: 0 toolbar: 0 twig_tweak: 0 diff --git a/conf/cmi/tfa.settings.yml b/conf/cmi/tfa.settings.yml deleted file mode 100644 index 8ad0627..0000000 --- a/conf/cmi/tfa.settings.yml +++ /dev/null @@ -1,46 +0,0 @@ -_core: - default_config_hash: ls2wXvXf4vms4y6c-xMUgSp8ZmVmwFy5NgL0DIPgU_0 -langcode: en -enabled: true -required_roles: - authenticated: authenticated - read_only: '0' - content_producer: '0' - editor: '0' - admin: '0' -send_plugins: { } -login_plugins: { } -login_plugin_settings: - tfa_trusted_browser: - cookie_allow_subdomains: true - cookie_expiration: 30 - cookie_name: tfa-trusted-browser -allowed_validation_plugins: - tfa_totp: tfa_totp -default_validation_plugin: tfa_totp -validation_plugin_settings: - tfa_hotp: - counter_window: 10 - site_name_prefix: 1 - name_prefix: TFA - issuer: Drupal - tfa_recovery_code: - recovery_codes_amount: 10 - tfa_totp: - time_skew: 10 - site_name_prefix: 1 - name_prefix: TFA - issuer: Helfi-emergency-site -validation_skip: 1 -encryption: authentication_profile -tfa_flood_uid_only: 1 -tfa_flood_window: 300 -tfa_flood_threshold: 6 -help_text: 'Contact support to reset your access' -mail: - tfa_enabled_configuration: - subject: 'Your [site:name] account now has two-factor authentication' - body: "[user:display-name],\r\n\r\nThanks for configuring two-factor authentication on your [site:name] account!\r\n\r\nThis additional level of security will help to ensure that only you are able to log in to your account.\r\n\r\nIf you ever lose the device you configured, you should act quickly to delete its association with this account.\r\n\r\n--\r\n[site:name] team" - tfa_disabled_configuration: - subject: 'Your [site:name] account no longer has two-factor authentication' - body: "[user:display-name],\r\n\r\nTwo-factor authentication has been disabled on your [site:name] account.\r\n\r\nIf you did not take this action, please contact a site administrator immediately.\r\n\r\n--\r\n[site:name] team" diff --git a/conf/cmi/user.role.admin.yml b/conf/cmi/user.role.admin.yml index f8d27ea..68a4a69 100644 --- a/conf/cmi/user.role.admin.yml +++ b/conf/cmi/user.role.admin.yml @@ -28,6 +28,7 @@ dependencies: - file - filter - helfi_api_base + - helfi_emergency_general - locale - media - menu_link_attributes @@ -44,7 +45,6 @@ dependencies: - simple_sitemap - system - taxonomy - - tfa - view_unpublished _core: default_config_hash: dKoMlS2I78xz3dRwDh7nlvZPJM1CmU8s6tNswGPk3_4 @@ -72,7 +72,6 @@ permissions: - 'administer pathauto' - 'administer redirects' - 'administer sitemap settings' - - 'administer tfa for other users' - 'administer url aliases' - 'administer users' - 'assign admin role' @@ -153,6 +152,7 @@ permissions: - 'edit terms in news_group' - 'edit terms in news_neighbourhoods' - 'edit terms in news_tags' + - 'modify announcement message' - 'revert all revisions' - 'revert announcement revisions' - 'revert landing_page revisions' diff --git a/conf/cmi/user.role.authenticated.yml b/conf/cmi/user.role.authenticated.yml index 30cbc06..c2ded4f 100644 --- a/conf/cmi/user.role.authenticated.yml +++ b/conf/cmi/user.role.authenticated.yml @@ -8,7 +8,6 @@ dependencies: - media - paragraphs - system - - tfa - toolbar _core: default_config_hash: dJ0L2DNSj5q6XVZAGsuVDpJTh5UeYkIPwKrUOOpr8YI @@ -20,7 +19,6 @@ permissions: - 'access content' - 'access toolbar' - 'display eu cookie compliance popup' - - 'setup own tfa' - 'view media' - 'view remote entities' - 'view unpublished paragraphs' From 1277e620c96c91fa367167dd3b812aac208ce57a Mon Sep 17 00:00:00 2001 From: ovidiu Date: Wed, 8 Nov 2023 15:29:03 +0200 Subject: [PATCH 2/4] disabled tfa dependencies --- conf/cmi/core.extension.yml | 4 +--- .../encrypt.profile.authentication_profile.yml | 13 ------------- conf/cmi/encrypt.settings.yml | 5 ----- conf/cmi/key.key.authentication_key.yml | 17 ----------------- 4 files changed, 1 insertion(+), 38 deletions(-) delete mode 100644 conf/cmi/encrypt.profile.authentication_profile.yml delete mode 100644 conf/cmi/encrypt.settings.yml delete mode 100644 conf/cmi/key.key.authentication_key.yml diff --git a/conf/cmi/core.extension.yml b/conf/cmi/core.extension.yml index 34d6324..a1a3e30 100644 --- a/conf/cmi/core.extension.yml +++ b/conf/cmi/core.extension.yml @@ -18,12 +18,12 @@ module: contextual: 0 crop: 0 datetime: 0 + dblog: 0 diff: 0 dynamic_page_cache: 0 easy_breadcrumb: 0 editor: 0 editoria11y: 0 - encrypt: 0 entity: 0 entity_reference_revisions: 0 entity_usage: 0 @@ -81,7 +81,6 @@ module: imagemagick: 0 jquery_ui: 0 jquery_ui_draggable: 0 - key: 0 language: 0 link: 0 linkit: 0 @@ -105,7 +104,6 @@ module: paragraphs_library: 0 path: 0 path_alias: 0 - real_aes: 0 redirect: 0 responsive_image: 0 rest: 0 diff --git a/conf/cmi/encrypt.profile.authentication_profile.yml b/conf/cmi/encrypt.profile.authentication_profile.yml deleted file mode 100644 index a5df7f5..0000000 --- a/conf/cmi/encrypt.profile.authentication_profile.yml +++ /dev/null @@ -1,13 +0,0 @@ -uuid: a5d859b7-2ac1-4107-8ce9-60064d1558ca -langcode: en -status: true -dependencies: - config: - - key.key.authentication_key - module: - - real_aes -id: authentication_profile -label: 'Authentication profile' -encryption_method: real_aes -encryption_method_configuration: { } -encryption_key: authentication_key diff --git a/conf/cmi/encrypt.settings.yml b/conf/cmi/encrypt.settings.yml deleted file mode 100644 index e0aa4b0..0000000 --- a/conf/cmi/encrypt.settings.yml +++ /dev/null @@ -1,5 +0,0 @@ -_core: - default_config_hash: CMyccvAuba2yH-HYmcEL0pq1Seyxzq9VHhKbQKwAWY4 -langcode: en -check_profile_status: true -allow_deprecated_plugins: false diff --git a/conf/cmi/key.key.authentication_key.yml b/conf/cmi/key.key.authentication_key.yml deleted file mode 100644 index 3d7884f..0000000 --- a/conf/cmi/key.key.authentication_key.yml +++ /dev/null @@ -1,17 +0,0 @@ -uuid: c25357ac-7135-46cc-9da6-59c245a8504b -langcode: en -status: true -dependencies: { } -id: authentication_key -label: 'Authentication key' -description: '' -key_type: encryption -key_type_settings: - key_size: 256 -key_provider: env -key_provider_settings: - env_variable: TFA_AUTH_KEY - base64_encoded: true - strip_line_breaks: true -key_input: none -key_input_settings: { } From 9d1c6ac02ec0071d66015cfa9e7d1dfb642c5396 Mon Sep 17 00:00:00 2001 From: ovidiu Date: Wed, 8 Nov 2023 15:45:18 +0200 Subject: [PATCH 3/4] disabled dblog --- conf/cmi/core.extension.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/conf/cmi/core.extension.yml b/conf/cmi/core.extension.yml index a1a3e30..5d0a6c0 100644 --- a/conf/cmi/core.extension.yml +++ b/conf/cmi/core.extension.yml @@ -18,7 +18,6 @@ module: contextual: 0 crop: 0 datetime: 0 - dblog: 0 diff: 0 dynamic_page_cache: 0 easy_breadcrumb: 0 From 18377e2446a8dabc7fdfb0e938260dc1490896fd Mon Sep 17 00:00:00 2001 From: ovidiu Date: Thu, 9 Nov 2023 12:01:52 +0200 Subject: [PATCH 4/4] fixed logos url and disabled links field in news display --- ...ntity_view_display.node.news_item.default.yml | 16 ++-------------- .../custom/hdbt_subtheme/hdbt_subtheme.theme | 8 ++++++-- 2 files changed, 8 insertions(+), 16 deletions(-) diff --git a/conf/cmi/core.entity_view_display.node.news_item.default.yml b/conf/cmi/core.entity_view_display.node.news_item.default.yml index 3bb2528..11f2096 100644 --- a/conf/cmi/core.entity_view_display.node.news_item.default.yml +++ b/conf/cmi/core.entity_view_display.node.news_item.default.yml @@ -16,7 +16,6 @@ dependencies: module: - entity_reference_revisions - helfi_platform_config - - link - user _core: default_config_hash: _31gTd8Z7ZT8KGS8tHPve5Vb_OAnn7JbybIcOXUGiyA @@ -42,7 +41,7 @@ content: format_custom_false: '' format_custom_true: '' third_party_settings: { } - weight: 9 + weight: 8 region: content field_lead_in: type: text_span @@ -65,18 +64,6 @@ content: label: inline settings: { } third_party_settings: { } - weight: 8 - region: content - field_news_item_links_link: - type: link - label: hidden - settings: - trim_length: 255 - url_only: false - url_plain: false - rel: '0' - target: '0' - third_party_settings: { } weight: 7 region: content field_news_item_links_title: @@ -111,6 +98,7 @@ content: weight: 3 region: content hidden: + field_news_item_links_link: true field_news_item_tags: true langcode: true toc_enabled: true diff --git a/public/themes/custom/hdbt_subtheme/hdbt_subtheme.theme b/public/themes/custom/hdbt_subtheme/hdbt_subtheme.theme index d1732e9..d8e8cc2 100644 --- a/public/themes/custom/hdbt_subtheme/hdbt_subtheme.theme +++ b/public/themes/custom/hdbt_subtheme/hdbt_subtheme.theme @@ -18,7 +18,9 @@ function hdbt_subtheme_preprocess_block(&$variables) { } // Overwrite etusivu url. if ($variables['elements']['#plugin_id'] == 'system_branding_block') { - $variables['frontpage_instance_url'] = \Drupal::request()->getSchemeAndHttpHost(); + $lang = \Drupal::languageManager()->getCurrentLanguage()->getId(); + $variables['frontpage_instance_url'] = + \Drupal::request()->getSchemeAndHttpHost() . '/' . $lang; } } @@ -128,6 +130,8 @@ function hdbt_subtheme_theme_suggestions_node_alter(&$suggestions, $variables) { */ function hdbt_subtheme_preprocess_region(&$variables) { if (isset($variables['elements']['hdbt_subtheme_footerbottomnavigation'])) { - $variables['frontpage_instance_url'] = \Drupal::request()->getSchemeAndHttpHost(); + $lang = \Drupal::languageManager()->getCurrentLanguage()->getId(); + $variables['frontpage_instance_url'] = + \Drupal::request()->getSchemeAndHttpHost() . '/' . $lang; } }