Results 1 to 9 of 9

Thread: Limiting ListViews via roles

  1. #1
    henda79 is offline Member
    Join Date
    Jun 2011
    Posts
    5

    Default Limiting ListViews via roles

    Hi guys, im new to sugarcrm so take it easy

    I have been trying to modify my installation of sugarcrm to suit my needs. One thing which I need is; to be able to use the roles to stop std users listing accounts. I set the list permission in the role to none, but the user cant use the accounts module at all.

    Ideally what I would like, is to stop users being able to list all the accounts. I would like to set the list role to none, but still allow them access to the accounts module, however they have to know the details of the account they are looking for and use the search function. So I will also need to disable single wildcards in the search function (%).

    Let me know your thoughts...

  2. #2
    kbrill's Avatar
    kbrill is offline SugarCRM PS Engineer
    Join Date
    Jul 2004
    Location
    St Louis, MO
    Posts
    3,183

    Default Re: Limiting ListViews via roles

    Sorry, this really can't be done without some custom coding. Roles can limit users in many was but nothing this extreme.

    In Roles, NONE means no restrictions not no listing. What you are talking about would need quite a bit of coding to change stock behavior.

    Can you outline why you would need this behavior, maybe someone can come up with an alternate way to do what you need.
    Kenneth Brill - Help Forum Moderator

    I do not respond to 'Private Messages'. Please email me directly instead

    When asking for help, PLEASE give us your Server Information and Version Numbers as asked for on the 'Post New Message' screen as well as any JavaScript errors shown at the bottom of the browser window.
    Help us Help You

  3. #3
    henda79 is offline Member
    Join Date
    Jun 2011
    Posts
    5

    Default Re: Limiting ListViews via roles

    Sorry for the delay, i've been away for a while.

    I need this function as I want stop "normal" members of staff from being to be able to "list" all of my customers as there is a potential that they could sell my customers to another company. If the "list" function was limited, normal user could only view the customer they new details for.

    Hope this makes sense.

  4. #4
    rafael.q.g@hotmail.com's Avatar
    rafael.q.g@hotmail.com is offline Sugar Community Member
    Join Date
    Jun 2011
    Location
    Florianópolis - Brazil
    Posts
    782

    Default Re: Limiting ListViews via roles

    To customize the list view to behaver like you want, a possible way is the follow.
    1. Inside the modules/accounts/ folder create a new folder named view, and then a file named list.view.php
    2. This file has to contains some code like:
    PHP Code:
    <?php
    require_once('include/MVC/View/views/view.list.php');
    class 
    AccountsViewList extends ViewList {

     
        
    //overwrite the display function
        
    public function display() {
            require_once(<
    your_custom_list_view.php>);
          }

    }
    ?>
    This way you can develop a custom way to display the accounts. But you have to program this listing and search functionality. I already did it for some very specific modules, and the result was very good.
    Rafael Queiroz Gonçalves
    Advanced OMG UML Certified Professional
    Sun Certified Enterprise Architect for the Java Platform
    Sun Certified Programmer for the Java 2 Platform
    IBM Certified Advanced Application Developer - Lotus Notes and Domino
    IBM Certified Application Developer - IBM WebSphere Portlet Factory
    Computer Science Mastering / UFSC - PPGCC

  5. #5
    henda79 is offline Member
    Join Date
    Jun 2011
    Posts
    5

    Default Re: Limiting ListViews via roles

    Thanks for your replies guys, but it looks like i'll have to get a php coder to make these changes.

    Thanks for the advice.

  6. #6
    asavaliya is offline Sugar Community Member
    Join Date
    Nov 2010
    Posts
    50

    Default Re: Limiting ListViews via roles

    hi
    In list view Basic search if you make my items check box by default true , and not editable by current user
    then it display records only assigned to current user.
    In Advance Search you need to remove Assigned to multi select and add there my items check box , it should be like basic search.
    Last edited by asavaliya; 2011-06-10 at 06:44 AM.

  7. #7
    henda79 is offline Member
    Join Date
    Jun 2011
    Posts
    5

    Default Re: Limiting ListViews via roles

    hi, thanks for your reply.

    This wont work for me as this will only allow one user to list and view the records. I just want to stop the casual listing of the reords.

  8. #8
    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: Limiting ListViews via roles

    Follow the tips in my post here.

    You will need to, conditionally, add some restrictions into ret_array['where'] in order to limit access to some records.

    Regards
    André Lopes
    DevToolKit / Project of the Month - June 2009
    Lampada Global Services- Open Source Solutions
    Avenida Ipiranga, 318
    Bloco B - CJ 1602
    São Paulo, SP 01046-010
    Brazil
    Office: +55 11 3237-3110
    Mobile: +55 11 7636-5859
    e-mail: andre@lampadaglobal.com

    Lampada Global delivers offshore software development and support services to customers around the world.
    Lampada is proud to be a SugarCRM Gold Partner, revolutionizing Customer Relationship Management.

    I DO NOT answer questions through PM and Email. If you need some help post your question into SugarForum.

  9. #9
    henda79 is offline Member
    Join Date
    Jun 2011
    Posts
    5

    Default Re: Limiting ListViews via roles

    thanks for your tips, I will get a php coder to do the changes for me as I know nothing about php

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Custom Buttons on ListViews
    By cnielsenlev in forum Developer Help
    Replies: 8
    Last Post: 2009-09-16, 03:05 PM
  2. Delete on ListViews do not work!
    By jasv in forum Help
    Replies: 1
    Last Post: 2008-11-14, 06:12 PM
  3. Upgrade 5.0 to 5.1.0b : Pb on the ListViews
    By thorc in forum Installation and Upgrade Help
    Replies: 0
    Last Post: 2008-11-13, 02:36 PM
  4. ListViews and results.
    By naeikindus in forum Developer Help
    Replies: 7
    Last Post: 2007-06-18, 07:39 AM
  5. Trouble with ListViews
    By rsantiago in forum Help
    Replies: 2
    Last Post: 2006-08-09, 04:04 PM

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
  •