Re: run a service with the system userID
Posted by
David E. Jones on
URL: http://ofbiz.116.s1.nabble.com/run-a-service-with-the-system-userID-tp168847p168850.html
So, you're asking how to do this from a simple-method?
Just do an entity-one to look up the "system" UserLogin, put it in the service input context, and then use the attribute on the call-service operation to not include the user (ie explicitly set it to false).
You can see stuff about these attributes in the XSD files, or the quick reference book, or whatever, and some docs exist on them in the MiniLang Guide.
-David
Hans Bakker wrote:
> Hi Andy,
>
> thanks for your answer, I asked this because a user comes on a site, registers
> and want to take out a subscription. I added a subscription service to the
> content component where security obviously is needed.
>
> however i would also like to use this service also when a new user registers
> and his creditcard is found valid.
>
> no solution for this? now i have to copy the services content and run it
> without the security....duplication of code....
>
> temporary change the userid to 'system' would be nice.....I already digged
> into the minilanguage code, but not so easy stuff for me....
>