HOR-1775 Change Log is being shown for all the users in the Advanced Search.

+ Filter logs from Routing and Assigment triggers.
This commit is contained in:
davidcallizaya
2016-09-06 09:12:41 -04:00
parent 229f6d806f
commit fc4014c4eb

View File

@@ -18,12 +18,21 @@ class ChangeLog
{ {
/** /**
* List of variables that should not be considered * List of variables that should not be considered
* @var string[] * @var string[] $reserved
*/ */
private $reserved = [ private $reserved = [
'TASK', 'TASK',
'INDEX', 'INDEX',
'DYN_CONTENT_HISTORY' 'DYN_CONTENT_HISTORY',
'__VAR_CHANGED__',
];
/**
* List of reserved steps
* @var string[] $reservedSteps
*/
private $reservedSteps = [
-1,
-2,
]; ];
/** /**
@@ -179,6 +188,9 @@ class ChangeLog
private function hasPermission($uid) private function hasPermission($uid)
{ {
if(array_search($uid, $this->reservedSteps)!==false) {
return false;
}
foreach ($this->permissions as $type => $ids) { foreach ($this->permissions as $type => $ids) {
if (array_search($uid, $ids) !== false) { if (array_search($uid, $ids) !== false) {
return true; return true;