How to configure which user to use for resolving email template in ACS AEM Commons Email API | Community
Skip to main content
Level 3
January 12, 2021
Solved

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

  • January 12, 2021
  • 1 reply
  • 1146 views

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?

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Suraj_Kamdi

@vinit_pillai 

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]"/>

 

1 reply

Suraj_Kamdi
Community Advisor
Suraj_KamdiCommunity AdvisorAccepted solution
Community Advisor
January 12, 2021

@vinit_pillai 

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]"/>