From 5b8ccb4513a9ff3cb3fd00e4228b6eef076d51d2 Mon Sep 17 00:00:00 2001 From: Yuri Kuznetsov Date: Mon, 6 Feb 2023 17:10:41 +0200 Subject: [PATCH] fisable group tabs for portal --- client/src/views/portal/fields/tab-list.js | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/client/src/views/portal/fields/tab-list.js b/client/src/views/portal/fields/tab-list.js index 9bae6e163f..9f90fb9907 100644 --- a/client/src/views/portal/fields/tab-list.js +++ b/client/src/views/portal/fields/tab-list.js @@ -26,21 +26,24 @@ * these Appropriate Legal Notices must retain the display of the "EspoCRM" word. ************************************************************************/ -Espo.define('views/portal/fields/tab-list', 'views/settings/fields/tab-list', function (Dep) { +define('views/portal/fields/tab-list', ['views/settings/fields/tab-list'], function (Dep) { return Dep.extend({ + noGroups: true, + setupOptions: function () { Dep.prototype.setupOptions.call(this); - this.params.options = this.params.options.filter(function (tab) { - if (tab === '_delimiter_') return true; + this.params.options = this.params.options.filter(tab => { + if (tab === '_delimiter_') { + return true; + } + if (!!this.getMetadata().get('scopes.' + tab + '.aclPortal')) { return true; } - }, this); - } - + }); + }, }); - });