Skip to content

Commit

Permalink
EICNET-2979: remove previous functionality
Browse files Browse the repository at this point in the history
  • Loading branch information
dimitriskr committed Mar 5, 2024
1 parent b6309cb commit 13b24b6
Showing 1 changed file with 0 additions and 22 deletions.
22 changes: 0 additions & 22 deletions lib/modules/eic_admin/eic_admin.module
Original file line number Diff line number Diff line change
Expand Up @@ -53,28 +53,6 @@ function eic_admin_preprocess_views_view_field(&$vars) {
$vars['output'] = $flag_label;
$vars['field']->last_render = $flag_label;
}

if ($vars['view']->current_display === 'page_admin_groups') {
$group = $vars['row']->_entity;

if (!$group instanceof \Drupal\group\Entity\GroupInterface) {
return;
}

$is_group_sensitive = \Drupal::service('eic_groups.helper')->isGroupSensitive($group);
//We only alter on sensitive group which user has no permissions.
if ($group->access('view') || !$is_group_sensitive) {
return;
}

if ($vars['field']->field === 'label') {
$vars['output'] = t('Access denied: sensitive group with no access.');
$vars['field']->last_render = t('Access denied: sensitive group with no access.');
} else {
$vars['output'] = '';
$vars['field']->last_render = '';
}
}
}

/**
Expand Down

0 comments on commit 13b24b6

Please sign in to comment.