Attach options for EmailTemplate service 'parseTemplate' to ignore ACL

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • brianpunzalan
    Active Community Member
    • Aug 2017
    • 62

    Attach options for EmailTemplate service 'parseTemplate' to ignore ACL

    Hi,

    I've been trying to use 'parseTemplate' function for parsing my entity data into the template dynamically. But as I checked the implementation, some fields were missing because of forbidden ACL field scope. An example would be, sending an email that was triggered by a different user to a specific user that has different access control. I had the same issue also on the PDF templates with Htmlizer but I just make the ACL as null. I made my own implementation of the Pdf service.

    Htmlizer has a parameter for the ACL which makes it more easier while the EmailTemplate service 'parseText' has no option to ignore the ACL.


    For better understanding, please check the following implementations below:

    Htmlizer: https://github.com/espocrm/espocrm/b...lizer.php#L100
    EmailTemplate: https://github.com/espocrm/espocrm/b...plate.php#L180


    Htmlizer having if statement for ACL and 'parseText' none.
  • tanya
    Senior Member
    • Jun 2014
    • 4308

    #2
    You can override service method in upgrade safe way.

    Comment

    • yuri
      Member
      • Mar 2014
      • 8440

      #3
      EspoCRM – Open Source CRM Application. Contribute to espocrm/espocrm development by creating an account on GitHub.
      If you find EspoCRM good, we would greatly appreciate if you could give the project a star on GitHub. We believe our work truly deserves more recognition. Thanks.

      Comment

      • brianpunzalan
        Active Community Member
        • Aug 2017
        • 62

        #4
        Thanks! This is what I was expecting exactly.

        Comment

        Working...