[MAGNOLIA-3864] Activator metadata is not set correctly when a page is activated Created: 20/Oct/11  Updated: 20/Oct/11  Resolved: 20/Oct/11

Status: Closed
Project: Magnolia
Component/s: workflow
Affects Version/s: 4.4.5
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Rory Gibson Assignee: Magnolia International
Resolution: Not an issue Votes: 0
Labels: activation, metadata, workflow
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Template:
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:
[ ]* Steps to reproduce, expected, and actual results filled
[ ]* Affected version filled
Date of First Response:

 Description   

We have created some custom reporting functionality, which includes the ability to report upon which pages have been activated by which moderators.
As part of that, we want to use the mmgnl:activatorId metadata - but it's not being set correctly by the activation code.

Example:

This is from the magnolia demo site.

I created an editor (testEditor), created a page (/demo-project/test) and activated it.
Then created a moderator (testModerator) and selected proceed from the inbox.
Then logged in as superuser and did a JCR query on /demo-project/test and got the following:

/demo-project/test
/demo-project/test/hideInNav=false
/demo-project/test/jcr:uuid=d33aedc6-0fbc-4b0d-8986-9da726b8878e
/demo-project/test/jcr:mixinTypes=mix:lockable
/demo-project/test/jcr:created=2011-10-20T12:48:17.306+02:00
/demo-project/test/jcr:primaryType=mgnl:content
/demo-project/test/MetaData
/demo-project/test/MetaData/mgnl:activatorid=superuser
/demo-project/test/MetaData/mgnl:authorid=testEditor
/demo-project/test/MetaData/mgnl:lastaction=2011-10-20T12:49:12.099+02:00
/demo-project/test/MetaData/jcr:uuid=c43016b3-34cf-43ad-9b74-40200da26938
/demo-project/test/MetaData/mgnl:creationdate=2011-10-20T12:48:17.306+02:00
/demo-project/test/MetaData/mgnl:template=stkSection
/demo-project/test/MetaData/jcr:created=2011-10-20T12:48:17.306+02:00
/demo-project/test/MetaData/mgnl:activated=true
/demo-project/test/MetaData/mgnl:lastmodified=2011-10-20T12:48:41.166+02:00
/demo-project/test/MetaData/jcr:primaryType=mgnl:metaData
/demo-project/test/extras
/demo-project/test/extras/jcr:uuid=44a696d3-5c3c-4e29-b48f-7c4e4ea86a81
/demo-project/test/extras/jcr:mixinTypes=mix:lockable
/demo-project/test/extras/jcr:created=2011-10-20T12:48:29.945+02:00
/demo-project/test/extras/jcr:primaryType=mgnl:contentNode
/demo-project/test/extras/MetaData
/demo-project/test/extras/MetaData/mgnl:activatorid=superuser
/demo-project/test/extras/MetaData/mgnl:lastaction=2011-10-20T12:49:12.100+02:00
/demo-project/test/extras/MetaData/mgnl:creationdate=2011-10-20T12:48:29.945+02:00
/demo-project/test/extras/MetaData/jcr:uuid=01227004-56e1-4106-86d9-4d4cb21a47ba
/demo-project/test/extras/MetaData/jcr:created=2011-10-20T12:48:29.945+02:00
/demo-project/test/extras/MetaData/mgnl:activated=true
/demo-project/test/extras/MetaData/jcr:primaryType=mgnl:metaData



 Comments   
Comment by Zdenek Skodik [ 20/Oct/11 ]

The workflow engine can't use given user credentials since it doesn't know users password so can't make valid login to the Public instance. Since superuser is a system account and is always present inside of Magnolia CMS itself, it's used this account to log in on behalf of the regular user.

The workaround for that would be to write your own activation command that retrieves user credentials from a third party authentication system and use that to authenticate against Public instance and perform activation as given user.

I can think of a couple of ways how to achieve your goal, on the other hand none is as simple as the Audit trail, if it's enough for your needs.

Generated at Mon Feb 12 03:50:25 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.