Results 1 to 6 of 6

Thread: Group Messages dashlet dropdown

  1. #1
    datatoo is offline Member
    Join Date
    Jan 2010
    Posts
    11

    Default Group Messages dashlet dropdown

    Where is this dashlet located? I would like to post to select groups not ALL

  2. #2
    jmertic is offline Sugar Community Manager
    Join Date
    Dec 2007
    Posts
    2,224

    Default Re: Group Messages dashlet dropdown

    Do you mean 'Team Notices'? It's located at modules/TeamNotices/

  3. #3
    eggsurplus's Avatar
    eggsurplus is offline Sugar Community Member
    Join Date
    Dec 2005
    Location
    Minnesota
    Posts
    2,343

    Default Re: Group Messages dashlet dropdown

    Scott,

    Are you talking about the Group Messages dashlet in SecuritySuite? You can post to ALL as an admin only and only to the other groups if you are a direct member of them. So if you are an admin you'd need to be added to East Sales if you want to post to East Sales. You can customize it to show all groups if you are an admin in modules\SecurityGroups\Dashlets\MessageDashlet\Mes sageDashlet.php. Look for the following code:

    PHP Code:
                $where ' (securitygroups_message.securitygroup_id is null';
                require_once(
    'modules/SecurityGroups/SecurityGroup.php');
                
    $securitygroups SecurityGroup::getUserSecurityGroups($current_user->id);
                if(
    sizeof($securitygroups) > 0) {
                    
    $where .= ' OR (securitygroups_message.securitygroup_id in (';
                    
    $first_group true;
                    foreach(
    $securitygroups as $group) {
                        if(!
    $first_group) {
                            
    $where .= ' , ';
                            
    $first_group false;
                        }
                        
    $where .= "'".$group['id']."'";
                    }
                    
    $where .= '))';
                }
                
                
                
    $where .= ') '
    And replace with this code that checks to see if an Admin:
    PHP Code:
    if(!is_admin($GLOBALS['current_user'])) {
                
    $where ' (securitygroups_message.securitygroup_id is null';
                require_once(
    'modules/SecurityGroups/SecurityGroup.php');
                
    $securitygroups SecurityGroup::getUserSecurityGroups($current_user->id);
                if(
    sizeof($securitygroups) > 0) {
                    
    $where .= ' OR (securitygroups_message.securitygroup_id in (';
                    
    $first_group true;
                    foreach(
    $securitygroups as $group) {
                        if(!
    $first_group) {
                            
    $where .= ' , ';
                            
    $first_group false;
                        }
                        
    $where .= "'".$group['id']."'";
                    }
                    
    $where .= '))';
                }
                
                
                
    $where .= ') ';

    I haven't tested this code but the idea should work.

    -Jason

  4. #4
    datatoo is offline Member
    Join Date
    Jan 2010
    Posts
    11

    Default Re: Group Messages dashlet dropdown

    Jason thanks, I will try that. Belonging to a group that is restrictive is problematic, if I only want to be able to send a message to that group. If I make permissions additive in the module I may have other issues, but I will mess with this now that I see where to look, thanks

  5. #5
    datatoo is offline Member
    Join Date
    Jan 2010
    Posts
    11

    Default Re: Group Messages dashlet dropdown

    Tried the code change and didn't see other groups available to post to.
    I did add different users to additional groups, so for instance managers could post to field reps and tried field reps amongst themselves, but the only user seeing any messages is admin or they have to have been posted by admin.
    Am I misunderstanding permissions on the roles? I have them NOT SET in all for field reps and managers. If either posts, admin sees what they posted, but they don't.

    Must say i didn't try it before the change as any but an admin user. BUT you got me where I need to play with it in the dashlet, which is all I asked for.
    Thanks

  6. #6
    eggsurplus's Avatar
    eggsurplus is offline Sugar Community Member
    Join Date
    Dec 2005
    Location
    Minnesota
    Posts
    2,343

    Default Re: Group Messages dashlet dropdown

    If the field reps and the manager are in the same group they should see the message if the manager posts to that group. So if a field rep is in West Sales if the manager posts to West Sales they should see it. Let me know if this isn't the case.

    -Jason

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Dashlet Chart Dropdown fields keys
    By jmcdonald in forum Developer Help
    Replies: 2
    Last Post: 2011-02-22, 11:25 PM
  2. How to group Validation messages
    By Developersam in forum Developer Help
    Replies: 1
    Last Post: 2009-07-21, 05:41 AM
  3. dropdown field in Dashlet
    By Mithun in forum Developer Help
    Replies: 0
    Last Post: 2009-03-14, 11:47 AM
  4. Group Email has messages, but shows empty
    By sugarnoah in forum Help
    Replies: 9
    Last Post: 2008-08-01, 07:01 AM
  5. Dashlet dropdown search filters
    By stevec in forum Developer Help
    Replies: 0
    Last Post: 2006-10-19, 01:22 PM

Tags for this Thread

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
  •