Klassifizierung - INTERN: Die Inhalte und Informationen dieser Nachricht sind 
ausschließlich für die kommunizierenden Unternehmen bestimmt.

Hi Daniel,

I did not post a support request for this topic in the end, as I have found a 
workaround which is acceptable to us:

- I'm trying to autoGenerate information about the user's department into the 
content, which is stored as a user property on the user. The use-case is clear: 
for our gov't-sector customer, they are organized into many departments and 
want the department information associated with each content page.
- The autoGeneration happens in doInSystemContext Op, therefore I can't access 
the login-user information

- However, as a workaround, I can simply load the username from the surrounding 
mgnl:page content from the mgnl:createdBy property, and then use that to load 
the user object for the user

- The workaround will function in almost 100% of the cases, since the user who 
creates a page almost always then looks at that page in the editor, at which 
point the department information is generated

This solution is ok for us, so I will leave the request for modifying the 
MgnlContext until the next time I meet this issue ;-)

Anyway, thanks for your feedback on this.

Regards from Vienna,

Richard



> -----Ursprüngliche Nachricht-----
> Von: [email protected] [mailto:user-list-owner@magnolia-
> cms.com] Im Auftrag von Daniel Lipp (via Magnolia Forums)
> Gesendet: Mittwoch, 29. Jänner 2014 14:05
> An: Magnolia User List
> Betreff: [magnolia-user] Re: Accessing current User in System context
> 
> Hi Richard,
> 
> I already feared it might not be your operation ;-)
> 
> Glad if you could file an issue describing the use case. You're very welcome 
> to
> describe potential solutions there as well (me too I don't like #1).
> We'll analyze and come up with a solution soon.
> 
> Cheers
> Dan
> 
> --
> Context is everything: http://forum.magnolia-
> cms.com/forum/thread.html?threadId=9d66f7d4-41ca-4ad9-8ea0-
> 166f48ab63fa
> 
> 
> ----------------------------------------------------------------
> For list details, see http://www.magnolia-cms.com/community/mailing-
> lists.html
> Alternatively, use our forums: http://forum.magnolia-cms.com/
> To unsubscribe, E-mail to: <[email protected]>
> ----------------------------------------------------------------



----------------------------------------------------------------
For list details, see http://www.magnolia-cms.com/community/mailing-lists.html
Alternatively, use our forums: http://forum.magnolia-cms.com/
To unsubscribe, E-mail to: <[email protected]>
----------------------------------------------------------------

Reply via email to