Where is this dashlet located? I would like to post to select groups not ALL
Where is this dashlet located? I would like to post to select groups not ALL
Do you mean 'Team Notices'? It's located at modules/TeamNotices/
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:
And replace with this code that checks to see if an Admin: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 .= ') ';
I haven't tested this code but the idea should work.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 .= ') ';
}
-Jason
Co-Founder of: SugarOutfitters
Modules:
SecuritySuite (Teams)
Photo Module
Follow me on Twitter:eggsurplus
Your Personal Developer
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
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
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
Co-Founder of: SugarOutfitters
Modules:
SecuritySuite (Teams)
Photo Module
Follow me on Twitter:eggsurplus
Your Personal Developer
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks