Results 1 to 9 of 9

Thread: Limit Role Abilities

  1. #1
    dblackard is offline Member
    Join Date
    Jun 2009
    Posts
    7

    Default Limit Role Abilities

    I have created a role for our sales agents, but I do not want them to be able to add new customers. Corporate wants to do that. Is this possible? Thanks for the help.

  2. #2
    salesagility's Avatar
    salesagility is offline Sugar Community Member
    Join Date
    Aug 2006
    Location
    UK
    Posts
    2,379

    Default Re: Limit Role Abilities

    Not using Roles ... unless you want to also remove their ability to edit Account details. If this is OK, then just set their permissions to list and view and restrict edit

  3. #3
    dblackard is offline Member
    Join Date
    Jun 2009
    Posts
    7

    Default Re: Limit Role Abilities

    Thanks Sugar Hero.

    I do need them to be able to work in the Account and update it. If you think of another way to accomplish this please let me know. Thanks again.

  4. #4
    salesagility's Avatar
    salesagility is offline Sugar Community Member
    Join Date
    Aug 2006
    Location
    UK
    Posts
    2,379

    Default Re: Limit Role Abilities

    OK ... check out this ACL

    Access control at field level

  5. #5
    dblackard is offline Member
    Join Date
    Jun 2009
    Posts
    7

    Default Re: Limit Role Abilities

    Sweet! many thanks.

  6. #6
    dblackard is offline Member
    Join Date
    Jun 2009
    Posts
    7

    Default Re: Limit Role Abilities

    Trying to get this to work on "Create Account". Realizing this is not a field, but a button with an action. Any words of wisdom would be greatly appreciated. Thanks.
    Last edited by dblackard; 2010-03-07 at 01:53 AM.

  7. #7
    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: Limit Role Abilities

    You should need to create a custom controller for Accounts module and implement the method action_editview, in order to check if the current_user can create new Accounts.
    The content of such function may looks like that:

    PHP Code:
        function action_editview() {
            
    $role_name 'sales agents';
        
            global 
    $current_user;

            
    $this->view = (empty($this->bean->id) && $current_user->check_role_membership($role_name$user_id '')) ? 'noaccess' 'edit';
        } 

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

  8. #8
    dblackard is offline Member
    Join Date
    Jun 2009
    Posts
    7

    Default Re: Limit Role Abilities

    Andre, thank you for your help.

    I need to ask. Where would I place this PHP script? I was looking at AccountsQuickCreate.php, but I do not know for sure. And where inside the file I should drop it.

    This junior sugar member appreciates you guys.

  9. #9
    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: Limit Role Abilities

    custom/modules/Accounts/controller.php

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

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. PHP Memory Limit
    By thehubba in forum Deutsche
    Replies: 3
    Last Post: 2010-02-21, 10:12 PM
  2. Limit viewing
    By 829 in forum Help
    Replies: 1
    Last Post: 2008-08-05, 08:47 PM
  3. Limit Home Page Dashlet per Role? Possible?
    By scheinarts in forum Developer Help
    Replies: 3
    Last Post: 2008-08-04, 04:31 PM
  4. Limit users
    By asimzaidi in forum Help
    Replies: 0
    Last Post: 2008-07-16, 02:03 AM
  5. Replies: 2
    Last Post: 2004-10-16, 06:12 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
  •