diff --git a/modules/tide_site/src/AliasManager.php b/modules/tide_site/src/AliasManager.php index b11506c88..7bd15d762 100644 --- a/modules/tide_site/src/AliasManager.php +++ b/modules/tide_site/src/AliasManager.php @@ -26,7 +26,7 @@ class AliasManager extends CoreAliasManager { /** * {@inheritdoc} */ - public function __construct(AliasRepositoryInterface $repository, AliasWhitelistInterface $whitelist, LanguageManagerInterface $language_manager, CacheBackendInterface $cache, protected ?TimeInterface $time = NULL, AliasStorageHelper $alias_helper) { + public function __construct(AliasRepositoryInterface $repository, AliasWhitelistInterface $whitelist, LanguageManagerInterface $language_manager, CacheBackendInterface $cache, protected ?TimeInterface $time, AliasStorageHelper $alias_helper) { parent::__construct($repository, $whitelist, $language_manager, $cache, $time); $this->aliasHelper = $alias_helper; } diff --git a/modules/tide_tfa/src/TideTfaOperation.php b/modules/tide_tfa/src/TideTfaOperation.php index 922721979..4e6a24282 100644 --- a/modules/tide_tfa/src/TideTfaOperation.php +++ b/modules/tide_tfa/src/TideTfaOperation.php @@ -56,9 +56,13 @@ public static function setupTfaSettings() { $roles = Role::loadMultiple(); // Initialize the $tfa_required_roles array. $tfa_required_roles = []; + // Define the roles to exclude in a variable. + $excluded_roles = ['authenticated', 'previewer', 'secure_file_user']; + // Iterate through the roles and map the role IDs. foreach ($roles as $role) { - if ($role->id() !== 'authenticated') { + // Check if the current role is not in the excluded roles. + if (!in_array($role->id(), $excluded_roles)) { // Map the role ID to itself. $tfa_required_roles[$role->id()] = $role->id(); } diff --git a/modules/tide_webform/tide_webform.module b/modules/tide_webform/tide_webform.module index 4755aedc1..976647998 100644 --- a/modules/tide_webform/tide_webform.module +++ b/modules/tide_webform/tide_webform.module @@ -43,7 +43,7 @@ function tide_webform_form_alter(&$form, FormStateInterface $form_state, $form_i if ($form_id == 'webform_ui_element_form') { $form['#after_build'][] = 'tide_webform_webform_ui_element_form_after_build'; $form['#attached']['library'][] = 'tide_webform/webform'; - if (isset($form['properties']['form']['length_container']['maxlength']) && array_key_exists('#default_value', $form['properties']['form']['length_container']['maxlength'])) { + if (isset($form['properties']['form']['length_container']['maxlength']) && array_key_exists('#default_value', $form['properties']['form']['length_container']['maxlength']) && $form['properties']['type']['#value'] === 'textfield') { $default_value = NestedArray::getValue($form, [ 'properties',