python - 两种 AEM 环境中的节点权限比较

标签 python python-3.x adobe aem aem-6

我想编写一个 Jenkins python 作业来比较两个不同 AEM 环境中节点权限的差异。在 Jenkins UI 中,我应该能够配置要比较的环境以及要比较的路径。我需要输出的方式应具有环境 1 和环境 2、正在比较的路径以及它们拥有的权限。例如,在开发环境中,对于路径/content/dam/test 我们只有读取权限,而对于同一路径,我们在阶段环境中具有读取和写入权限,则输出应为

                  **Environment-1**       **Environment-2**

内容/dam/测试读取读取和写入

这里真正的问题是如何从两个 aem 环境中检索节点权限以及如何仅比较和过滤权限有差异的节点路径?

最佳答案

看一下 PageInfo servlet。调用示例:http://localhost:4502/libs/wcm/core/content/pageinfo.json?path=/content/we-retail/us/en

您将获得如下所示的权限节点:

  "permissions": {
    "modify": true,
    "replicate": true,
    "read": true,
    "create": true,
    "delete": true,
    "acl_read": true,
    "acl_edit": true
  },

参见:https://helpx.adobe.com/experience-manager/6-4/sites/developing/using/pageinfo.html了解更多信息。

关于python - 两种 AEM 环境中的节点权限比较,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54930746/

相关文章:

python - 改进 LBP/HAAR 检测 XML 级联

python - 如果键和值与其他字典不匹配,则从字典列表中删除字典

jquery - Uncaught Error : Error calling method on NPObject

ios - 无法将 apple developer_identity.cer 转换为 .p12 格式。没有证书与私钥匹配

python - 如何从表格中抓取第二列

Python Jupyter Notebook - 无法通过路径打开 CSV 文件

python - 尝试注册 zope.interface 的实现者时出错

python - 使用近似解和二分搜索

Android App ID前缀问题

python - FTP 类的 mlsd 方法返回的大小单位