/**
  * Hide all blacklisted properties from the user as restricted by monitoring/blacklist/properties
  *
  * Currently this only affects the custom variables
  */
 protected function hideBlacklistedProperties()
 {
     if ($this->blacklistedProperties === null) {
         $this->blacklistedProperties = new GlobFilter(Auth::getInstance()->getRestrictions('monitoring/blacklist/properties'));
     }
     $allProperties = $this->blacklistedProperties->removeMatching(array($this->type => array('vars' => $this->customvars)));
     $this->customvars = isset($allProperties[$this->type]['vars']) ? $allProperties[$this->type]['vars'] : array();
 }
Exemple #2
0
 protected function assertGlobFilterRemovesMatching($filterPattern, $unfiltered, $filtered)
 {
     $filter = new GlobFilter($filterPattern);
     $this->assertTrue($filter->removeMatching($unfiltered) === $filtered, 'Filter `' . $filterPattern . '\' doesn\'t work as intended');
 }