mirror of
https://github.com/Combodo/iTop.git
synced 2026-02-12 23:14:18 +01:00
N°6384 - Flag LinkedSet to specify that it has CheckToWrite constraint (more specific parameter name)
This commit is contained in:
@@ -1727,12 +1727,13 @@ class AttributeLinkedSet extends AttributeDefinition
|
||||
}
|
||||
|
||||
/**
|
||||
* @return bool true if host object has constraints
|
||||
* Indicates if the current Attribute has constraints (php constraints or datamodel constraints)
|
||||
* @return bool true if Attribute has constraints
|
||||
* @since 3.1.0 N°6228
|
||||
*/
|
||||
public function GetHasConstraint()
|
||||
{
|
||||
return $this->GetOptional('with_constraint', false);
|
||||
return $this->GetOptional('with_php_constraint', false);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -482,8 +482,8 @@
|
||||
<type>boolean</type>
|
||||
<default>true</default>
|
||||
</property>
|
||||
<property id="with_constraint">
|
||||
<php_param>with_constraint</php_param>
|
||||
<property id="with_php_constraint">
|
||||
<php_param>with_php_constraint</php_param>
|
||||
<mandatory>false</mandatory>
|
||||
<type>boolean</type>
|
||||
<default>false</default>
|
||||
|
||||
@@ -248,8 +248,8 @@ abstract class User extends cmdbAbstractObject
|
||||
"depends_on" => array(),
|
||||
)));
|
||||
|
||||
MetaModel::Init_AddAttribute(new AttributeLinkedSetIndirect("profile_list",array("linked_class" => "URP_UserProfile", "ext_key_to_me" => "userid", "ext_key_to_remote" => "profileid", "allowed_values" => null, "count_min" => 1, "count_max" => 0, "depends_on" => array(), "display_style" => 'property', "with_constraint" => true)));
|
||||
MetaModel::Init_AddAttribute(new AttributeLinkedSetIndirect("allowed_org_list", array("linked_class" => "URP_UserOrg", "ext_key_to_me" => "userid", "ext_key_to_remote" => "allowed_org_id", "allowed_values" => null, "count_min" => 1, "count_max" => 0, "depends_on" => array(), 'with_constraint' => true)));
|
||||
MetaModel::Init_AddAttribute(new AttributeLinkedSetIndirect("profile_list",array("linked_class" => "URP_UserProfile", "ext_key_to_me" => "userid", "ext_key_to_remote" => "profileid", "allowed_values" => null, "count_min" => 1, "count_max" => 0, "depends_on" => array(), "display_style" => 'property', "with_php_constraint" => true)));
|
||||
MetaModel::Init_AddAttribute(new AttributeLinkedSetIndirect("allowed_org_list", array("linked_class" => "URP_UserOrg", "ext_key_to_me" => "userid", "ext_key_to_remote" => "allowed_org_id", "allowed_values" => null, "count_min" => 1, "count_max" => 0, "depends_on" => array(), 'with_php_constraint' => true)));
|
||||
MetaModel::Init_AddAttribute(new AttributeCaseLog("log", array("sql" => 'log', "is_null_allowed" => true, "default_value" => '', "allowed_values" => null, "depends_on" => array(), "always_load_in_tables" => false)));
|
||||
|
||||
// Display lists
|
||||
|
||||
@@ -1132,11 +1132,6 @@ class iTopDesignFormat
|
||||
$this->RemoveNodeFromXPath("/itop_design/classes//class/fields/field[@xsi:type='AttributeLinkedSet']/display_style");
|
||||
$this->RemoveNodeFromXPath("/itop_design/classes//class/fields/field[@xsi:type='AttributeLinkedSetIndirect']/display_style");
|
||||
|
||||
// N°6228 - Remove last Profil of a User / Exceed SaaS User quota without control
|
||||
// - Remove with_constraint
|
||||
$this->RemoveNodeFromXPath("/itop_design/classes//class/fields/field[@xsi:type='AttributeLinkedSet']/with_constraint");
|
||||
$this->RemoveNodeFromXPath("/itop_design/classes//class/fields/field[@xsi:type='AttributeLinkedSetIndirect']/with_constraint");
|
||||
|
||||
// N°2783 - Custom zlists
|
||||
$this->RemoveNodeFromXPath("/itop_design/classes//class/presentation/custom_presentations");
|
||||
$this->RemoveNodeFromXPath("/itop_design/meta/presentation/custom_presentations");
|
||||
|
||||
@@ -63,12 +63,16 @@
|
||||
</class>
|
||||
<class id="ClassWithAttributeLinkedSetWithConstraint">
|
||||
<fields>
|
||||
<field id="status" xsi:type="AttributeLinkedSet"/>
|
||||
<field id="status" xsi:type="AttributeLinkedSet">
|
||||
<with_php_constraint>true</with_php_constraint>
|
||||
</field>
|
||||
</fields>
|
||||
</class>
|
||||
<class id="ClassWithAttributeLinkedSetIndirectWithConstraint">
|
||||
<fields>
|
||||
<field id="status" xsi:type="AttributeLinkedSetIndirect"/>
|
||||
<field id="status" xsi:type="AttributeLinkedSetIndirect">
|
||||
<with_php_constraint>true</with_php_constraint>
|
||||
</field>
|
||||
</fields>
|
||||
</class>
|
||||
<class id="ClassWithAttributeEnumSorted">
|
||||
|
||||
Reference in New Issue
Block a user