How to configure which user to use for resolving email template in ACS AEM Commons Email API

Avatar

Avatar

pillaivinit

Avatar

pillaivinit

pillaivinit

11-01-2021

I'm using AEM 6.3 and after reading this I found out that

On AEM 6.2 or above, this service uses a Service User for repository access. This user is configured with the expected permissions required, but additional permissions may be required if your repository design deviates from the expected structure.

User name: acs-commons-email-service

ACLs:

  • jcr:read on /etc/notification/email

 

What I want to do is use my user instead of this user. How can I achieve this?

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar

Suraj_Kamdi

MVP

Avatar

Suraj_Kamdi

MVP

Suraj_Kamdi
MVP

11-01-2021

@pillaivinit 

Instead of using acs-commons-email-service. Create new service users using acs commons Ensure service user API to create the service user by providing read and write ACL. see the example here

https://adobe-consulting-services.github.io/acs-aem-commons/features/ensure-service-users/index.html 

 

<?xml version="1.0" encoding="UTF-8"?>
<jcr:root xmlns:sling="http://sling.apache.org/jcr/sling/1.0" xmlns:cq="http://www.day.com/jcr/cq/1.0"
    xmlns:jcr="http://www.jcp.org/jcr/1.0" xmlns:nt="http://www.jcp.org/jcr/nt/1.0"
    jcr:primaryType="sling:OsgiConfig"
    principalName="my-service-user"
    operation="add"
    ensure-immediately="{Boolean}true"
    aces="[type=allow;privileges=jcr:read\,rep:write;path=/yourpath]"/>

 

Answers (0)