获取 AEM 中某个页面的组权限列表

Get the list of permission given to a group for a page in AEM

我需要转到特定页面并找出以编程方式为该页面授予组的权限。这是我必须在 AEm6.0 中实现的。请提供一些可以帮助我实现这一目标的代码片段。非常感谢任何帮助。

您可以使用 jcr api's

实现此目的
        UserManager userMgr = ((org.apache.jackrabbit.api.JackrabbitSession) adminSession)
                .getUserManager();
        AccessControlManager accCtrlMgr = adminSession
                .getAccessControlManager();
        Authorizable denyAccess = userMgr.getAuthorizable("deny-access");
        AccessControlPolicyIterator policyIterator = accCtrlMgr
                .getApplicablePolicies("/content/geometrixx/fr");
        AccessControlList acl;

        try {
            acl = (JackrabbitAccessControlList) policyIterator
                    .nextAccessControlPolicy();
            LOG.debug("# Policy Iterator Acl" + acl.toString());
        } catch (NoSuchElementException e) {
            acl = (JackrabbitAccessControlList) accCtrlMgr
                    .getPolicies("/content/geometrixx/fr")[0];