-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
remove the route predicate and add a pattern for security #37
Comments
Doing the parsing in a factory is also a great way to provide support for a full-traversal application. Consider the public api def myFactory(request):
if request.rpc_method == 'addUser':
return AddUser(request)
config.set_root_factory(JSONRPCRootFactory(myFactory))
@jsonrpc_method(context=AddUser, permission='create_users')
def addUser(request):
# add a user Note that |
Removing the endpoint concept is a little hairy because parts of it are used to pass settings to |
From a "user" point of view, what I would like is to be able to declare a JSON-RPC or XML-RPC view like a common Pyramid view, using traversal... For example : @jsonrpc_method(context=IMyContext, permission='create_users') Calling URL required to access this method should use common objects traversal : /object1/object2/my_context, and method name is the name of the function... |
I understand but in order to dispatch on the method it's necessary to parse the body. Using the |
I don't know Pyramid internals enough to be able to have a good point
of view about that... :-/
|
I prefer to think of the parsing as a custom
factory
on the route that can setup the request after matching the route. We can then pass the request into a custom factory if the user specified one, and return the context. Imagine:related: #31, #36
The text was updated successfully, but these errors were encountered: