From 0fc156d9e09de4b8966e6b38655520006a7d54d8 Mon Sep 17 00:00:00 2001 From: Tim Otten Date: Mon, 2 Mar 2015 18:35:23 -0800 Subject: [PATCH] CRM-15854 - crmMailing, crmMailingAB - Respect 'delete in CiviMail' permission --- CRM/Mailing/Info.php | 1 + js/angular-crmMailingAB.js | 1 + partials/crmMailing/edit-unified.html | 7 ++++++- partials/crmMailing/edit-unified2.html | 7 ++++++- partials/crmMailing/edit-wizard.html | 7 ++++++- partials/crmMailing/edit-workflow.html | 7 ++++++- partials/crmMailing/edit.html | 7 ++++++- partials/crmMailingAB/edit.html | 1 + 8 files changed, 33 insertions(+), 5 deletions(-) diff --git a/CRM/Mailing/Info.php b/CRM/Mailing/Info.php index aefd0d23a4..2f56018e10 100644 --- a/CRM/Mailing/Info.php +++ b/CRM/Mailing/Info.php @@ -153,6 +153,7 @@ class CRM_Mailing_Info extends CRM_Core_Component_Info { 'create mailings', 'schedule mailings', 'approve mailings', + 'delete in CiviMail', )); return $result; diff --git a/js/angular-crmMailingAB.js b/js/angular-crmMailingAB.js index 3572b21687..cc23dad906 100644 --- a/js/angular-crmMailingAB.js +++ b/js/angular-crmMailingAB.js @@ -66,6 +66,7 @@ var myAutosave = null; $scope.crmMailingABCriteria = crmMailingABCriteria; $scope.crmMailingConst = CRM.crmMailing; + $scope.checkPerm = CRM.checkPerm; $scope.isSubmitted = function isSubmitted() { return _.size(abtest.mailings.a.jobs) > 0 || _.size(abtest.mailings.b.jobs) > 0; diff --git a/partials/crmMailing/edit-unified.html b/partials/crmMailing/edit-unified.html index ca1ef5cf1c..ef4b2ad66b 100644 --- a/partials/crmMailing/edit-unified.html +++ b/partials/crmMailing/edit-unified.html @@ -47,6 +47,11 @@ - + diff --git a/partials/crmMailing/edit-unified2.html b/partials/crmMailing/edit-unified2.html index 464e89058c..7f1ef824a2 100644 --- a/partials/crmMailing/edit-unified2.html +++ b/partials/crmMailing/edit-unified2.html @@ -43,6 +43,11 @@ - + diff --git a/partials/crmMailing/edit-wizard.html b/partials/crmMailing/edit-wizard.html index 9e2ba6a112..ef2a8eef0b 100644 --- a/partials/crmMailing/edit-wizard.html +++ b/partials/crmMailing/edit-wizard.html @@ -60,7 +60,12 @@ - + diff --git a/partials/crmMailing/edit-workflow.html b/partials/crmMailing/edit-workflow.html index 7b00de8fb2..740f428466 100644 --- a/partials/crmMailing/edit-workflow.html +++ b/partials/crmMailing/edit-workflow.html @@ -67,7 +67,12 @@ - + diff --git a/partials/crmMailing/edit.html b/partials/crmMailing/edit.html index 0d6f08e3b6..8e581bfaf3 100644 --- a/partials/crmMailing/edit.html +++ b/partials/crmMailing/edit.html @@ -58,7 +58,12 @@ - + diff --git a/partials/crmMailingAB/edit.html b/partials/crmMailingAB/edit.html index 357d96fcc6..75a7c5ea56 100644 --- a/partials/crmMailingAB/edit.html +++ b/partials/crmMailingAB/edit.html @@ -166,6 +166,7 @@