Jacopo,

I run into something like this recently, it started me thinking, that
perhaps it would be useful to have an attribute along the lines of run-
as-system="true/false"

Would be interested to hear peoples thoughts, even if only for my own
didactic purposes!

- Andrew

On Thu, 2007-01-25 at 09:41 -0500, Jacopo Cappellato wrote:
> Hi all,
> 
> could you have a look at the attached simple patch? It fixes an 
> authorization problem under some special situations (switching from 
> anonymous user to authenticated one...); however the issue is that, when 
> the "createUserLogin" is called, if the attribute include-user-login is 
> not set to false the manually passed in "system" user is overwritten by 
> the user in the context.
> Should I commit this patch?
> Or, in general, would be better, even if include-user-login is true, to 
> set the user login only if one is not already there in the service in map?
> 
> Jacopo
> plain text document attachment (createPersonAndUserLogin.diff)
> Index: applications/party/script/org/ofbiz/party/party/PartySimpleMethods.xml
> ===================================================================
> --- applications/party/script/org/ofbiz/party/party/PartySimpleMethods.xml    
> (revisione 499802)
> +++ applications/party/script/org/ofbiz/party/party/PartySimpleMethods.xml    
> (copia locale)
> @@ -85,7 +85,7 @@
>              <field-map field-name="userLoginId" value="system"/>
>          </entity-one>
>          
> -        <call-service service-name="createUserLogin" 
> in-map-name="createUlInMap"/>
> +        <call-service service-name="createUserLogin" 
> in-map-name="createUlInMap" include-user-login="false"/>
>          <entity-one entity-name="UserLogin" value-name="newUserLogin"/>
>  
>          <field-to-result field-name="newUserLogin"/>
-- 
Kind Regards
Andrew Sykes <[EMAIL PROTECTED]>
Sykes Development Ltd
http://www.sykesdevelopment.com

Reply via email to