benneth Posted February 21, 2020 Share Posted February 21, 2020 I'd like to disable any access to cpanel functions in the client portal. See screenshot. I don't want customers trying to create emails, view databases, see the file manager. I want all of these functions disabled/hidden. How do you do this? 0 Quote Link to comment Share on other sites More sharing options...
WHMCS Support Manager WHMCS John Posted February 21, 2020 WHMCS Support Manager Share Posted February 21, 2020 Hi @benneth, This can be customised via the /modules/servers/cpanel/templates/overview.tpl template file. 0 Quote Link to comment Share on other sites More sharing options...
benneth Posted February 22, 2020 Author Share Posted February 22, 2020 Thanks John. I presume this is where the front end customization happens (html, php hooks)? If I do remove these menu elements from the user portal, how can I be sure that users are unable to login to cpanel (and not just from the front-end)? 0 Quote Link to comment Share on other sites More sharing options...
DennisHermannsen Posted February 22, 2020 Share Posted February 22, 2020 7 hours ago, benneth said: how can I be sure that users are unable to login to cpanel (and not just from the front-end)? Never tell the user about the login. 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted February 22, 2020 Share Posted February 22, 2020 On 2/21/2020 at 10:38 AM, benneth said: I'd like to disable any access to cpanel functions in the client portal. I don't want customers trying to create emails, view databases, see the file manager. I want all of these functions disabled/hidden. How do you do this? just to expand on the previous advice given to edit the original overview.tpl file, there is no point in doing that as any changes you make to the template will be overwritten during a WHMCS update... you could duplicate the template in your template folder and edit the duplicate version and that should be safe from the updater. https://docs.whmcs.com/Working_with_Module_Templates Quote To create an override template, simply make a copy of the original template file within the following folder structure inside your custom template: /templates/yourtemplatename/modules/moduletype/modulename/. For example, in the case of the provisioning module "cpanel", /modules/servers/cpanel/overview.tpl could be customised by creating the following template file: /templates/yourtemplatename/modules/servers/cpanel/overview.tpl you would also have to hide the two cpanel links in the sidebar - ideally, that would require an action hook and i've previously posted examples of how to remove those links. possibly in your case, as you seem to be using Six, you could kill two birds with one stone and use custom CSS code (in /templates/(active theme)/css/custom.css) to hide the cPanel sidebar links and also the Quick Shortcuts table too. #cPanelQuickShortcutsPanel, #Primary_Sidebar-Service_Details_Actions-Login_to_cPanel, #Primary_Sidebar-Service_Details_Actions-Login_to_Webmail {display:none;} just remember to keep a copy of the custom.css file in case you haven't renamed the Six template and the WHMCS updater overwrites it. 🙂 0 Quote Link to comment Share on other sites More sharing options...
benneth Posted February 29, 2020 Author Share Posted February 29, 2020 Hey Brian, I've been messing with CSS. Some lines work, some don't. Any suggestions? Here's my custom.css /* Public View - Hide Elements */ body > div.home-shortcuts, #home-banner { display: none !important; } /* Client View - Hide Main Nav Elements */ #Primary_Navbar-Support-Network_Status, #Primary_Navbar-Support-Knowledgebase, #Primary_Navbar-Billing-Mass_Payment, #Primary_Navbar-Services-View_Available_Addons, #Secondary_Navbar-Account-Email_History { display: none !important; } /* Client View - Hide Sidebar Elements */ #main-body > div > div > div:nth-child(2) > div, #Secondary_Sidebar-My_Services_Actions-View_Available_Addons, #main-body > div > div > div:nth-child(2) > div, #main-body > div > div > div.col-md-3.pull-md-left.sidebar.sidebar-secondary > div:nth-child(1), #main-body > div > div > div:nth-child(2) > div, #Secondary_Sidebar-Billing-Mass_Payment, #Secondary_Sidebar-Support-Knowledgebase, #Secondary_Sidebar-Support-Network_Status, #Secondary_Sidebar-My_Services_Actions-View_Available_Addons, #Primary_Sidebar-Announcements_Months-RSS_Feed #btnShowSidebar, #Primary_Sidebar-My_Account-Email_History { display: none !important; } /* HEADER STYLING */ #nav { background: red !important; } 0 Quote Link to comment Share on other sites More sharing options...
benneth Posted February 29, 2020 Author Share Posted February 29, 2020 1 hour ago, benneth said: Hey Brian, I've been messing with CSS. Some lines work, some don't. Any suggestions? Here's my custom.css /* Public View - Hide Elements */ body > div.home-shortcuts, #home-banner { display: none !important; } /* Client View - Hide Main Nav Elements */ #Primary_Navbar-Support-Network_Status, #Primary_Navbar-Support-Knowledgebase, #Primary_Navbar-Billing-Mass_Payment, #Primary_Navbar-Services-View_Available_Addons, #Secondary_Navbar-Account-Email_History { display: none !important; } /* Client View - Hide Sidebar Elements */ #main-body > div > div > div:nth-child(2) > div, #Secondary_Sidebar-My_Services_Actions-View_Available_Addons, #main-body > div > div > div:nth-child(2) > div, #main-body > div > div > div.col-md-3.pull-md-left.sidebar.sidebar-secondary > div:nth-child(1), #main-body > div > div > div:nth-child(2) > div, #Secondary_Sidebar-Billing-Mass_Payment, #Secondary_Sidebar-Support-Knowledgebase, #Secondary_Sidebar-Support-Network_Status, #Secondary_Sidebar-My_Services_Actions-View_Available_Addons, #Primary_Sidebar-Announcements_Months-RSS_Feed #btnShowSidebar, #Primary_Sidebar-My_Account-Email_History { display: none !important; } /* HEADER STYLING */ #nav { background: red !important; } // EDIT // Yes, I have clicked "Empty Template Cache" after making the css updates. 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted February 29, 2020 Share Posted February 29, 2020 Hi @benneth 3 hours ago, benneth said: I've been messing with CSS. Some lines work, some don't. it might have been slightly helpful if you had mentioned which ones worked and which didn't! 🙄 from quick testing, I think they would all work apart from the nth child sidebars and the simplistic navbar colour change. if you intend to remove all sidebars from a particular page, then you're probably better off using a hook because simply hiding with css wouldn't allow the page width to adjust (unless you prefer it not to adjust). additionally, some of the sidebar children are conditional and therefore there would be no guarantee when removing them with nth child that you could specify them accurately with css. with regards to navbar colouring, then you will need to tweak the active/focus etc colours too... 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.