Skip to content

Commit 075896b

Browse files
authored
feat(issue): more anonymising options (#3160)
1 parent 6cabca1 commit 075896b

File tree

1 file changed

+11
-6
lines changed

1 file changed

+11
-6
lines changed

inc/issue.class.php

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -491,11 +491,16 @@ public function getTicketsForDisplay($options) {
491491
public function rawSearchOptions() {
492492
$tab = [];
493493
$hide_technician = false;
494+
$hide_technician_group = false;
494495
if (!Session::isCron()) {
495-
$hide_technician = \Entity::getUsedConfig(
496-
'anonymize_support_agents',
497-
Session::getActiveEntity()
498-
);
496+
$user = new User();
497+
if (empty($user->getAnonymizedName(Session::getActiveEntity()))) {
498+
$hide_technician = true;
499+
}
500+
$group = new Group();
501+
if (empty($group->getAnonymizedName(Session::getActiveEntity()))) {
502+
$hide_technician_group = true;
503+
}
499504
}
500505

501506
$tab[] = [
@@ -743,8 +748,8 @@ public function rawSearchOptions() {
743748
'datatype' => 'dropdown',
744749
'forcegroupby' => true,
745750
'massiveaction' => false,
746-
'nodisplay' => $hide_technician,
747-
'nosearch' => $hide_technician,
751+
'nodisplay' => $hide_technician_group,
752+
'nosearch' => $hide_technician_group,
748753
'condition' => ['is_assign' => 1],
749754
'joinparams' => [
750755
'beforejoin' => [

0 commit comments

Comments
 (0)