<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://sugarclub.sugarai.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>Manipulate Modules from Sidebar Nav</title><link>https://sugarclub.sugarai.com/dev-club/w/dev-tutorials/745/manipulate-modules-from-sidebar-nav</link><description /><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>Manipulate Modules from Sidebar Nav</title><link>https://sugarclub.sugarai.com/dev-club/w/dev-tutorials/745/manipulate-modules-from-sidebar-nav</link><pubDate>Thu, 29 Sep 2022 18:44:31 GMT</pubDate><guid isPermaLink="false">5c521d64-519d-47a6-9065-134618b211bf:9ff771d2-ab4f-4d05-92e9-2f63642f9a3c</guid><dc:creator>Scott King</dc:creator><comments>https://sugarclub.sugarai.com/dev-club/w/dev-tutorials/745/manipulate-modules-from-sidebar-nav#comments</comments><description>Current Revision posted to Dev Tutorials by Scott King on 9/29/2022 6:44:31 PM&lt;br /&gt;
&lt;p&gt;A common use case for creating a custom &lt;code&gt;module-list&lt;/code&gt; layout is to alter the list of modules that appear across the top Mega Menu and More Modules layouts. This can still be accomplished with the &lt;code&gt;sidebar-nav&lt;/code&gt; layout, but as you may have guessed, your customization will need to be moved to a different layout. By default, the list of modules in sidebar is built in&amp;nbsp;the &lt;code&gt;sidebar-nav-item-group-modules&lt;/code&gt; layout.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Example: Hide Contacts Module for Non-Admin Users&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;If you had a previous custom layout to hide the Contacts module for non-admin users, it may have been similar to this:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;./custom/clients/base/layouts/module-list/module-list.js&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="javascript"&gt;({
    extendsFrom: &amp;#39;ModuleListLayout&amp;#39;,
    
    initialize: function(options) {
        this._super(&amp;#39;initialize&amp;#39;, [options])
    },

    _addDefaultMenus: function() {
        var moduleList = app.metadata.getModuleNames({filter: &amp;#39;display_tab&amp;#39;, access: &amp;#39;read&amp;#39;});
        
        if (app.user.get(&amp;#39;type&amp;#39;) !== &amp;#39;admin&amp;#39;){
            moduleList = _.filter(moduleList, m =&amp;gt; { if(m !== &amp;#39;Contacts&amp;#39;) return m });
        }

        _.each(moduleList, function(module) {
            this._addMenu(module, true);
        }, this);
    },
})&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;As mentioned, these changes are now home in a new layout: &lt;code&gt;./clients/base/layouts/sidebar-nav-item-group-modules&lt;/code&gt;. Using a similar pattern as above, we can hide this module in the &lt;code&gt;sidebar-nav&lt;/code&gt; layout.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="javascript"&gt;({
    extendsFrom: &amp;#39;SidebarNavItemGroupModulesLayout&amp;#39;,

    initialize: function(options) {
        this._super(&amp;#39;initialize&amp;#39;, [options])
    },

    _getDefaultModuleList: function() {
        let moduleList = app.metadata.getModuleNames({filter: &amp;#39;display_tab&amp;#39;, access: &amp;#39;read&amp;#39;});

        if (app.user.get(&amp;#39;type&amp;#39;) === &amp;#39;admin&amp;#39;){
            moduleList = _.filter(moduleList, m =&amp;gt; { if(m !== &amp;#39;Contacts&amp;#39;) return m });
        }

        return _.without(moduleList, &amp;#39;Home&amp;#39;);
    },
})&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Once these changes are added, you can&amp;nbsp;run a Quick Repair and Rebuild and the list of modules will be updated.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt;&lt;span&gt;&amp;nbsp;You may need to refresh the page to see the profile menu items removed.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;
</description></item><item><title>Manipulate Modules from Sidebar Nav</title><link>https://sugarclub.sugarai.com/dev-club/w/dev-tutorials/745/manipulate-modules-from-sidebar-nav/revision/8</link><pubDate>Tue, 27 Sep 2022 18:49:07 GMT</pubDate><guid isPermaLink="false">5c521d64-519d-47a6-9065-134618b211bf:9ff771d2-ab4f-4d05-92e9-2f63642f9a3c</guid><dc:creator>Scott King</dc:creator><comments>https://sugarclub.sugarai.com/dev-club/w/dev-tutorials/745/manipulate-modules-from-sidebar-nav#comments</comments><description>Revision 8 posted to Dev Tutorials by Scott King on 9/27/2022 6:49:07 PM&lt;br /&gt;
&lt;p&gt;A common use case for creating a custom &lt;code&gt;module-list&lt;/code&gt; layout is to alter the list of modules that appear across the top Mega Menu and More Modules layouts. This can still be accomplished with the &lt;code&gt;sidebar-nav&lt;/code&gt; layout, but as you may have guessed, your customization will need to be moved to a different layout. By default, the list of modules in sidebar is built in&amp;nbsp;the &lt;code&gt;sidebar-nav-item-group-modules&lt;/code&gt; layout.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Example: Hide Contact Module for Non-Admin Users&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;If you had a previous custom layout to hide the Contacts module for non-admin users, it may have been similar to this:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;./custom/clients/base/layouts/module-list/module-list.js&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="javascript"&gt;({
    extendsFrom: &amp;#39;ModuleListLayout&amp;#39;,
    
    initialize: function(options) {
        this._super(&amp;#39;initialize&amp;#39;, [options])
    },

    _addDefaultMenus: function() {
        var moduleList = app.metadata.getModuleNames({filter: &amp;#39;display_tab&amp;#39;, access: &amp;#39;read&amp;#39;});
        
        if (app.user.get(&amp;#39;type&amp;#39;) !== &amp;#39;admin&amp;#39;){
            moduleList = _.filter(moduleList, m =&amp;gt; { if(m !== &amp;#39;Contacts&amp;#39;) return m });
        }

        _.each(moduleList, function(module) {
            this._addMenu(module, true);
        }, this);
    },
})&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;As mentioned, these changes are now home in a new layout: &lt;code&gt;./clients/base/layouts/sidebar-nav-item-group-modules&lt;/code&gt;. Using a similar pattern as above, we can hide this module in the &lt;code&gt;sidebar-nav&lt;/code&gt; layout.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="javascript"&gt;({
    extendsFrom: &amp;#39;SidebarNavItemGroupModulesLayout&amp;#39;,

    initialize: function(options) {
        this._super(&amp;#39;initialize&amp;#39;, [options])
    },

    _getDefaultModuleList: function() {
        let moduleList = app.metadata.getModuleNames({filter: &amp;#39;display_tab&amp;#39;, access: &amp;#39;read&amp;#39;});

        if (app.user.get(&amp;#39;type&amp;#39;) === &amp;#39;admin&amp;#39;){
            moduleList = _.filter(moduleList, m =&amp;gt; { if(m !== &amp;#39;Contacts&amp;#39;) return m });
        }

        return _.without(moduleList, &amp;#39;Home&amp;#39;);
    },
})&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Once these changes are added, you can&amp;nbsp;run a Quick Repair and Rebuild and the list of modules will be updated.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt;&lt;span&gt;&amp;nbsp;You may need to refresh the page to see the profile menu items removed.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;
</description></item><item><title>Manipulate Modules from Sidebar Nav</title><link>https://sugarclub.sugarai.com/dev-club/w/dev-tutorials/745/manipulate-modules-from-sidebar-nav/revision/7</link><pubDate>Tue, 27 Sep 2022 18:48:07 GMT</pubDate><guid isPermaLink="false">5c521d64-519d-47a6-9065-134618b211bf:9ff771d2-ab4f-4d05-92e9-2f63642f9a3c</guid><dc:creator>Scott King</dc:creator><comments>https://sugarclub.sugarai.com/dev-club/w/dev-tutorials/745/manipulate-modules-from-sidebar-nav#comments</comments><description>Revision 7 posted to Dev Tutorials by Scott King on 9/27/2022 6:48:07 PM&lt;br /&gt;
&lt;p&gt;A common use case for creating a custom &lt;code&gt;module-list&lt;/code&gt; layout is to alter the list of modules that appear across the top Mega Menu and More Modules layouts. This can still be accomplished with the &lt;code&gt;sidebar-nav&lt;/code&gt; layout, but as you may have guessed, your customization will need to be moved to a different layout. By default, the list of Modules in sidebar is built in&amp;nbsp;the &lt;code&gt;sidebar-nav-item-group-modules&lt;/code&gt; layout.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Example: Hide Contact Module for Non-Admin Users&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;If you had a previous custom layout to hide the Contacts module for non-admin users, it may have been similar to this:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;./custom/clients/base/layouts/module-list/module-list.js&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="javascript"&gt;({
    extendsFrom: &amp;#39;ModuleListLayout&amp;#39;,
    
    initialize: function(options) {
        this._super(&amp;#39;initialize&amp;#39;, [options])
    },

    _addDefaultMenus: function() {
        var moduleList = app.metadata.getModuleNames({filter: &amp;#39;display_tab&amp;#39;, access: &amp;#39;read&amp;#39;});
        
        if (app.user.get(&amp;#39;type&amp;#39;) !== &amp;#39;admin&amp;#39;){
            moduleList = _.filter(moduleList, m =&amp;gt; { if(m !== &amp;#39;Contacts&amp;#39;) return m });
        }

        _.each(moduleList, function(module) {
            this._addMenu(module, true);
        }, this);
    },
})&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;As mentioned, these changes are now home in a new layout: &lt;code&gt;./clients/base/layouts/sidebar-nav-item-group-modules&lt;/code&gt;. Using a similar pattern as above, we can hide this module in the &lt;code&gt;sidebar-nav&lt;/code&gt; layout.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="javascript"&gt;({
    extendsFrom: &amp;#39;SidebarNavItemGroupModulesLayout&amp;#39;,

    initialize: function(options) {
        this._super(&amp;#39;initialize&amp;#39;, [options])
    },

    _getDefaultModuleList: function() {
        let moduleList = app.metadata.getModuleNames({filter: &amp;#39;display_tab&amp;#39;, access: &amp;#39;read&amp;#39;});

        if (app.user.get(&amp;#39;type&amp;#39;) === &amp;#39;admin&amp;#39;){
            moduleList = _.filter(moduleList, m =&amp;gt; { if(m !== &amp;#39;Contacts&amp;#39;) return m });
        }

        return _.without(moduleList, &amp;#39;Home&amp;#39;);
    },
})&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Run a Quick Repair and Rebuild to see these new changes.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Note:&amp;nbsp;&lt;/strong&gt;A refresh may be required.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;
</description></item><item><title>Manipulate Modules from Sidebar Nav</title><link>https://sugarclub.sugarai.com/dev-club/w/dev-tutorials/745/manipulate-modules-from-sidebar-nav/revision/6</link><pubDate>Tue, 27 Sep 2022 13:58:06 GMT</pubDate><guid isPermaLink="false">5c521d64-519d-47a6-9065-134618b211bf:9ff771d2-ab4f-4d05-92e9-2f63642f9a3c</guid><dc:creator>Rafael Fernandes</dc:creator><comments>https://sugarclub.sugarai.com/dev-club/w/dev-tutorials/745/manipulate-modules-from-sidebar-nav#comments</comments><description>Revision 6 posted to Dev Tutorials by Rafael Fernandes on 9/27/2022 1:58:06 PM&lt;br /&gt;
&lt;p&gt;Hide Modules from the Module List&lt;/p&gt;
&lt;p&gt;scott to work on an example.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="javascript"&gt;({
    extendsFrom: &amp;#39;ModuleListLayout&amp;#39;,
    
    initialize: function(options) {
        this._super(&amp;#39;initialize&amp;#39;, [options])
    },

    /**
     * Adds all default menu views as components in both full and short
     * version.
     *
     * This will set the menu as sticky to differentiate from the others that
     * are added based on navigation/reference only.
     *
     * @private
     */
    _addDefaultMenus: function() {

        var moduleList = app.metadata.getModuleNames({filter: &amp;#39;display_tab&amp;#39;, access: &amp;#39;read&amp;#39;})
        
        if (app.user.get(&amp;#39;type&amp;#39;) !== &amp;#39;admin&amp;#39;){
            moduleList = _.filter(moduleList, m =&amp;gt; { if(m!==&amp;#39;ADR_Administrador&amp;#39; &amp;amp;&amp;amp; m!==&amp;#39;ACC_Accesos&amp;#39; &amp;amp;&amp;amp; m!==&amp;#39;POL_Policies&amp;#39;) return m })
        }

        _.each(moduleList, function(module) {
            this._addMenu(module, true)
        }, this)
    },
})
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="javascript"&gt;({
    /**
     * @copyright: redk - Get further, together
     * @author: Maria Samuels maria.samuels@redk.net
     * @jira: FIDSUPP-118
     */
    extendsFrom: &amp;#39;ModuleMenuView&amp;#39;,

    /**
     * Filters menu actions by ACLs for the current user.
     *
     * @param {Array} meta The menu metadata to check access.
     * @return {Array} Returns only the list of actions the user has access.
     */
    filterByAccess: function (meta) {

        var result = this._super(&amp;#39;filterByAccess&amp;#39;, [meta]);
        var spliceIdx = null;
        _.each(result, function (menuItem, idx) {
            if (menuItem.acl_action === &amp;#39;product-massupdate&amp;#39;
                &amp;amp;&amp;amp; app.user.get(&amp;#39;type&amp;#39;) !== &amp;#39;admin&amp;#39;
                &amp;amp;&amp;amp; !_.contains(app.user.get(&amp;#39;roles&amp;#39;) , &amp;#39;Mass Update Products on RLIs&amp;#39;)
            ) {
                spliceIdx = idx;
            }
        });
        if (!_.isNull(spliceIdx)) {
            result.splice(spliceIdx, 1);
        }

        return result;
    },
})
&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;
</description></item><item><title>Manipulate Modules from Sidebar</title><link>https://sugarclub.sugarai.com/dev-club/w/dev-tutorials/745/manipulate-modules-from-sidebar-nav/revision/5</link><pubDate>Tue, 27 Sep 2022 13:56:16 GMT</pubDate><guid isPermaLink="false">5c521d64-519d-47a6-9065-134618b211bf:9ff771d2-ab4f-4d05-92e9-2f63642f9a3c</guid><dc:creator>Rafael Fernandes</dc:creator><comments>https://sugarclub.sugarai.com/dev-club/w/dev-tutorials/745/manipulate-modules-from-sidebar-nav#comments</comments><description>Revision 5 posted to Dev Tutorials by Rafael Fernandes on 9/27/2022 1:56:16 PM&lt;br /&gt;
&lt;p&gt;Hide Modules from the Module List&lt;/p&gt;
&lt;p&gt;scott to work on an example.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="javascript"&gt;({
    extendsFrom: &amp;#39;ModuleListLayout&amp;#39;,
    
    initialize: function(options) {
        this._super(&amp;#39;initialize&amp;#39;, [options])
    },

    /**
     * Adds all default menu views as components in both full and short
     * version.
     *
     * This will set the menu as sticky to differentiate from the others that
     * are added based on navigation/reference only.
     *
     * @private
     */
    _addDefaultMenus: function() {

        var moduleList = app.metadata.getModuleNames({filter: &amp;#39;display_tab&amp;#39;, access: &amp;#39;read&amp;#39;})
        
        if (app.user.get(&amp;#39;type&amp;#39;) !== &amp;#39;admin&amp;#39;){
            moduleList = _.filter(moduleList, m =&amp;gt; { if(m!==&amp;#39;ADR_Administrador&amp;#39; &amp;amp;&amp;amp; m!==&amp;#39;ACC_Accesos&amp;#39; &amp;amp;&amp;amp; m!==&amp;#39;POL_Policies&amp;#39;) return m })
        }

        _.each(moduleList, function(module) {
            this._addMenu(module, true)
        }, this)
    },
})
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="javascript"&gt;({
    /**
     * @copyright: redk - Get further, together
     * @author: Maria Samuels maria.samuels@redk.net
     * @jira: FIDSUPP-118
     */
    extendsFrom: &amp;#39;ModuleMenuView&amp;#39;,

    /**
     * Filters menu actions by ACLs for the current user.
     *
     * @param {Array} meta The menu metadata to check access.
     * @return {Array} Returns only the list of actions the user has access.
     */
    filterByAccess: function (meta) {

        var result = this._super(&amp;#39;filterByAccess&amp;#39;, [meta]);
        var spliceIdx = null;
        _.each(result, function (menuItem, idx) {
            if (menuItem.acl_action === &amp;#39;product-massupdate&amp;#39;
                &amp;amp;&amp;amp; app.user.get(&amp;#39;type&amp;#39;) !== &amp;#39;admin&amp;#39;
                &amp;amp;&amp;amp; !_.contains(app.user.get(&amp;#39;roles&amp;#39;) , &amp;#39;Mass Update Products on RLIs&amp;#39;)
            ) {
                spliceIdx = idx;
            }
        });
        if (!_.isNull(spliceIdx)) {
            result.splice(spliceIdx, 1);
        }

        return result;
    },
})
&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;
</description></item><item><title>Manipulate Modules from the Module List</title><link>https://sugarclub.sugarai.com/dev-club/w/dev-tutorials/745/manipulate-modules-from-sidebar-nav/revision/4</link><pubDate>Tue, 27 Sep 2022 13:55:58 GMT</pubDate><guid isPermaLink="false">5c521d64-519d-47a6-9065-134618b211bf:9ff771d2-ab4f-4d05-92e9-2f63642f9a3c</guid><dc:creator>Rafael Fernandes</dc:creator><comments>https://sugarclub.sugarai.com/dev-club/w/dev-tutorials/745/manipulate-modules-from-sidebar-nav#comments</comments><description>Revision 4 posted to Dev Tutorials by Rafael Fernandes on 9/27/2022 1:55:58 PM&lt;br /&gt;
&lt;p&gt;Hide Modules from the Module List&lt;/p&gt;
&lt;p&gt;scott to work on an example.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="javascript"&gt;({
    extendsFrom: &amp;#39;ModuleListLayout&amp;#39;,
    
    initialize: function(options) {
        this._super(&amp;#39;initialize&amp;#39;, [options])
    },

    /**
     * Adds all default menu views as components in both full and short
     * version.
     *
     * This will set the menu as sticky to differentiate from the others that
     * are added based on navigation/reference only.
     *
     * @private
     */
    _addDefaultMenus: function() {

        var moduleList = app.metadata.getModuleNames({filter: &amp;#39;display_tab&amp;#39;, access: &amp;#39;read&amp;#39;})
        
        if (app.user.get(&amp;#39;type&amp;#39;) !== &amp;#39;admin&amp;#39;){
            moduleList = _.filter(moduleList, m =&amp;gt; { if(m!==&amp;#39;ADR_Administrador&amp;#39; &amp;amp;&amp;amp; m!==&amp;#39;ACC_Accesos&amp;#39; &amp;amp;&amp;amp; m!==&amp;#39;POL_Policies&amp;#39;) return m })
        }

        _.each(moduleList, function(module) {
            this._addMenu(module, true)
        }, this)
    },
})
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="javascript"&gt;({
    /**
     * @copyright: redk - Get further, together
     * @author: Maria Samuels maria.samuels@redk.net
     * @jira: FIDSUPP-118
     */
    extendsFrom: &amp;#39;ModuleMenuView&amp;#39;,

    /**
     * Filters menu actions by ACLs for the current user.
     *
     * @param {Array} meta The menu metadata to check access.
     * @return {Array} Returns only the list of actions the user has access.
     */
    filterByAccess: function (meta) {

        var result = this._super(&amp;#39;filterByAccess&amp;#39;, [meta]);
        var spliceIdx = null;
        _.each(result, function (menuItem, idx) {
            if (menuItem.acl_action === &amp;#39;product-massupdate&amp;#39;
                &amp;amp;&amp;amp; app.user.get(&amp;#39;type&amp;#39;) !== &amp;#39;admin&amp;#39;
                &amp;amp;&amp;amp; !_.contains(app.user.get(&amp;#39;roles&amp;#39;) , &amp;#39;Mass Update Products on RLIs&amp;#39;)
            ) {
                spliceIdx = idx;
            }
        });
        if (!_.isNull(spliceIdx)) {
            result.splice(spliceIdx, 1);
        }

        return result;
    },
})
&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;
</description></item><item><title>Hide Modules from the Module List</title><link>https://sugarclub.sugarai.com/dev-club/w/dev-tutorials/745/manipulate-modules-from-sidebar-nav/revision/3</link><pubDate>Tue, 27 Sep 2022 13:42:16 GMT</pubDate><guid isPermaLink="false">5c521d64-519d-47a6-9065-134618b211bf:9ff771d2-ab4f-4d05-92e9-2f63642f9a3c</guid><dc:creator>Rafael Fernandes</dc:creator><comments>https://sugarclub.sugarai.com/dev-club/w/dev-tutorials/745/manipulate-modules-from-sidebar-nav#comments</comments><description>Revision 3 posted to Dev Tutorials by Rafael Fernandes on 9/27/2022 1:42:16 PM&lt;br /&gt;
&lt;p&gt;Hide Modules from the Module List&lt;/p&gt;
&lt;p&gt;scott to work on an example.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="javascript"&gt;({
    extendsFrom: &amp;#39;ModuleListLayout&amp;#39;,
    
    initialize: function(options) {
        this._super(&amp;#39;initialize&amp;#39;, [options])
    },

    /**
     * Adds all default menu views as components in both full and short
     * version.
     *
     * This will set the menu as sticky to differentiate from the others that
     * are added based on navigation/reference only.
     *
     * @private
     */
    _addDefaultMenus: function() {

        var moduleList = app.metadata.getModuleNames({filter: &amp;#39;display_tab&amp;#39;, access: &amp;#39;read&amp;#39;})
        
        if (app.user.get(&amp;#39;type&amp;#39;) !== &amp;#39;admin&amp;#39;){
            moduleList = _.filter(moduleList, m =&amp;gt; { if(m!==&amp;#39;ADR_Administrador&amp;#39; &amp;amp;&amp;amp; m!==&amp;#39;ACC_Accesos&amp;#39; &amp;amp;&amp;amp; m!==&amp;#39;POL_Policies&amp;#39;) return m })
        }

        _.each(moduleList, function(module) {
            this._addMenu(module, true)
        }, this)
    },
})
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="javascript"&gt;({
    /**
     * @copyright: redk - Get further, together
     * @author: Maria Samuels maria.samuels@redk.net
     * @jira: FIDSUPP-118
     */
    extendsFrom: &amp;#39;ModuleMenuView&amp;#39;,

    /**
     * Filters menu actions by ACLs for the current user.
     *
     * @param {Array} meta The menu metadata to check access.
     * @return {Array} Returns only the list of actions the user has access.
     */
    filterByAccess: function (meta) {

        var result = this._super(&amp;#39;filterByAccess&amp;#39;, [meta]);
        var spliceIdx = null;
        _.each(result, function (menuItem, idx) {
            if (menuItem.acl_action === &amp;#39;product-massupdate&amp;#39;
                &amp;amp;&amp;amp; app.user.get(&amp;#39;type&amp;#39;) !== &amp;#39;admin&amp;#39;
                &amp;amp;&amp;amp; !_.contains(app.user.get(&amp;#39;roles&amp;#39;) , &amp;#39;Mass Update Products on RLIs&amp;#39;)
            ) {
                spliceIdx = idx;
            }
        });
        if (!_.isNull(spliceIdx)) {
            result.splice(spliceIdx, 1);
        }

        return result;
    },
})
&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;
</description></item><item><title>Hide Modules from the Module List</title><link>https://sugarclub.sugarai.com/dev-club/w/dev-tutorials/745/manipulate-modules-from-sidebar-nav/revision/2</link><pubDate>Fri, 23 Sep 2022 18:58:06 GMT</pubDate><guid isPermaLink="false">5c521d64-519d-47a6-9065-134618b211bf:9ff771d2-ab4f-4d05-92e9-2f63642f9a3c</guid><dc:creator>Rafael Fernandes</dc:creator><comments>https://sugarclub.sugarai.com/dev-club/w/dev-tutorials/745/manipulate-modules-from-sidebar-nav#comments</comments><description>Revision 2 posted to Dev Tutorials by Rafael Fernandes on 9/23/2022 6:58:06 PM&lt;br /&gt;
&lt;p&gt;Hide Modules from the Module List&lt;/p&gt;
&lt;p&gt;scott to work on an example.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;
</description></item><item><title>Hide Modules from the Module List</title><link>https://sugarclub.sugarai.com/dev-club/w/dev-tutorials/745/manipulate-modules-from-sidebar-nav/revision/1</link><pubDate>Tue, 20 Sep 2022 19:08:47 GMT</pubDate><guid isPermaLink="false">5c521d64-519d-47a6-9065-134618b211bf:9ff771d2-ab4f-4d05-92e9-2f63642f9a3c</guid><dc:creator>Rafael Fernandes</dc:creator><comments>https://sugarclub.sugarai.com/dev-club/w/dev-tutorials/745/manipulate-modules-from-sidebar-nav#comments</comments><description>Revision 1 posted to Dev Tutorials by Rafael Fernandes on 9/20/2022 7:08:47 PM&lt;br /&gt;
&lt;p&gt;Hide Modules from the Module List&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;
</description></item></channel></rss>