diff --git a/modules/tide_site_restriction/src/Plugin/views/field/TideNodeBulkForm.php b/modules/tide_site_restriction/src/Plugin/views/field/TideNodeBulkForm.php index 00fcdc355..5e0c5700d 100644 --- a/modules/tide_site_restriction/src/Plugin/views/field/TideNodeBulkForm.php +++ b/modules/tide_site_restriction/src/Plugin/views/field/TideNodeBulkForm.php @@ -74,6 +74,17 @@ public function viewsForm(&$form, FormStateInterface $form_state) { '#empty_option' => $this->t('- Select -'), ]; $current_user = \Drupal::currentUser(); + + // Removed delete option for approver role. + if ($current_user) { + $roles = $current_user->getRoles(); + if ( + in_array('approver', $roles) && + isset($form['header']['node_bulk_form']['action']['#options']['node_delete_action']) + ) { + unset($form['header']['node_bulk_form']['action']['#options']['node_delete_action']); + } + } if (!$current_user->hasPermission('tide node bulk update') && !\Drupal::service('tide_site_restriction.helper')->canBypassRestriction($current_user)) { $form['actions']['submit']['#disabled'] = TRUE; @@ -86,15 +97,6 @@ public function viewsForm(&$form, FormStateInterface $form_state) { // Remove the default actions build array. unset($form['actions']); } - - // Removed delete option for approver role. - $roles = $current_user->getRoles(); - if ( - in_array('approver', $roles) && - isset($form['header']['node_bulk_form']['action']['#options']['node_delete_action']) - ) { - unset($form['header']['node_bulk_form']['action']['#options']['node_delete_action']); - } } } diff --git a/tide_core.module b/tide_core.module index 4dd45bb75..7fab15386 100644 --- a/tide_core.module +++ b/tide_core.module @@ -191,7 +191,7 @@ function tide_core_form_alter(&$form, FormStateInterface $form_state, $form_id) && isset($form['field_metatags']['widget'][0]['open_graph']) && isset($form['field_metatags']['widget'][0]['open_graph']['og_locale']) ) { - $url = Url::fromUri('https://digital-vic.atlassian.net/servicedesk/customer/portal/14/article/2272657746', [ + $url = Url::fromUri('https://digital-vic.atlassian.net/servicedesk/customer/portal/27/article/2272657746', [ 'attributes' => [ 'target' => '_blank', ],