Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow XML-RPC view methods to take parameters.
When the XML-RPC view setup machinery was changed recently, views taking parameters were not tested. The problem was that methods were security protected using an instance of ProtectedMethod which implemented ILocation (thus could inherit security context) and provides a __call__(*args) and passes *args onto the actual view method. THis works fine when no parameters are issues via xml-rpc, but when they are, zope.publisher.publish.mapply chokes. For some reason, it cannot figure out the *args thing. This fix gets rid of MethodFactory and ProtectedMethod. Instead, a new view class with a security checker and a __call__ that is a copy of the method that is to be used is created. This process is very similar to what happens with browser pages. README.txt was updated with a functional test for this.
- Loading branch information
Showing
2 changed files
with
79 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters