diff --git a/application/Espo/Controllers/Preferences.php b/application/Espo/Controllers/Preferences.php index 6cbe3b2930..e2df7a1e14 100644 --- a/application/Espo/Controllers/Preferences.php +++ b/application/Espo/Controllers/Preferences.php @@ -132,6 +132,7 @@ class Preferences extends \Espo\Core\Controllers\Base $entity->set('smtpEmailAddress', $user->get('emailAddress')); $entity->set('name', $user->get('name')); + $entity->set('isPortalUser', $user->get('isPortalUser')); $entity->clear('smtpPassword'); diff --git a/application/Espo/Resources/metadata/entityDefs/Preferences.json b/application/Espo/Resources/metadata/entityDefs/Preferences.json index b073c22ef2..5cafec1cc2 100644 --- a/application/Espo/Resources/metadata/entityDefs/Preferences.json +++ b/application/Espo/Resources/metadata/entityDefs/Preferences.json @@ -130,6 +130,10 @@ "emailReplyToAllByDefault": { "type": "bool", "default": true + }, + "isPortalUser": { + "type": "bool", + "notStorable": true } } } diff --git a/client/src/views/preferences/record/edit.js b/client/src/views/preferences/record/edit.js index aa089db970..22a2cec9fb 100644 --- a/client/src/views/preferences/record/edit.js +++ b/client/src/views/preferences/record/edit.js @@ -96,7 +96,7 @@ Espo.define('views/preferences/record/edit', 'views/record/edit', function (Dep) }, this); } - if (!this.getUser().isAdmin()) { + if (!this.getUser().isAdmin() || this.model.get('isPortalUser')) { this.hideField('dashboardLayout'); } },