On 29.09.2011 19:46, azurIt wrote:
Yes, i read this:
http://arskom.github.com/rpclib/reference/base.html?highlight=event#rpclib.EventManager
http://arskom.github.com/rpclib/manual/t_and_p.html?highlight=event
http://arskom.github.com/rpclib/manual/t_and_p.html?highlight=event

but i missed that UserDefinedContext and also example :( sorry.

no worries :) i was asking because i don't see the documentation as proven yet . it is 1) written by someone who knows rpclib inside out, 2) it's my first attempt at fully documenting an open source project. so i might have left obvious things out, or it may be difficult to understand, or could have been organized better. your (and anybody else's) feedback on that would be appreciated.

If i understand you correctly, i need to create two services:
  - one with methods that doesn't need authentication (and with no events)
  - one with methods that needs authentication and with some events enabled
Is this correct ?

yes, two base classes for each kind of service definition.

Does udc must be a class or it can be, for example, dictionary ?

whatever floats your boat, no constraints at all there.

What about my (2) ? How can i set something like 'permissions' for every method 
so that method_call event will have access to them when method is called ? I 
was using a decorator for all of this, for example:
@login_log_decor( send_mail=True, has_domain=True, perms={"and": ["aaa", "bbb"], 
"or": []} )
def myfunc(....):


I thought about this. i think the best way to do this is to add a new argument to the rpc decorator like this:

@rpc( (...), _udp=SomeObject(send_mail=True, has_domain=True, perms={"and": ["aaa", "bbb"], "or": []} )

which will be accessible from ctx.descriptor.udp from both events and methods. this is committed in my fork. does that help you?

another thing, could you please fork rpclib and commit your php tests? just something like the ruby tests, nothing fancy.

best regards,
burak


_______________________________________________
Soap mailing list
[email protected]
http://mail.python.org/mailman/listinfo/soap

Reply via email to