EspoCRM – Open Source CRM Application
PHP calendarcontactscrmcrm-platformcrm-systemcustomer-portalcustomer-supportcustomizabledocumentsemail-marketingkanbanleadsopen-sourcephpplatformsales-automationsingle-page-applicationsupport
Ref
Yurii18dee9eed845
diff --git a/application/Espo/Classes/RecordHooks/User/BeforeCreate.php b/application/Espo/Classes/RecordHooks/User/BeforeCreate.phpindex 95327077d2..25d8cbe2de 100644--- a/application/Espo/Classes/RecordHooks/User/BeforeCreate.php+++ b/application/Espo/Classes/RecordHooks/User/BeforeCreate.php@@ -123,8 +123,7 @@ class BeforeCreate implements SaveHookprivate function processTypeChecking(User $entity): void{if (- $entity->isSuperAdmin() ||- !$entity->getType() ||+ !$entity->isAttributeChanged(User::ATTR_TYPE) ||in_array($entity->getType(), $this->util->getAllowedUserTypeList())) {return;diff --git a/application/Espo/Classes/RecordHooks/User/BeforeUpdate.php b/application/Espo/Classes/RecordHooks/User/BeforeUpdate.phpindex 2c45a126a9..a0b1ee18cc 100644--- a/application/Espo/Classes/RecordHooks/User/BeforeUpdate.php+++ b/application/Espo/Classes/RecordHooks/User/BeforeUpdate.php@@ -158,9 +158,7 @@ class BeforeUpdate implements SaveHookprivate function processTypeChecking(User $entity): void{if (- $entity->isSuperAdmin() ||- !$entity->isAttributeChanged('type') ||- !$entity->getType() ||+ !$entity->isAttributeChanged(User::ATTR_TYPE) ||in_array($entity->getType(), $this->util->getAllowedUserTypeList())) {return;diff --git a/application/Espo/Resources/metadata/entityDefs/User.json b/application/Espo/Resources/metadata/entityDefs/User.jsonindex 4bf8360b3d..2032172756 100644--- a/application/Espo/Resources/metadata/entityDefs/User.json+++ b/application/Espo/Resources/metadata/entityDefs/User.json@@ -39,7 +39,7 @@"index": true,"inlineEditDisabled": true,"layoutDetailDisabled": true,- "layoutMassUpdateDisabled": true,+ "massUpdateDisabled": true,"fieldManagerParamList": ["tooltipText"]@@ -49,6 +49,7 @@"maxLength": 150,"internal": true,"utility": true,+ "massUpdateDisabled": true,"directAccessDisabled": true,"fieldManagerParamList": ["tooltipText"