Uploaded image for project: 'ModeShape'
  1. ModeShape
  2. MODE-2686

Events are not generated for node if it became visible for user

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Do
    • Icon: Major Major
    • None
    • 5.4.0.Final
    • JCR
    • None
    • Hide

      Lets say we have 3 users in the system (user1, user2 and user3)
      1) Create node
      2) Make this node visible only for user1
      3) Add listener for events under path "/", session created as user3
      4) Make this node visible for user1 and user2
      5) Remove all ACLs on this node
      6) You will see that only /jcr:system/mode:aclCout event was generated and nothing about that node, that it is availbale or that acls have been removed. To sum up, nothing about that node

      Show
      Lets say we have 3 users in the system (user1, user2 and user3) 1) Create node 2) Make this node visible only for user1 3) Add listener for events under path "/", session created as user3 4) Make this node visible for user1 and user2 5) Remove all ACLs on this node 6) You will see that only /jcr:system/mode:aclCout event was generated and nothing about that node, that it is availbale or that acls have been removed. To sum up, nothing about that node

      User doesn't get any events from listener for node for which he got view permissions. The only workaround is to remove existing listener and create a new one. Then you will get updates regarding that node.

      I was able to reproduce this defect with unit tests. Please find it in the attachments.
      There are 2 files ModeShapeTckTest2 and ModeShapeTckTest. They are quite similar, but ModeShapeTckTest2 is more simple case, so I would recomend to look at it first.
      Test is called testNotReceivingEventsWhenGrantedPermissionsForNode.
      Just copy test (and few additional functions) to the ModeShapeTckTest.java file and run it.

        1. ModeShapeTckTest_3.java
          9 kB
          Ostap Shtabura
        2. ModeShapeTckTest.java
          10 kB
          Ostap Shtabura
        3. ModeShapeTckTest2.java
          9 kB
          Ostap Shtabura

              Unassigned Unassigned
              hot_jira Ostap Shtabura (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: