dev/core#421 Fix issue where creating user driven message templates was requireing...
authorSeamus Lee <seamuslee001@gmail.com>
Fri, 5 Oct 2018 02:31:38 +0000 (12:31 +1000)
committerSeamus Lee <seamuslee001@gmail.com>
Mon, 8 Oct 2018 21:00:34 +0000 (08:00 +1100)
commit781ed314a81b287b696404426c8e6a31a0ece9c7
tree6fc46a3d3d838717dfd4a1ec0732fb93abb9a125
parent412c1f45ed0b88666dea01192127e9d195b3f692
dev/core#421 Fix issue where creating user driven message templates was requireing the ssystem workflow message template permission as well

Wrap permission checking in the check_permissions param

Move Permission checking to BAO level from API

Allow for the fact that edit message templates permission should still be able to work on both sets of templates without the granular permissions. Also reduce duplication of code abit
CRM/Core/BAO/MessageTemplate.php
CRM/Core/Permission.php
tests/phpunit/api/v3/MessageTemplateTest.php