Soap webservice and $user global

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Soap webservice and $user global

cam.lafit@azerttyu.net
Hi

Before to move to REST solution, I need to propose some patch about
webservice SOAP.

I've a doubt about $user global. In some case, method use $user global
and not $user provided as argument.

For example we have many error when actioncomm is enabled. These
methods work mainly with global. Other method don't ask $user
information.

In my use case I've patch some webservice method to set global $user
and rename $fuser.

Can I patch to force global $user ?


My use case is dolispip usage with dolibarr4.x

Km

_______________________________________________
Dolibarr-dev mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/dolibarr-dev
Reply | Threaded
Open this post in threaded view
|

Re: Soap webservice and $user global

Laurent Destailleur (aka Eldy)
Sure.
Just try to push your path as a github PR. You will see comment on feedback on it.

Just note this:

global $user is used to known the current logged user than run the code
$user as parameter (in most cases, it should be called $fuser to avoid conflict), should be the user the function is related to. (so a logged user can create on object related to a different user)

2017-05-19 9:48 GMT+02:00 [hidden email] <[hidden email]>:
Hi

Before to move to REST solution, I need to propose some patch about
webservice SOAP.

I've a doubt about $user global. In some case, method use $user global
and not $user provided as argument.

For example we have many error when actioncomm is enabled. These
methods work mainly with global. Other method don't ask $user
information.

In my use case I've patch some webservice method to set global $user
and rename $fuser.

Can I patch to force global $user ?


My use case is dolispip usage with dolibarr4.x

Km

_______________________________________________
Dolibarr-dev mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/dolibarr-dev



--
------------------------------------------------------------------------------------
Google+: https://plus.google.com/+LaurentDestailleur-Open-Source-Expert/
Facebook: https://www.facebook.com/Destailleur.Laurent
------------------------------------------------------------------------------------
* Dolibarr (Project leader): https://www.dolibarr.org (make a donation for Dolibarr project via Paypal: [hidden email])
* AWStats (Author) : http://awstats.sourceforge.net (make a donation for AWStats project via Paypal: [hidden email])
* AWBot (Author) : http://awbot.sourceforge.net
* CVSChangeLogBuilder (Author) : http://cvschangelogb.sourceforge.net



_______________________________________________
Dolibarr-dev mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/dolibarr-dev