CRM-15854 - crmMailing, crmMailingAB - Respect 'delete in CiviMail' permission
[civicrm-core.git] / partials / crmMailing / edit-unified2.html
index 464e89058ca346754bc92638d11bec2c9ff7c659..7f1ef824a2f812b2a7212718422033e1212ab300 100644 (file)
 
     <button crm-icon="check" ng-disabled="block.check() || crmMailing.$invalid" ng-click="submit()">{{ts('Submit Mailing')}}</button>
     <button crm-icon="disk" ng-disabled="block.check()" ng-click="save().then(leave)">{{ts('Save Draft')}}</button>
-    <button crm-icon="trash" ng-disabled="block.check()" crm-confirm="{title:ts('Delete Draft'), message:ts('Are you sure you want to permanently delete this mailing?')}" on-yes="delete()">{{ts('Delete Draft')}}</button>
+    <button
+      crm-icon="trash"
+      ng-show="checkPerm('delete in CiviMail')"
+      ng-disabled="block.check()"
+      crm-confirm="{title:ts('Delete Draft'), message:ts('Are you sure you want to permanently delete this mailing?')}"
+      on-yes="delete()">{{ts('Delete Draft')}}</button>
   </div>
 </form>