Users - beanshell service auth

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Users - beanshell service auth

Fred Forester-2

Hi All,


is there a way around this via beanshell?

Target exception: org.ofbiz.service.ServiceAuthException: User
authorization is required for this service: reserveProductInventory

org.ofbiz.service.ServiceAuthException: User authorization is required
for this service: reserveProductInventory
...
...
...

Thanc
Fred

 
_______________________________________________
Users mailing list
[hidden email]
http://lists.ofbiz.org/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Users - beanshell service auth

Si Chen-2
userLogin = request.getAttribute("userLogin");
pass it into the UtilMisc.toMap(....) for calling your service

*BUT* why are you reserving inventory from beanshell?

Fred Forester wrote:

> Hi All,
>
>
> is there a way around this via beanshell?
>
> Target exception: org.ofbiz.service.ServiceAuthException: User
> authorization is required for this service: reserveProductInventory
>
> org.ofbiz.service.ServiceAuthException: User authorization is required
> for this service: reserveProductInventory
> ...
> ...
> ...
>
> Thanc
> Fred
>
>  
> _______________________________________________
> Users mailing list
> [hidden email]
> http://lists.ofbiz.org/mailman/listinfo/users
>
>
>  

 
_______________________________________________
Users mailing list
[hidden email]
http://lists.ofbiz.org/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Users - beanshell service auth

Fred Forester-2



 it seems easier for trying things out. and I read somewhere that ...  "It can also be used for debugging, testing, and prototyping"  :)


Thanx
Fred


Si Chen wrote:
userLogin = request.getAttribute("userLogin");
pass it into the UtilMisc.toMap(....) for calling your service

*BUT* why are you reserving inventory from beanshell?

Fred Forester wrote:
  
Hi All,


is there a way around this via beanshell?

Target exception: org.ofbiz.service.ServiceAuthException: User 
authorization is required for this service: reserveProductInventory

org.ofbiz.service.ServiceAuthException: User authorization is required 
for this service: reserveProductInventory
...
...
...

Thanc
Fred

 
_______________________________________________
Users mailing list
[hidden email]
http://lists.ofbiz.org/mailman/listinfo/users


  
    

 
_______________________________________________
Users mailing list
[hidden email]
http://lists.ofbiz.org/mailman/listinfo/users


  

 
_______________________________________________
Users mailing list
[hidden email]
http://lists.ofbiz.org/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Users - beanshell service auth

Si Chen-2
Yeah, I do that all the time.  Sorry--I was just curious.  Did it work for you?  Si 

Fred Forester wrote:



 it seems easier for trying things out. and I read somewhere that ...  "It can also be used for debugging, testing, and prototyping"  :)


Thanx
Fred


Si Chen wrote:
userLogin = request.getAttribute("userLogin");
pass it into the UtilMisc.toMap(....) for calling your service

*BUT* why are you reserving inventory from beanshell?

Fred Forester wrote:
  
Hi All,


is there a way around this via beanshell?

Target exception: org.ofbiz.service.ServiceAuthException: User 
authorization is required for this service: reserveProductInventory

org.ofbiz.service.ServiceAuthException: User authorization is required 
for this service: reserveProductInventory
...
...
...

Thanc
Fred

 
_______________________________________________
Users mailing list
[hidden email]
http://lists.ofbiz.org/mailman/listinfo/users


  
    

 
_______________________________________________
Users mailing list
[hidden email]
http://lists.ofbiz.org/mailman/listinfo/users


  

_______________________________________________ Users mailing list [hidden email] http://lists.ofbiz.org/mailman/listinfo/users

 
_______________________________________________
Users mailing list
[hidden email]
http://lists.ofbiz.org/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Users - beanshell service auth

Fred Forester-2

ah, no, but...  the bshcontainer does it already

admin = delegator.findByPrimaryKey("UserLogin", UtilMisc.toMap("userLoginId", "admin"));

so I did this  UtilMisc.toMap("userLogin",admin,.....

and that worked.

Thanx.

Si Chen wrote:
Yeah, I do that all the time.  Sorry--I was just curious.  Did it work for you?  Si 

Fred Forester wrote:



 it seems easier for trying things out. and I read somewhere that ...  "It can also be used for debugging, testing, and prototyping"  :)


Thanx
Fred


Si Chen wrote:
userLogin = request.getAttribute("userLogin");
pass it into the UtilMisc.toMap(....) for calling your service

*BUT* why are you reserving inventory from beanshell?

Fred Forester wrote:
  
Hi All,


is there a way around this via beanshell?

Target exception: org.ofbiz.service.ServiceAuthException: User 
authorization is required for this service: reserveProductInventory

org.ofbiz.service.ServiceAuthException: User authorization is required 
for this service: reserveProductInventory
...
...
...

Thanc
Fred

 
_______________________________________________
Users mailing list
[hidden email]
http://lists.ofbiz.org/mailman/listinfo/users


  
    
 
_______________________________________________
Users mailing list
[hidden email]
http://lists.ofbiz.org/mailman/listinfo/users


  
 
 
_______________________________________________
Users mailing list
[hidden email]
http://lists.ofbiz.org/mailman/listinfo/users

_______________________________________________ Users mailing list [hidden email] http://lists.ofbiz.org/mailman/listinfo/users

 
_______________________________________________
Users mailing list
[hidden email]
http://lists.ofbiz.org/mailman/listinfo/users