The instructions below must be run on Mac OS, Linux, or Windows (on Cygwin) with cURL, Python and Java SDK installed:
-
In the same directory, run this command to download a json file of the ACL paths from the source instance (set the username and password and correct host):
curl -u admin:admin 'http://aemhost/crx/de/query.jsp?' -G --data-urlencode '_dc=1507011481908&_charset_=utf-8&type=xpath&stmt=/jcr:root/content//element(*,rep:ACL)&showResults=true' > data.json
-
Create a file generate-package-filter.py and paste the python code below inside it:
import json
from pprint import pprintwith open('data.json') as data_file:
data = json.load(data_file)print("<?xml version=\"1.0\" encoding=\"UTF-8\"?>")
print("")
for item in data["results"]:
print("".format(path=item["path"]))
print("")