Jump to content

Restrict Client Access


Recommended Posts

Hi,

For the life of me, I cannot figure out how to Restrict My Clients Access to certain functions in WHMCS.

ie: They currently have access to :

cPanel and can

change Nameservers,

Registrar Lock etc.

This is extremely worrying, especially the ability to change NS. They could obtain EPP key for DN and move their DN and Hosting without me knowing.

 

I don't want them to have this access from WHMCS  unless I have given them cPanel Login Access ( Separate from WHMCS ).

 

Is this possible?  Have I missed some check box that allows me to do this?

This is what WHMCS says is Available to Clients:

Clients

  • Clients also receive full access to the management tools from the client area.
  • Like you, they have access to view and change the current nameservers, change the lock status of their domain*, change the auto renewal setting, view or edit WHOIS information, manage the DNS records*, configure email forwarding*, register nameservers*, request the EPP code* and order a renewal for their domain (*if the registrar supports it).

I WANT TO LIMIT THIS, HOW DO I DO IT?

Kind Regards,

Wayne

Edited by Crashtest007
Added further explanation
Link to comment
Share on other sites

Hi Wayne,

1 minute ago, Crashtest007 said:

Is this possible?  Have I missed some check box that allows me to do this?

lots of these links will be added automatically by WHMCS, e.g cPanel login links in the sidebar etc - they can all be removed, but I don't think there's a quick fix method from settings to remove them all.

it might be worth going through the client area and working out what you want to remove - ultimately, anything in the sidebar/navbar can be removed with hooks and the cPanel template can be duplicated and modified to remove anything you don't want them to see.

Link to comment
Share on other sites

1 minute ago, Crashtest007 said:

How is the Template edited?

to edit a template, you will need to locate the correct .tpl template file - so for example, the cPanel template will likely be at /modules/servers/cpanel/templates/overview.tpl - but there's no long-term point in editing that as it will get overwritten during an update, so it would have to be duplicated and then the template modified.

https://docs.whmcs.com/Working_with_Module_Templates

they're all just Smarty templates, so if you're familiar with HTML, then it's just a minor step up from there - especially as you're just removing and not doing anything new.

depending on what you want to do, and the template theme you are using, you might get away with just using CSS to hide the elements, rather than remove them and avoid editing the templates or using hooks.

6 minutes ago, Crashtest007 said:

OR is there a pre configured Template I can install?

not really - unless someone else was in a similar position, using the same theme as you and is willing to share their tweaks.

Link to comment
Share on other sites

10 minutes ago, Crashtest007 said:

But using CSS intrigues me.  I know I can add CSS to wordpress as it has that in the Admin side.  But does WHMCS have this ability as well?

in the client area, yes - https://developers.whmcs.com/themes/css-styling/

I should warn you that the WHMCS templates are not well designed in terms of CSS and so it's not always accurate enough to be able to easily specify a specific element.

let's say you wanted to remove the cPanel login /webmail sidebar links - personally, I would use a hook and such hooks will have been posted here many times over the years...

HKMAgJR.png

<?php

use WHMCS\View\Menu\Item as MenuItem;

add_hook('ClientAreaPrimarySidebar', 1, function(MenuItem $primarySidebar) {

	if (!is_null($primarySidebar->getChild('Service Details Actions'))) {
		$primarySidebar->getChild('Service Details Actions')
			->removeChild('Login to cPanel')
			->removeChild('Login to Webmail');
	}
});

if you were using Six and wanted to hide those elements using CSS, then it's...

#Primary_Sidebar-Service_Details_Actions-Login_to_cPanel, #Primary_Sidebar-Service_Details_Actions-Login_to_Webmail {display:none;}

mYqWcUE.png

just bear in mind that whilst these elements have been visibly hidden using CSS, the links themselves will still exist in the source code available in the browser and a knowledgable user could still find them - with a hook, they will be removed entirely.

Link to comment
Share on other sites

Thank you Phil,

You have been very helpful !!!

Probably the ONLY thing I really dislike about WHMCS is it's ability to "Edit"  If it was as simple as wordpress it would be an excellent platform.

I am not a coder by any means, but as with most I struggle. It's a pitty the WHMCS Developers don't recognise the Need for WYSIWYG editor. Or a drag and Drop Plugin for us dummies.

You pay a lot for a Commercial platform, surely they can make it easier to edit files. Deciphering raw code can be daunting. They would definitely sell more of their product if they did.!!!

 

Kind Regards,

Wayne

 

Link to comment
Share on other sites

5 minutes ago, Crashtest007 said:

Thank you Phil,

i'll pass on the thanks to Phil. 😜

6 minutes ago, Crashtest007 said:

Probably the ONLY thing I really dislike about WHMCS is it's ability to "Edit"  If it was as simple as wordpress it would be an excellent platform.

I suspect it was far easier to edit years ago than it is today - not least because you wouldn't need to know PHP to edit a menu... if I was a WHMCS newbie today, i'm not sure I would bother to learn.

9 minutes ago, Crashtest007 said:

I am not a coder by any means, but as with most I struggle. It's a pitty the WHMCS Developers don't recognise the Need for WYSIWYG editor. Or a drag and Drop Plugin for us dummies.

I doubt that they could write such an interface - and if they tried, it would take them a year for them to write an incomplete solution.

6 minutes ago, Crashtest007 said:

Pardon my ignorance, but where do I put the Code for that Hook?

Do I create a file, name that file , then put it in a specific folder?

you create a .php file in /includes/hooks, give it a filename that must end in .php and not include spaces and then paste the hook code into it... save... refresh page, and those two links should be gone.

Link to comment
Share on other sites

2 hours ago, Crashtest007 said:

But I don't know how to write a Hooke to remove the Spanner from My Domains. See Attached.

what you can't see from your screenshot, is that there might be, under certain circumstances, another column to the right...

irhFjJN.png

what version of WHMCS are you using? your sidebars don't have any FA icons, so i'm wondering if this is a v6 install, or if you're just using a custom template ??

if it were a recent version, you could remove the circled dropdown with CSS - but it would be difficult to select it to only work on the domains page (it would be applied to all pages that uses that CSS - though that might be a good thing from your point of view.

if you had to remove that domains dropdown only, then I suspect you would need a hook that addS CSS to the header that only ran on the domains page.

Edited by brian!
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated