mirror of
https://github.com/SuiteCRM/SuiteCRM-Core.git
synced 2025-09-06 10:26:22 +08:00
Merge commit '9d484f189a
' into release/8.2.2
# Conflicts: # public/legacy/files.md5 # public/legacy/modules/InboundEmail/EditView.html # public/legacy/modules/Users/tpls/EditViewFooter.tpl # public/legacy/suitecrm_version.php
This commit is contained in:
commit
123e5a9f26
187 changed files with 13785 additions and 3361 deletions
|
@ -413,16 +413,13 @@ function get_subscription_lists_query($focus, $additional_fields = null)
|
|||
$all_news_type_pl_query .= "and c.campaign_type = 'NewsLetter' and pl.deleted = 0 and c.deleted=0 and plc.deleted=0 ";
|
||||
$all_news_type_pl_query .= "and (pl.list_type like 'exempt%' or pl.list_type ='default') ";
|
||||
|
||||
/* BEGIN - SECURITY GROUPS */
|
||||
if ($focus->bean_implements('ACL') && ACLController::requireSecurityGroup('Campaigns', 'list')) {
|
||||
require_once('modules/SecurityGroups/SecurityGroup.php');
|
||||
global $current_user;
|
||||
$owner_where = $focus->getOwnerWhere($current_user->id);
|
||||
$group_where = SecurityGroup::getGroupWhere('c', 'Campaigns', $current_user->id);
|
||||
$all_news_type_pl_query .= " AND ( c.assigned_user_id ='".$current_user->id."' or ".$group_where.") ";
|
||||
$campaign = BeanFactory::newBean('Campaigns');
|
||||
$campaign->table_name = 'c';
|
||||
$accessWhere = $campaign->buildAccessWhere('list');
|
||||
if (!empty($accessWhere)) {
|
||||
$all_news_type_pl_query .= ' AND ' . $accessWhere;
|
||||
}
|
||||
/* END - SECURITY GROUPS */
|
||||
|
||||
|
||||
$all_news_type_list =$focus->db->query($all_news_type_pl_query);
|
||||
|
||||
//build array of all newsletter campaigns
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue