1

Can anyone shed some light on the new(ish) permissions for editing message templates? I'm moving to Civi 5.5.3 on Drupal 7 and noticed that now the permissions are broken out into

  • CiviCRM: edit message templates (previously this was the only permission)
  • CiviCRM: edit system workflow message templates
  • CiviCRM: edit user-driven message templates

I looked through, I thought pretty in depth, all the release notes I could find and wan't able to find a reference to this change. I'm not entirely sure why there are 3 total permissions rather than just two.

I think "edit message templates" allows you to edit both system workflow and user-driven message templates. How is that different than just checking both "edit system workflow message templates" and "edit user-driven message templates"? Is there more controlled under 'edit message templates"?

3 Answers 3

2

There was an issue with the permissions on saving a message template that has been fixed and will be released in 5.7 PR for 5.7. The situation is that there is now the ability to have more finer grained permission, so if you only want some users being able to edit just the User templates your will be able to do that by just granting the CiviCRM: edit user-driven message templates permission for example.

The reason for the 3 is to maintain backwards compatibility so the people who had assigned the CiviCRM: edit message templates permission that would still work exactly the same.

1
  • I totally get why they split them up just wasn't sure how all three interacted permissions interacted. The link to the PR was very helpful, I looked through the original thread and see the back and forth about keeping around the old permission for backwards compatibility. In my case (5.5.3, Drupal 7.59) it's not totally backwards compatible, I had to add the additional permission to be able to enable/disable templates - but the error message that displays was explicit enough to direct me to do that.
    – RayWright
    Commented Oct 22, 2018 at 13:34
3

I didn't mean to answer my own question but I kept poking around - I'm also not sure that this is the whole picture:

I found that the main "edit message templates" permission shows the "Message Templates" option in the Mailings menu. But with either of the other two permissions turned on, you can still access the page at yoursite.org/civicrm/admin/messageTemplates.

I also found that the ability to Enable/Disable a template is tied to the new permissions. The option is displayed but it throws an error if you try without the additional permission(s)

API permission check failed for MessageTemplate/create call; insufficient permission: require edit message templates and edit user-driven message templates and edit system workflow message templates

Meaning you'll want to add these additional permission(s) to anyone who already had the previous "edit message templates" permission - so that they are still able to enable / disable templates.

If anyone has additional info please feel free to add!

1
  • Answering your own questions is good!
    – Aidan
    Commented Oct 23, 2018 at 9:40
1

Both answers above have been very useful, but I have found out a bit more. If you use the edit message templates permission to show the Message Templates menu item, then it still allows the editing (but not deleting and disabling) of the System Workflow Messages even if edit system workflow message templates permission is nitset. I don;t want to allow this when I allow editing of the User-driven messages. I got round this by adding the edit user-driven message templates permission to the Message Templates menu item with the OR option and leaving the edit message templates permission template unset. Seems to work.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.