File tree Expand file tree Collapse file tree 1 file changed +19
-7
lines changed Expand file tree Collapse file tree 1 file changed +19
-7
lines changed Original file line number Diff line number Diff line change @@ -493,13 +493,25 @@ public function rawSearchOptions() {
493493 $ hide_technician = false ;
494494 $ hide_technician_group = false ;
495495 if (!Session::isCron ()) {
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 ;
496+ $ anonymisation = Entity::getUsedConfig (
497+ 'anonymize_support_agents ' ,
498+ Session::getActiveEntity ()
499+ );
500+ switch ($ anonymisation ) {
501+ case Entity::ANONYMIZE_USE_GENERIC :
502+ case Entity::ANONYMIZE_USE_NICKNAME :
503+ $ hide_technician = true ;
504+ $ hide_technician_group = true ;
505+ break ;
506+
507+ case Entity::ANONYMIZE_USE_GENERIC_USER :
508+ case Entity::ANONYMIZE_USE_NICKNAME_USER :
509+ $ hide_technician = true ;
510+ break ;
511+
512+ case Entity::ANONYMIZE_USE_GENERIC_GROUP :
513+ $ hide_technician_group = true ;
514+ break ;
503515 }
504516 }
505517
You can’t perform that action at this time.
0 commit comments