Results 1 to 10 of 10

Thread: Hide "employees" from non-admins

  1. #1
    emkay is offline Junior Member
    Join Date
    Feb 2006
    Posts
    4

    Default Hide "employees" from non-admins

    I would like to show the employees link on the top right only to admins. (dont want everyone seeing who else has access to the system, who they are).

    Anybody know if there is a parameter I didnt find or how to best approach this in the code??

    Thanks

    Mat

  2. #2
    Superman's Avatar
    Superman is online now Sugar Community Member
    Join Date
    Oct 2005
    Location
    Kazakhstan
    Posts
    852

    Default Re: Hide "employees" from non-admins

    Open include/globalControlLinks.php, and apply this changes:
    PHP Code:
    if (is_admin($current_user)) 
     
    $global_control_links['employees'] = array(
    'linkinfo' => array($app_strings['LBL_EMPLOYEES']=> 'index.php?module=Employees&action=ListView'),
    'submenu' => ''
    ); 
    Farkhad Rakhimzhanov
    E-mail: farkhad@gmail.com
    Skype: rakikama

    SuperTimesheet and Invoicing — timesheet tool with invoicing for SugarCRM.
    Book time against Cases, Project Tasks and Projects.
    Create invoice regarding booked time, print it in PDF or HTML,
    customize template as you like.

  3. #3
    Superman's Avatar
    Superman is online now Sugar Community Member
    Join Date
    Oct 2005
    Location
    Kazakhstan
    Posts
    852

    Default Re: Hide "employees" from non-admins

    And if you are running Sugar 4+, dont forget to apply changes to Employees module in Roles management (admin->roles management)
    Farkhad Rakhimzhanov
    E-mail: farkhad@gmail.com
    Skype: rakikama

    SuperTimesheet and Invoicing — timesheet tool with invoicing for SugarCRM.
    Book time against Cases, Project Tasks and Projects.
    Create invoice regarding booked time, print it in PDF or HTML,
    customize template as you like.

  4. #4
    emkay is offline Junior Member
    Join Date
    Feb 2006
    Posts
    4

    Default Re: Hide "employees" from non-admins

    Superman,

    You code changed worked well - thanks! Not sure what you mean with the role change however... I cant seem to find a role setting relating to employees, can you point me in the right direction? I am using 4.0.1

    Thanks

    Mat

  5. #5
    Superman's Avatar
    Superman is online now Sugar Community Member
    Join Date
    Oct 2005
    Location
    Kazakhstan
    Posts
    852

    Default Re: Hide "employees" from non-admins

    To make you understand what i was talking about, try to login as a non-admin, and type in this address:

    /index.php?module=Employees&action=index
    Farkhad Rakhimzhanov
    E-mail: farkhad@gmail.com
    Skype: rakikama

    SuperTimesheet and Invoicing — timesheet tool with invoicing for SugarCRM.
    Book time against Cases, Project Tasks and Projects.
    Create invoice regarding booked time, print it in PDF or HTML,
    customize template as you like.

  6. #6
    emkay is offline Junior Member
    Join Date
    Feb 2006
    Posts
    4

    Default Re: Hide "employees" from non-admins

    Superman,

    I definitely dont want that :-)

    But what do I need to change? I go to admin -> role manager, select the role set, but see nothing relating to employees, just "Accounts" ... all the way to "Tasks"...

    Mat

  7. #7
    Superman's Avatar
    Superman is online now Sugar Community Member
    Join Date
    Oct 2005
    Location
    Kazakhstan
    Posts
    852

    Default Re: Hide "employees" from non-admins

    Open include/modules.php. Find there $adminOnlyList, and append this line to that array:
    PHP Code:
    'Employees'=>array('all'=>1), 
    Farkhad Rakhimzhanov
    E-mail: farkhad@gmail.com
    Skype: rakikama

    SuperTimesheet and Invoicing — timesheet tool with invoicing for SugarCRM.
    Book time against Cases, Project Tasks and Projects.
    Create invoice regarding booked time, print it in PDF or HTML,
    customize template as you like.

  8. #8
    emkay is offline Junior Member
    Join Date
    Feb 2006
    Posts
    4

    Default Re: Hide "employees" from non-admins

    that sorted it.

    thanks a lot superman!

  9. #9
    alsobrooks is offline Sugar Community Member
    Join Date
    Jun 2006
    Posts
    10

    Default Re: Hide "employees" from non-admins

    Is there a way anyone could highlight specifically what needs to be changed within the php code?

    Do I replace a line or simply add that code?

    Where does it go?

    Thanks,

    Sean

  10. #10
    alsobrooks is offline Sugar Community Member
    Join Date
    Jun 2006
    Posts
    10

    Default Re: Hide "employees" from non-admins

    I would be more than happy to pay someone to help me with this.

    I am using SugarCRM 2.4 on a linux server.

    Please, if anyone is interested, let me know ASAP!

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •