mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-25 19:48:49 +02:00
N°6384 - Flag LinkedSet (Indirect) when CheckToWrite must be requested to Hosted Object
This commit is contained in:
@@ -527,4 +527,29 @@ class UserRightsTest extends ItopDataTestCase
|
||||
'with Admins hidden' => [true, 0],
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* @dataProvider WithConstraintParameterProvider
|
||||
* @param string $sClass
|
||||
* @param string $sAttCode
|
||||
* @param bool $bExpected
|
||||
*
|
||||
* @return void
|
||||
* @throws \Exception
|
||||
*/
|
||||
public function testWithConstraintParameter(string $sClass, string $sAttCode, bool $bExpected)
|
||||
{
|
||||
$oAttDef = \MetaModel::GetAttributeDef($sClass, $sAttCode);
|
||||
$this->assertTrue(method_exists($oAttDef, "GetHasConstraint"));
|
||||
$this->assertEquals($bExpected, $oAttDef->GetHasConstraint());
|
||||
}
|
||||
|
||||
public function WithConstraintParameterProvider()
|
||||
{
|
||||
return [
|
||||
['User', 'profile_list', true],
|
||||
['User', 'allowed_org_list', true],
|
||||
['Person', 'team_list', false],
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user