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
Jun 7, 2022 1:53 AM UTC
Solved

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

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.
sunil_kumar_
sunil_kumar_Accepted solution
Level 5
Jun 7, 2022 2:20 AM UTC

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

Himanshu_Jain
New Participant
Jun 7, 2022 7:50 AM UTC

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

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

 

 

 

Translate
Himanshu Jain
sunil_kumar_
sunil_kumar_Accepted solution
Level 5
Jun 7, 2022 2:20 AM UTC

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

Translate
SantoshSai
New Participant
Jun 7, 2022 2:11 AM UTC

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

 

Translate
Santosh Sai