Uploaded image for project: 'Sling'
  1. Sling
  2. SLING-4062

Sling replication deleting ACLs nodes

    XMLWordPrintableJSON

Details

    Description

      I use
      @Reference(target = "(name=blah-reverse)", policy = ReferencePolicy.DYNAMIC,
      cardinality = ReferenceCardinality.OPTIONAL_UNARY)
      ReplicationAgent replicationAgent;

      public createUser() {
      final UserManager userManager = AccessControlUtil.getUserManager(session);
      User user = (User)userManager.getAuthorizable(userId);
      if (user == null) {
      user = userManager.createUser(userId, password, new Principal() {
      @Override
      public String getName()

      { return userId; }

      }, userPath);
      session.save();
      }
      }
      ...

      private void reverseReplicate(String path) throws AgentReplicationException {
      if (replicationAgent != null)

      { ReplicationRequest replicationRequest = new ReplicationRequest(0, ReplicationActionType.ADD, path); replicationAgent.execute(replicationRequest); }

      }

      If you look at the user node before replication happens, there is a rep:policy node under it with jcr:all access for the user. After the reverse replication poll interval happens and replication completes, the rep:policy node is missing!

      Attachments

        Activity

          People

            teofili Tommaso Teofili
            lbyrum Laurie byrum
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: