April 26, 2020
Estimated Post Reading Time ~

Create a system user in AEM using runmode config

Add/create a system user through runmode in AEM using ACS commons.

Create a runmode config file in your project.
/apps/aemquickstart/config/com.adobe.acs.commons.users.impl.EnsureServiceUser-customServiceUser.config

Add below snippet in the config file

principalName="custom-service-user"
type="add"
ensure-immediately="{Boolean}true"
aces="[type=allow;privileges=jcr:read\,jcr:modifyproperties;path=/content/we-retail;rep:glob=/jcr:content/*,type=allow;privileges=jcr:read;path=/content/aemqui
ckstart;rep:glob=/jcr:content/*]

The above snippet will add read and modify properties privilege to /content/we-retail path and read permission to /content/aemquickstart.

Refer ACS Commons documentation


By aem4beginner

No comments:

Post a Comment

If you have any doubts or questions, please let us know.