[CONTLOCK-5] Save/Commit option throws error while editing components ,page properties,etc when page is locked. Created: 11/May/23  Updated: 23/May/23  Resolved: 23/May/23

Status: Closed
Project: Content Locking
Component/s: None
Affects Version/s: 2.0.1
Fix Version/s: None

Type: Bug Priority: Urgent
Reporter: Sonali Raulo Assignee: Richard Gange
Resolution: Not an issue Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: PNG File image-2023-05-11-15-41-26-739.png     PNG File image-2023-05-11-15-42-26-122.png     PNG File image-2023-05-11-15-43-51-932.png     PNG File image-2023-05-11-15-46-03-880.png    
Template:
Start Date:
Acceptance criteria:
Empty
Task DoD:
[ ]* Doc/release notes changes? Comment present?
[ ]* Downstream builds green?
[ ]* Solution information and context easily available?
[ ]* Tests
[ ]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Bug DoR:
[X]* Steps to reproduce, expected, and actual results filled
[X]* Affected version filled
Date of First Response:

 Description   

Steps to reproduce

  1. Go to pages app in Magnolia.
  2. select any page and lock it.
  3. click on preview page and then edit page or add an action in pages-app decoration enabling edit option only for lock owner as added in the attachment.
  4. Try to edit component / page properties and click save option.

Expected results

1.User with lock owner access should be able to continue with page editing and saving the changes.

2.Any user except the one who has locked should not be able to edit.

Actual results

While trying to save the changes made on the page by the lock owner it throws an 

ActionExecutionException error for commit and the cause being the node is locked.



 Comments   
Comment by Richard Gange [ 11/May/23 ]

Hello SonaliR-

I don't know that I'd consider this a bug. It's true the node is locked. This includes the lock owner. The only way to edit a page which is locked is to first unlock it. Once unlocked then there isn't a lock owner anymore.

Another approach to something like this is to create a new group and/or role. Then use an ACL to control who has edit rights on the node. That could be a single person or a small group of people.

HTH
Rich

Comment by Sonali Raulo [ 11/May/23 ]

Hello Richard,

Thanks for your swift response. A quick question on the same note, does the same applies to publishing as well?

If the node is locked is there any way for a lock owner alone to publish?

 

Comment by Richard Gange [ 11/May/23 ]

Yes, I saw your other ticket. The problem here is it's not practical for me to start overriding all the actions in the pages app to consider the lock owner. It might create a maintenance issue for me. The spirit of the module is to lock/unlock nodes. The consequence is nothing can be done until the node is unlocked. It's a hard JCR lock.

If the node is locked is there any way for a lock owner alone to publish?

No, it's a hard lock for everyone. Even the owner. I'd have to write a special publishing action to make that work. If locking was adopted by PD then it might make more sense to have such a feature. This is an incubator module maintained by me personally. I don't have the capacity to create all those special actions and keep them in sync with any future bug fixes that might come up.

So what I suggest is to use the ACL features provided by JCR. If a node should only be maintained by a specific person or group then give them the write permission and block any users which are not part of that group. You'll find most actions already have the write permission restriction applied. It's just a matter of adjusting the security settings. You can use the Security App for that.

Comment by Sonali Raulo [ 11/May/23 ]

Thanks much for the clarifications.

Generated at Mon Feb 12 00:22:54 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.