ref
This commit is contained in:
@@ -26,30 +26,40 @@
|
||||
* these Appropriate Legal Notices must retain the display of the "EspoCRM" word.
|
||||
************************************************************************/
|
||||
|
||||
define('views/preferences/fields/tab-list', 'views/settings/fields/tab-list', function (Dep) {
|
||||
define('views/preferences/fields/tab-list', ['views/settings/fields/tab-list'], function (Dep) {
|
||||
|
||||
return Dep.extend({
|
||||
|
||||
setup: function () {
|
||||
Dep.prototype.setup.call(this);
|
||||
|
||||
this.params.options = this.params.options.filter(function (scope) {
|
||||
if (scope === '_delimiter_' || scope === 'Home') return true;
|
||||
var defs = this.getMetadata().get(['scopes', scope]);
|
||||
if (!defs) return;
|
||||
this.params.options = this.params.options.filter(scope => {
|
||||
if (scope === '_delimiter_' || scope === 'Home') {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (defs.disabled) return;
|
||||
let defs = this.getMetadata().get(['scopes', scope]);
|
||||
|
||||
if (!defs) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (defs.disabled) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (defs.acl) {
|
||||
return this.getAcl().check(scope);
|
||||
}
|
||||
|
||||
if (defs.tabAclPermission) {
|
||||
var level = this.getAcl().get(defs.tabAclPermission);
|
||||
let level = this.getAcl().get(defs.tabAclPermission);
|
||||
|
||||
return level && level !== 'no';
|
||||
}
|
||||
return true;
|
||||
}, this);
|
||||
},
|
||||
|
||||
return true;
|
||||
});
|
||||
},
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user