Diese Konversation wurde aufgrund von Inaktivität geschlossen. Bitte erstellen Sie einen neuen Post.
Level 1
Level 2
Melden Sie sich an, um alle Badges zu sehen
Diese Konversation wurde aufgrund von Inaktivität geschlossen. Bitte erstellen Sie einen neuen Post.
Hi,
While coding a WorkflowProcess implementation, I need to create a "system user" who can unlock pages.
Pages are locked through a WorkflowSession on a previous workflow step.
How can I give the "system user" the permissions to unlock pages?
Obviously I don't what to use an admin session, and I'm wondering how can I grant unlock permissions in AEM Security Permissions tab!
Thank you,
Lir
Gelöst! Gehe zu Lösung.
Zugriffe
Antworten
Likes gesamt
I'd read a thread somewhere which I'll try to find again & post here. It mentioned that 'page.canUnlock()' won't work but 'page.unlock()' will.
I'd read a thread somewhere which I'll try to find again & post here. It mentioned that 'page.canUnlock()' won't work but 'page.unlock()' will.
Interesting!, I'll try that and let you know
That was it!
It works now with admin AND with the system user for which I set "jcr:all"
I will reduce the privileges to only what's required of unlocking and that would be it.
It is strange why page.canUnlock() would return false, but no harm now that I know.
Thank you
Zugriffe
Antworten
Likes gesamt
Zugriffe
Antworten
Likes gesamt
For me page.unlock() with system user having high privileges didn't work. But something like below worked for me though
page = pageManager.getPage(pagePath);
if (page.isLocked()) {
Node node = session.getNode(pagePath+"/jcr:content");
node.removeMixin("mix:lockable");
session.save();
}
Zugriffe
Antworten
Likes gesamt
Finally!!
Its probably because the second user who is trying to unlock doesn't have the read permissions on /home/users/.. path to read it's own ACL to find out that can it unlock that specific /content path?
That might be the case for my system user, but it shouldn't happen for admin. It does though
Zugriffe
Likes
Antworten