mirror of
https://github.com/Combodo/iTop.git
synced 2026-05-22 00:32:16 +02:00
N°8782 - Union queries allow all data
This commit is contained in:
@@ -694,15 +694,6 @@ class DBSearchTest extends ItopDataTestCase
|
||||
$this->CheckNestedSearch($sNestedQuery, false);
|
||||
}
|
||||
|
||||
public function testAllowAllDataOnUnions()
|
||||
{
|
||||
$oSearch = \DBObjectSearch::FromOQL('SELECT Server UNION SELECT VirtualMachine');
|
||||
$oSearch->AllowAllData(false);
|
||||
self::assertFalse($oSearch->IsAllDataAllowed(), 'DBUnionSearch AllowData value');
|
||||
$oSearch->AllowAllData(true);
|
||||
self::assertTrue($oSearch->IsAllDataAllowed(), 'DBUnionSearch AllowData value');
|
||||
}
|
||||
|
||||
private function CheckNestedSearch($sQuery, $bAllowAllData)
|
||||
{
|
||||
$oNestedQuerySearch = \DBObjectSearch::FromOQL($sQuery);
|
||||
|
||||
@@ -183,4 +183,14 @@ class DBUnionSearchTest extends ItopDataTestCase
|
||||
],
|
||||
];
|
||||
}
|
||||
|
||||
public function testAllowAllDataOnUnions()
|
||||
{
|
||||
$oSearch = \DBObjectSearch::FromOQL('SELECT Server UNION SELECT VirtualMachine');
|
||||
$oSearch->AllowAllData(false);
|
||||
self::assertFalse($oSearch->IsAllDataAllowed(), 'DBUnionSearch AllowData value');
|
||||
$oSearch->AllowAllData(true);
|
||||
self::assertTrue($oSearch->IsAllDataAllowed(), 'DBUnionSearch AllowData value');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user