Unlocking a page through impersonation fails! | Community
Skip to main content
Level 3
October 12, 2017

Unlocking a page through impersonation fails!

  • October 12, 2017
  • 2 replies
  • 9658 views

Hi,

We are trying a scenario where unlocking a page in AEM 6.3 is failing. PFB the steps followed in a vanilla AEM instance.

  1. Lock a page using a user say author1.
  2. Another user, say author2 impersonates as author1 and tries to unlock the locked page.
  3. Error appears - Unable to unlock page. Error.log - Caused by: javax.jcr.lock.LockException: Not an owner of the lock /content/we-retail/us/en/user/smartlist/jcr:content
  4. Ideally this scenario was working in AEM 5.6 but not working in AEM 6.3

Please let me know if this is the intended behavior in AEM 6.3 and what will be an alternate solution for the same.

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

2 replies

Level 3
October 12, 2017

From my experience in my project, either admin OR user with admin rights will be able to unlock the page. A mere impersonation of the person who locked the page does not give you all the access to unlock the page.

Also, did you get a chance looking into some of the options that were discussed in this thread. Unlocking Pages - Alternative to "admin" Account?

Level 3
October 27, 2017

Ideally impersonating as a locked user and unlocking the page was working until before AEM 6.3 but apparently not working now in AEM 6.3. Not sure if there is any change or is it a bug in AEM 6.3. There are other options as well as you had mentioned but the mentioned behavior after impersonating is the one which the customer needed and was working until AEM 6.2.

Level 3
December 19, 2017

Is there any hotfix available for the same from Adobe? Error log -

Unable to unlock page.

com.day.cq.wcm.api.WCMException: Unable to unlock page.

Caused by: javax.jcr.lock.LockException: Not an owner of the lock

Adobe Employee
January 16, 2018

For AEM 6.3, Impersonating and unlocking a page is not allowed and can be treated as a product limitation.

January 17, 2018

If it is indeed a product limitation, the canUnlock() method on the Page class should return false when checked with an impersonated user; which it doesn't.

So it seems like there's either a bug in the unlock functionality itself, or in the canUnlock() method.

Correct me if I'm wrong.