Hide employee information for non-admins


We want to hide employee information for non-admins

  1. Hide Employees tab for non-admins
  2. Hide “Assigned to” box in Advanced Search for Leads, Contact , etc from non-admins (Is it possible in Roles to prevent non-admins from viewing?)
  3. Hide “Assigned to” box in Leads, Contact , etc page from non-admins (Is it possible in Roles to prevent non-admins from viewing?)

Thank you in advance for feedback.

Jack Powers

[size=4][b]Update; Hide employee information for non-admins is Solved

  1. Open include/globalControlLinks.php
  2. In the file go to:

$global_control_links[‘employees’] = array(
‘linkinfo’ => array($app_strings[‘LBL_EMPLOYEES’]=> ‘index.php?module=Employees&action=index&query=true’),
‘submenu’ => ‘’
3. add the following line
if (is_admin ($current_user))
4. The code will look like code below

if (is_admin ($current_user))
$global_control_links[‘employees’] = array(
‘linkinfo’ => array($app_strings[‘LBL_EMPLOYEES’]=> ‘index.php?module=Employees&action=index&query=true’),
‘submenu’ => ‘’
5. Non-admins will not be able to view employees[/b][/size][/size][/size][/size]


I need the same requirement.
but when I did the above change in include/globalControlLinks.php there is no effect on my site.
Whay this is not reflact to my suitecrm site?


it works for me.

in Suitecrm 7.10.7

if (is_admin ($current_user))
$global_control_links[‘employees’] = array(
‘linkinfo’ => array($app_strings[‘LBL_EMPLOYEES’]=> ‘index.php?module=Employees&action=index&query=true’),
‘submenu’ => ‘’

Thank you. @Lagunajack

Hi! I need this is an old post but I’m currently using 7.11.18 and I need exactly this, that employees can’t see each other, because we are not using the CRM with employees but with partners.

Anyone has an idea for this?

I want to completely ban non admin to see other employees.

Thank you so much

Hi sarole,

did you find a solution at the end?


Hi, you can use the Filter User List option in Admin > Security Suite Settings:

to make non admin Users to see just Users that are in the same Group.

To hide the employee link, you could add a file:

and write there:

global $current_user;
if ( !$current_user->isAdmin() ) {
} //if

Hi LionS,

Many thanks for your kind answer.

It worked for “employees”. I tried the same to unset “profile” from the same menu, but it does not work.
Do you have by chance a solution to hide it or better to let the user see his/her profile info without
editing it?


I beg your pardon, i wasn’t supposed to give you directions to hide the Profile link.
Is this what you mean:

Please check this

Hi LionS,

No need to apologize, it was ok the suggestion to hide “employees” from the menu.
I then just took the occasion to ask you about the “profile” too. I looked at your link
and yes it doesn’t show the profile, displaying the an error message.
To tell you the truth my preference would be to let users display their profile info
(excluding the access tab table) and let edit just certain fields, not all.
If this is not possible I would prefer to hide completely the “profile” option from the menu.
Just fyi I am using SuiteCRM 7.12.5.

If you have any suggestion let em know.


In /custom/modules/Users/views/view.edit.php
let’s write something like:


if (!defined('sugarEntry') || !sugarEntry)
    die('Not A Valid Entry Point');


class UsersViewEdit extends ViewEdit {

    function __construct() {

    function display() {
        global $current_user;
         if ( !$current_user->isAdmin() ) {
            $protectionScript = <<<EOS
        <script language = "javascript">
        <!-- make the fields you want readonly or disabled -->
echo $protectionScript;
} //if
} //display function
} // class

Note that JS solutions like that are only cosmetic and cannot be considered secure. If the data gets sent to the front-end, it’s accessible, the JS can be circumvented.

I know that for some cases this is nothing to worry about, but at least I think it’s important to give the warning…

Hi LionS,

Thanks for your time, I am not so skilled so I was trying to figure out
how should I have to complete the script part.

Now pgr (thanks) remind the potential security risk of the solution, so I ask
if there is a secure solution to what I asked before (hiding access table tab
and avoid editing certain fields from the edit view profile by the user )


Dear @mariofucile , you can copy /themes/SuiteP/tpls/_headerModuleList.tpl
inside it please search every occurrences of {$CURRENT_USER} or {$CURRENT_USER_ID}
and edit this Smarty file as per your needs. It’s simple as in these rows you’ll find HTML syntax.

There are many occurrences because this file not only determines how the application is rendered on a desktop window, but also on smaller browser windows like the ones for tablets and smartphones

Hi LionS,

Sorry for not replying before. I have just read your suggestion.
I copied the file mentioned in the custom dir. Found 5 instances
between “$current_user” and “$current_user_id”, but do not get
how to control user view/edit profile fields from there. Probably is
my knowledge limit. If you have any chance/time to provide an example
otherwise no problem.


Hi @mariofucile , could you please check this:

Maybe you’ll find it useful