Skip to content

Commit

Permalink
feat(issue): more anonymising options (#3160)
Browse files Browse the repository at this point in the history
  • Loading branch information
Rom1-B committed Jan 31, 2023
1 parent 6cabca1 commit 075896b
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions inc/issue.class.php
Expand Up @@ -491,11 +491,16 @@ public function getTicketsForDisplay($options) {
public function rawSearchOptions() {
$tab = [];
$hide_technician = false;
$hide_technician_group = false;
if (!Session::isCron()) {
$hide_technician = \Entity::getUsedConfig(
'anonymize_support_agents',
Session::getActiveEntity()
);
$user = new User();
if (empty($user->getAnonymizedName(Session::getActiveEntity()))) {
$hide_technician = true;
}
$group = new Group();
if (empty($group->getAnonymizedName(Session::getActiveEntity()))) {
$hide_technician_group = true;
}
}

$tab[] = [
Expand Down Expand Up @@ -743,8 +748,8 @@ public function rawSearchOptions() {
'datatype' => 'dropdown',
'forcegroupby' => true,
'massiveaction' => false,
'nodisplay' => $hide_technician,
'nosearch' => $hide_technician,
'nodisplay' => $hide_technician_group,
'nosearch' => $hide_technician_group,
'condition' => ['is_assign' => 1],
'joinparams' => [
'beforejoin' => [
Expand Down

0 comments on commit 075896b

Please sign in to comment.