EspoCRM – Open Source CRM Application
PHP calendarcontactscrmcrm-platformcrm-systemcustomer-portalcustomer-supportcustomizabledocumentsemail-marketingkanbanleadsopen-sourcephpplatformsales-automationsingle-page-applicationsupport
disable order
Yuri Kuznetsovbd900d0b48fe
diff --git a/application/Espo/Core/ORM/Type/FieldType.php b/application/Espo/Core/ORM/Type/FieldType.phpindex 1e28e439a8..01d5216022 100644--- a/application/Espo/Core/ORM/Type/FieldType.php+++ b/application/Espo/Core/ORM/Type/FieldType.php@@ -63,4 +63,5 @@ class FieldTypepublic const WYSIWYG = 'wysiwyg';public const JSON_ARRAY = 'jsonArray';public const JSON_OBJECT = 'jsonObject';+ public const PASSWORD = 'password';}diff --git a/application/Espo/Core/Select/Order/Applier.php b/application/Espo/Core/Select/Order/Applier.phpindex da93aa0b19..70d258fc82 100644--- a/application/Espo/Core/Select/Order/Applier.php+++ b/application/Espo/Core/Select/Order/Applier.php@@ -76,6 +76,10 @@ class Applierif ($this->metadataProvider->isFieldOrderDisabled($this->entityType, $orderBy)) {throw new Forbidden("Order by the field '$orderBy' is disabled.");}++ if ($this->metadataProvider->getFieldType($this->entityType, $orderBy) === FieldType::PASSWORD) {+ throw new Forbidden("Order by field '$orderBy' is not allowed.");+ }}if ($orderBy === null) {diff --git a/application/Espo/Resources/metadata/entityDefs/User.json b/application/Espo/Resources/metadata/entityDefs/User.jsonindex 101b6f0a9e..4d28de81ad 100644--- a/application/Espo/Resources/metadata/entityDefs/User.json+++ b/application/Espo/Resources/metadata/entityDefs/User.json@@ -45,7 +45,8 @@"directAccessDisabled": true,"fieldManagerParamList": ["tooltipText"- ]+ ],+ "orderDisabled": true},"passwordConfirm": {"type": "password",