Is it possible to set ACL on a path inside our custom maven AEM project? if yes how? | Community
Skip to main content
jayv25585659
Level 8
June 7, 2022
Solved

Is it possible to set ACL on a path inside our custom maven AEM project? if yes how?

  • June 7, 2022
  • 3 replies
  • 729 views
my co-worker created what supposedly is an editable template. (I have no experience with editable templates before so I'm taking their word on face value).
 
As part of the changes with their editable template, this file/folder was included (/conf/myapp/settings/wcm/template-types/empty-special-page).
 
The problem is that our authors require read access to that path before they can publish pages based on the editable template. I can easily setup the access to that path but every time we do a release, the ACL changes keeps getting overwritten.
 
I'm hoping it's hoping to setup the ACL on that path inside my custom maven project.
 
Thanks!
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 sunil_kumar_

Hi @jayv25585659 ,
You easily do it by creating Repository Initialization (repoinit). You just need to create OSGI configuration. 
If your ACL are getting overwritten that means, you might already having this. Check this link.
https://sling.apache.org/documentation/bundles/repository-initialization.html

3 replies

SantoshSai
Community Advisor
Community Advisor
June 7, 2022

Hi @jayv25585659 ,

In order to preserve ACL's you have set property

<properties>
<acHandling>merge_preserve</acHandling>
</properties>

in ui.apps pom.xml

For more details please this article:
1. https://aem4beginner.blogspot.com/preserving-acls-by-in-order-to-use 

2. https://github.com/Adobe-Consulting-Services/lazybones-aem-templates/issues/34

Hope that helps you!

Regards,
Santosh

 

Santosh Sai
sunil_kumar_
sunil_kumar_Accepted solution
Level 5
June 7, 2022

Hi @jayv25585659 ,
You easily do it by creating Repository Initialization (repoinit). You just need to create OSGI configuration. 
If your ACL are getting overwritten that means, you might already having this. Check this link.
https://sling.apache.org/documentation/bundles/repository-initialization.html

Himanshu_Jain
Community Advisor
Community Advisor
June 7, 2022

You can set the permissions in repoInit file and push the changes with in build .

Refer: sling.apache.org/documentation/bundles/repository-initialization.html

 

 

 

Himanshu Jain