From ce16fdaace858d9c597f5429598ecebd7cafd770 Mon Sep 17 00:00:00 2001 From: Coleman Watts Date: Thu, 25 Mar 2021 11:52:33 -0400 Subject: [PATCH] Schema - Add readonly to all fields in RelationshipCache entity This entire entity is readonly. Fields should never be presented to the user as editable. --- CRM/Contact/DAO/RelationshipCache.php | 12 +++++++++++- xml/schema/Contact/RelationshipCache.xml | 10 ++++++++++ 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/CRM/Contact/DAO/RelationshipCache.php b/CRM/Contact/DAO/RelationshipCache.php index cec6456292..230049e5e7 100644 --- a/CRM/Contact/DAO/RelationshipCache.php +++ b/CRM/Contact/DAO/RelationshipCache.php @@ -6,7 +6,7 @@ * * Generated from xml/schema/CRM/Contact/RelationshipCache.xml * DO NOT EDIT. Generated by CRM_Core_CodeGen - * (GenCodeChecksum:11ec799a538838c310dc75be4427c9f0) + * (GenCodeChecksum:6092bd6a166a4209f57a62d71076b0dc) */ /** @@ -190,6 +190,7 @@ class CRM_Contact_DAO_RelationshipCache extends CRM_Core_DAO { 'html' => [ 'label' => ts("Relationship"), ], + 'readonly' => TRUE, 'add' => '5.29', ], 'relationship_type_id' => [ @@ -207,6 +208,7 @@ class CRM_Contact_DAO_RelationshipCache extends CRM_Core_DAO { 'html' => [ 'label' => ts("Relationship Type"), ], + 'readonly' => TRUE, 'add' => '5.29', ], 'orientation' => [ @@ -225,6 +227,7 @@ class CRM_Contact_DAO_RelationshipCache extends CRM_Core_DAO { 'pseudoconstant' => [ 'callback' => 'CRM_Core_SelectValues::relationshipOrientation', ], + 'readonly' => TRUE, 'add' => '5.29', ], 'near_contact_id' => [ @@ -243,6 +246,7 @@ class CRM_Contact_DAO_RelationshipCache extends CRM_Core_DAO { 'type' => 'EntityRef', 'label' => ts("Contact (Near side)"), ], + 'readonly' => TRUE, 'add' => '5.29', ], 'near_relation' => [ @@ -263,6 +267,7 @@ class CRM_Contact_DAO_RelationshipCache extends CRM_Core_DAO { 'pseudoconstant' => [ 'callback' => 'CRM_Core_PseudoConstant::relationshipTypeOptions', ], + 'readonly' => TRUE, 'add' => '5.29', ], 'far_contact_id' => [ @@ -281,6 +286,7 @@ class CRM_Contact_DAO_RelationshipCache extends CRM_Core_DAO { 'type' => 'EntityRef', 'label' => ts("Contact (Far side)"), ], + 'readonly' => TRUE, 'add' => '5.29', ], 'far_relation' => [ @@ -301,6 +307,7 @@ class CRM_Contact_DAO_RelationshipCache extends CRM_Core_DAO { 'pseudoconstant' => [ 'callback' => 'CRM_Core_PseudoConstant::relationshipTypeOptions', ], + 'readonly' => TRUE, 'add' => '5.29', ], 'is_active' => [ @@ -317,6 +324,7 @@ class CRM_Contact_DAO_RelationshipCache extends CRM_Core_DAO { 'html' => [ 'type' => 'CheckBox', ], + 'readonly' => TRUE, 'add' => '5.29', ], 'relationship_start_date' => [ @@ -333,6 +341,7 @@ class CRM_Contact_DAO_RelationshipCache extends CRM_Core_DAO { 'type' => 'Select Date', 'formatType' => 'activityDate', ], + 'readonly' => TRUE, 'add' => '5.29', ], 'relationship_end_date' => [ @@ -349,6 +358,7 @@ class CRM_Contact_DAO_RelationshipCache extends CRM_Core_DAO { 'type' => 'Select Date', 'formatType' => 'activityDate', ], + 'readonly' => TRUE, 'add' => '5.29', ], ]; diff --git a/xml/schema/Contact/RelationshipCache.xml b/xml/schema/Contact/RelationshipCache.xml index 17d03c3670..e24998f55e 100644 --- a/xml/schema/Contact/RelationshipCache.xml +++ b/xml/schema/Contact/RelationshipCache.xml @@ -35,6 +35,7 @@ 5.29 + true relationship_id @@ -54,6 +55,7 @@ 5.29 + true relationship_type_id @@ -74,6 +76,7 @@ The cache record is a permutation of the original relationship record. The orientation indicates whether it is forward (a_b) or reverse (b_a) relationship. 5.29 + true @@ -87,6 +90,7 @@ EntityRef + true near_contact_id @@ -109,6 +113,7 @@ CRM_Core_PseudoConstant::relationshipTypeOptions + true @@ -122,6 +127,7 @@ EntityRef + true far_contact_id @@ -144,6 +150,7 @@ CRM_Core_PseudoConstant::relationshipTypeOptions + true @@ -186,6 +193,7 @@ CheckBox + true start_date @@ -198,6 +206,7 @@ Select Date activityDate + true end_date @@ -210,5 +219,6 @@ Select Date activityDate + true -- 2.25.1