Page 1 of 3 123 LastLast
Results 1 to 10 of 23

Thread: Mass Update - Security

  1. #1
    aram is offline Sugar Community Member
    Join Date
    Aug 2004
    Posts
    52

    Default Mass Update - Security

    I'd like to only give Admin's rights to do a Mass Update.
    Is there a way?
    Currently all users can add or Edit Accounts and Contacts,
    and we need to keep that in place.
    We just don't want a normal user Mass Updating our whole Contacts or Accounts lists

    Sugar 5.0.0b

    Thanks,
    Aram

  2. #2
    dpatech is offline Sugar Community Member
    Join Date
    Oct 2007
    Location
    NC
    Posts
    287

    Default Re: Mass Update - Security

    Unfortunately not, and this is a pretty common request.
    - Sugar Team
    dpa Technology LLC
    e-mail: dpaDeveloper@dpatechnology.com
    web: http://www.dpatechnology.com

  3. #3
    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 - Security

    Hi, aram.

    It is right possible and pretty easy to do:

    First of all inside the module you want to restrict access create the directory views

    modules/YourModule/views

    Copy inside this directory the file include/MVC/View/views/view.list.php
    Rename the class name from ViewList to YouModuleViewList and rename the extends from SugarView to ViewList.

    Remove all functions less the display()
    And rename the line

    PHP Code:
                echo $lv->display(); 
    to

    PHP Code:
                echo $lv->display(false); 
    That is it.

    --
    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

  4. #4
    aram is offline Sugar Community Member
    Join Date
    Aug 2004
    Posts
    52

    Default Re: Mass Update - Security

    Andopes..
    Thanks for the reply and info..

    After I make the suggested change:
    "Rename the class name from ViewList to YouModuleViewList and rename the extends from SugarView to ViewList."

    I get this error returned on the Contacts Listview page:

    Fatal error: Class contactsviewlist: Cannot inherit from undefined class viewlist in C:\Inetpub\wwwroot\SQmailNuts\src\sugar\modules\Co ntacts\views\view.list.php on line 41

    Line 41 being:

    class ContactsViewList extends ViewList{

    What do you think?

    Aram

  5. #5
    SugarDev.net is offline Sugar Community Member
    Join Date
    Feb 2008
    Posts
    1,401

    Default Re: Mass Update - Security

    This is nonsense. This won't work for modules which already have a customized ViewList, and it's not in the proper directory.
    Developers go here
    Businesses go there (Dutch)

    Modules:
    SugarDev.net Developer Tools | Config | Dutch Language Pack
    "Nothing gets fixed unless there is a bug"

  6. #6
    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 - Security

    Hi, aram.
    I believe you have to require_once the ViewList.

    Hi, SugarDev.net.

    We have done it several times from custom modules and also default modules.

    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

  7. #7
    SugarDev.net is offline Sugar Community Member
    Join Date
    Feb 2008
    Posts
    1,401

    Default Re: Mass Update - Security

    You said "modules/YourModule/views", that's not in the custom directory, so it's not upgrade-safe. You should make modules/ read-only.
    Developers go here
    Businesses go there (Dutch)

    Modules:
    SugarDev.net Developer Tools | Config | Dutch Language Pack
    "Nothing gets fixed unless there is a bug"

  8. #8
    dpatech is offline Sugar Community Member
    Join Date
    Oct 2007
    Location
    NC
    Posts
    287

    Default Re: Mass Update - Security

    I learn something new all the time - I stand corrected. It would seem this approach is very upgrade safe with custom modules, and MAY be ugprade-safe for standard modules if done properly.

    I believe Sugar should somehow expose this setting somewhere because many people ask for this and we should not have to modify code to make it happen.
    - Sugar Team
    dpa Technology LLC
    e-mail: dpaDeveloper@dpatechnology.com
    web: http://www.dpatechnology.com

  9. #9
    SugarDev.net is offline Sugar Community Member
    Join Date
    Feb 2008
    Posts
    1,401

    Default Re: Mass Update - Security

    Like the admin only import function?
    Developers go here
    Businesses go there (Dutch)

    Modules:
    SugarDev.net Developer Tools | Config | Dutch Language Pack
    "Nothing gets fixed unless there is a bug"

  10. #10
    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 - Security

    Quote Originally Posted by SugarDev.net
    You said "modules/YourModule/views", that's not in the custom directory, so it's not upgrade-safe. You should make modules/ read-only.
    My bad.

    You could create the file into custom/

    Thank you for the advice.

    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

Page 1 of 3 123 LastLast

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 2
    Last Post: 2008-03-24, 11:44 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
  •