Uploaded image for project: 'Jackrabbit Oak'
  1. Jackrabbit Oak
  2. OAK-1962 Fix and Improve Locking
  3. OAK-2747

Admin cannot create versions on a locked page by itself

    XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.2.1
    • 1.0.16, 1.2.3, 1.3.1, 1.4
    • core, jcr
    • None

    Description

      Admin cannot create versions even if it is the lockowner.

      This is a test to go in VersionManagementTest that shows the issue.
      The general questions are:

      • should de lockowner be able to create versions?
      • should admin be able to create versions even if it is not the lockowner?
       @Test
          public void testCheckInCheckoutLocked() throws Exception {
      
              Node n = createVersionableNode(superuser.getNode(path));
      
      
              n.addMixin(mixLockable);
      
              superuser.save();
      
              n = superuser.getNode(n.getPath());
      
              n.lock(true, false);
      
              testSession.save();
      
              n = superuser.getNode(n.getPath());
      
              n.checkin();
              n.checkout();
          }
      

      fails with

      javax.jcr.lock.LockException: Node at /testroot/node1/node1 is locked
      

      Attachments

        Activity

          People

            mreutegg Marcel Reutegger
            mpetria Marius Petria
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: