In Alfresco Share, the title component consist a "Customize Dashboard" button which shows on UI. I would like to ask Can I disable or delete this button which the role is NOT Admin(Manager) ?
That mean the user cannot modify the layout of the Alfresco Share. What files are need to change?
Hi, the customize dashboard button is generated in site-webscripts/org/alfresco/components/title/user-dashboard-title.get.html.ftl To hide the button, you should add an extension module that customizes the markup "html".
But, you should know, that customize-user-dashboard page will still be available if someone knows enters the URL directly. So, to be save you should also change the customize-dashboard page.
Go to this location alfresco\tomcat\webapps\share\WEB-INF\classes\alfresco\site-webscripts\org\alfresco\share\imports\share-header.lib.js
and add the "if" condition like this
if(user.isAdmin){ if (page.titleId == "page.userDashboard.title") { // If the page is a user dashboard then make the customize dashboard item an // option… // NOTE: At the moment this is just a single menu item and not the child of a popup? // NOTE: Should this still be shown if the user is not the dashboard owner? var userDashboardConfiguration = { id: "HEADER_CUSTOMIZE_USER_DASHBOARD", name: "alfresco/menus/AlfMenuBarItem", config: { id: "HEADER_CUSTOMIZE_USER_DASHBOARD", label: "", title: msg.get("customize_dashboard.label"), iconAltText: msg.get("customize_dashboard.label"), iconClass: "alf-configure-icon", targetUrl: "customise-user-dashboard" } }; titleConfig.push(userDashboardConfiguration); } }
Restart the alfresco server. it will disable the customise dashboard to the users except admin