Results 1 to 5 of 5

Thread: mass update available for all users ?

  1. #1
    juice2 is offline Junior Member
    Join Date
    Oct 2007
    Posts
    1

    Default mass update available for all users ?

    Running sugaros 4.5.1f, the 'Mass Update' section under employees is available for all users. How do I remove this so standard users can't make themselves admin ?

  2. #2
    brightonbob is offline Junior Member
    Join Date
    Aug 2006
    Posts
    2

    Default Re: mass update available for all users ?

    Quote Originally Posted by juice2
    Running sugaros 4.5.1f, the 'Mass Update' section under employees is available for all users. How do I remove this so standard users can't make themselves admin ?
    Hi

    I have a similar question:

    How do I remove the option for "mass update" for all modules for all users - but make it available for admins etc. I have created a group called users and a group called admins but cant see what needs to be done next?

    Any help would be appreciated

    BB

  3. #3
    brightonbob is offline Junior Member
    Join Date
    Aug 2006
    Posts
    2

    Default Re: mass update available for all users ?

    I think I posted too quickly .....I found this:

    However, please can someone explain exactly the exact edit required in the file (I am using latest 4.5.1h b1104)

    I am not a PHP programmer and through trial and error cut and paste I ether get no content or no "mass update" but for both admin and other users - cant get it to remove "mass update" just for normal (non-admin users).

    ************************************************** ************************************************** **********
    Default Re: Contacts - hiding Mass Update

    FYI for those who want to make the display of mass_update an admin option you can edit $show_mass_update like this:

    include/ListView/ListViewDisplay.php

    PHP Code:
    if(!empty($params['massupdate']) && $params['massupdate'] != false) {
    global $current_user;
    if (is_admin($current_user)){$this->show_mass_update_form = true;}
    else{$this->show_mass_update_form = false;}

    this will remove the whole mass update div for non-admin users. !not upgrade safe!
    ************************************************** ************************************************** *************
    Last edited by brightonbob; 2007-11-20 at 12:34 PM.

  4. #4
    charitha is offline Sugar Community Member
    Join Date
    Aug 2007
    Location
    Stafford, United Kingdom
    Posts
    34

    Default Re: mass update available for all users ?

    I am new to PHP, so please forgive my incompetence.

    Where on the code do I add this? should it be a separate function?

  5. #5
    andopes's Avatar
    andopes is offline A Sugar Hero | Help Forum Moderator
    Join Date
    Jul 2006
    Location
    São Paulo - Brazil
    Posts
    8,335

    Default Re: mass update available for all users ?

    Hi, charitha

    For hiding the MassUpdate for non-admin users and upgrade safely you can insert this piece of code:


    PHP Code:
    if(is_admin($current_user)) {
        
    $lv->show_mass_update_form true;
    } else {
        
    $lv->show_mass_update_form false;

    before the line:

    PHP Code:
    echo $lv->display(); 
    At the ListView.php of the modules you want to hid the MassUpdate Form. Editing the modules actions is upgrade safe.

    Cheers

    --
    André Lopes
    Lâmpada Global Services
    Rua Bela Cintra, 299 conjunto. 51
    São Paulo, SP 01415-000
    tel1. 55 11 3237-3110
    cel. 55 11 7636-5859
    e-mail: info@lampadacrm.com.br

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 1
    Last Post: 2007-10-12, 06:49 PM
  2. Replies: 0
    Last Post: 2007-06-16, 02:20 PM
  3. Mass Update Customisation
    By duncanb in forum Developer Help
    Replies: 4
    Last Post: 2007-05-16, 06:17 AM
  4. Mass Update won't work!
    By rsantiago in forum Help
    Replies: 6
    Last Post: 2006-08-18, 02:54 AM

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
  •