hide remove import menu option

Hi

How can I hide/remove or disable the import feature in code for all modules or certain modules.

1. for all modules

     ?

2. for accounts and opportunities only?

Thank you in advance

Peter

Parents
  • Hello,

    I could manage to achieve it in a more generic way, so you wouldn't need to do it for every module, since you asked to do it for all modules.

    - Create a custom/clients/base/views/module-menu/module-menu.js
    - Extend from original one

    extendsFrom: 'ModuleMenuView',

    - Extend filterByAccess with the following

    filterByAccess: function(meta) {
    		var self = this;
    		var temp0 = this._super('filterByAccess', [meta]);
    		var temp = [];
    		_.each(temp0, function(menuItem) {
                if (menuItem.acl_action != 'import') {
    				temp.push(menuItem);
                }
            });
    		return temp;
    },

    Juane

Reply
  • Hello,

    I could manage to achieve it in a more generic way, so you wouldn't need to do it for every module, since you asked to do it for all modules.

    - Create a custom/clients/base/views/module-menu/module-menu.js
    - Extend from original one

    extendsFrom: 'ModuleMenuView',

    - Extend filterByAccess with the following

    filterByAccess: function(meta) {
    		var self = this;
    		var temp0 = this._super('filterByAccess', [meta]);
    		var temp = [];
    		_.each(temp0, function(menuItem) {
                if (menuItem.acl_action != 'import') {
    				temp.push(menuItem);
                }
            });
    		return temp;
    },

    Juane

Children
No Data