CRM-15854 - crmMailing, crmMailingAB - Respect 'delete in CiviMail' permission
[civicrm-core.git] / partials / crmMailing / edit-workflow.html
index 7b00de8fb26eb25e5f21238eb58a2cbc17074971..740f42846642594de22f06e9808b700bb2cb5ce0 100644 (file)
       </div>
 
       <span crm-ui-wizard-buttons style="float:right;">
-        <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>
         <button crm-icon="disk" ng-disabled="block.check()" ng-click="save().then(leave)">{{ts('Save Draft')}}</button>
       </span>
     </div>