It's worth of try, however things work the other way around w/ workflow. 
Workflow doesn't run in web context so the only context that exists is system 
context which is associated with superuser account. I don't think there is 
simple way to force use of system context in syndicator.

Also using this solution means that you end up with "superuser" being logged 
everywhere (in metadata, audit logs, etc) as author of the change.

Cheers,
Jan

On Oct 5, 2012, at 11:08 AM, Mike Wilson (via Magnolia Forums) 
<[email protected]> wrote:

> Jan, I read your reply in the workflow thread, and while I now see how a 
> working solution could be made, it involves a lot of (re-)configuration. As 
> an alternative I'm thinking about the following "just install a module" 
> solution:
> 
> [code]
> public class SuperuserTransactionalSyndicator extends TransactionalSyndicator 
> {
>       public void init(User user, String repositoryName, String workspaceName,
>                       Rule rule) {
>               // Override user so it's always superuser
>               super.init(Security.getSystemUser(), repositoryName, 
> workspaceName, rule);
>       }
> }
> ...
> <properties>
>       <property>
>               <name>info.magnolia.cms.exchange.Syndicator</name>
>               <value>SuperuserTransactionalSyndicator</value>
>       </property>
> </properties>
> [/code]
> 
> Are there any downsides of this solution?
> 
> Best regards
> Mike


----------------------------------------------------------------
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